[Beginners Corner] - Re: JBoss Startup - Log4JService
by jaikiran
"Matty_R" wrote : It just comes down to cost of upgrade / retesting all of the different apps hosted on the server...
|
|
Fair enough.
I dont have that version installed on my test system. The oldest that i have is 3.2.7. I looked at the jboss-service.xml file and it mentions:
<!-- Preload all custom editors for VMs that don't use the thread
| context class loader when searching for PropertyEditors. Uncomment
| if your JDK 1.3.0 VM fails to find JBoss PropertyEditors.
| <mbean code="org.jboss.varia.property.PropertyEditorManagerService"
| name="jboss:type=Service,name=BootstrapEditors">
| <attribute name="BootstrapEditors">
| java.math.BigDecimal=org.jboss.util.propertyeditor.BigDecimalEditor
| java.lang.Boolean=org.jboss.util.propertyeditor.BooleanEditor
| java.lang.Class=org.jboss.util.propertyeditor.ClassEditor
| java.util.Date=org.jboss.util.propertyeditor.DateEditor
| java.io.File=org.jboss.util.propertyeditor.FileEditor
| java.net.InetAddress=org.jboss.util.propertyeditor.InetAddressEditor
| java.lang.Integer=org.jboss.util.propertyeditor.IntegerEditor
| javax.management.ObjectName=org.jboss.mx.util.propertyeditor.ObjectNameEditor
| java.util.Properties=org.jboss.util.propertyeditor.PropertiesEditor
| [Ljava.lang.String;=org.jboss.util.propertyeditor.StringArrayEditor
| java.net.URL=org.jboss.util.propertyeditor.URLEditor
| </attribute>
| </mbean>
| -->
This part is just above the Log4j initialization mbean. As mentioned (specifically for JDK 1.3) in that note, could you try uncommenting this part and see if it works.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098275#4098275
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4098275
18Â years, 8Â months
[JBoss/Spring Integration] - Jboss + Spring + Hibernate + jboss + testNG + java.lang.Ill
by Chandu_Coool123
Hello,
I am new to spring (Plz help me). I have an working application with Spring,hibernate,Jboss
and webservices.
Also posted on Spring Forum (waiting for reply)
My requirement is to write test cases using TestNg. I have multiple session factories in my configuraiton file and using "org.springframework.transaction.jta.JtaTransactio nManager" as transactionmanager.
This setup is working fine.
but when i introduce TestNg in to scene and try to run the test cases(On Webservices) it throws variety of wrrors when jta.jar is added to class path and when it is not.
if jta.jar is added then i get following error
Code:
java.lang.IllegalStateException: Either 'userTransaction' or 'userTransactionName' or 'transactionManager' or 'transactionManagerName' must be specifiedotherwise i get
Code:
NoClassDefFoundError: javax/transaction/TransactionManager ...I just unable to understand where i am doing something wrong which is affeting while running TestNg
Note: Here i am using
org.springframework.transaction.jta.JtaTransaction Manager as transaction manager even tough i am referring to local resources (databases which are not bound to container) as i have to persist data on the DB's at the same time
Following is my context.xml file
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schem...-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schem...ng-aop-2.1.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
<!-- Configurer that replaces ${...} placeholders with values from a properties file -->
<!-- (in this case, JDBC-related settings for the dataSource definition below) -->
/WEB-INF/classes/applicationContext.properties
<!-- Local C3P0 DataSource that works in any environment -->
<!-- (This DataSource implementation has a "close" method to be called on shutdown) -->
<bean id="dtDataSource"
class="com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method="close">
<bean id="prodDataSource"
class="com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method="close">
600
50
false
1
5
2000
5
false
<!-- Set the release mode to auto, so that the DB connections are released as soon as the transaction is complete. -->
auto
true
false
<!-- Hibernate SessionFactory -->
<!-- Must references all OR mapping files. -->
/hbm/UserListDt.hbm.xml
/hbm/BoomListParameters.hbm.xml
/hbm/DtListParameters.hbm.xml
/hbm/DtParameterTypes.hbm.xml
/hbm/DtListType.hbm.xml
/hbm/DataCenterValues.hbm.xml
/hbm/DtListDataCenters.hbm.xml
<!-- Must references all OR mapping files. -->
/hbm/UserListProd.hbm.xml
/hbm/ProductCategory.hbm.xml
/hbm/UserListGroup.hbm.xml
/hbm/User.hbm.xml
<!-- =================== TRANSACTION ====================== -->
<!-- the transactional advice (i.e. what 'happens'; see the <aop:advisor/> bean below) -->
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<!-- the transactional semantics... -->
<tx:attributes>
<!-- all methods starting with 'get' are read-only -->
<tx:method name="get*" read-only="true"
propagation="REQUIRED" />
<tx:method name="find*" read-only="true"
propagation="REQUIRED" />
<tx:method name="*" propagation="REQUIRED" rollback-for="BoomException" />
</tx:attributes>
</tx:advice>
--------------------------------------------------------------------------------
Last edited by chandu_coool : Today at 04:32 PM.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098273#4098273
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4098273
18Â years, 8Â months
[JBoss Seam] - Re: Long vs long for ID and InvalidStateException
by damianharvey
>From Hibernate. I'm using MySQL.
Cheers,
Damian.
|
| javax.el.ELException: org.hibernate.validator.InvalidStateException: validation failed for: com.locuslive.odyssey.entity.OneTimeReference
| at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:332)
| at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:341)
| at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
| at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
| at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
| at org.jboss.seam.core.Expressions$2.invoke(Expressions.java:174)
| at org.jboss.seam.navigation.Pages.callAction(Pages.java:634)
| at org.jboss.seam.navigation.Pages.preRender(Pages.java:289)
| at org.jboss.seam.jsf.SeamPhaseListener.preRenderPage(SeamPhaseListener.java:544)
| at org.jboss.seam.jsf.SeamPhaseListener.beforeRenderResponse(SeamPhaseListener.java:455)
| at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:146)
| at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:116)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
| at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
| at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
| at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
| at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:150)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:613)
| Caused by: org.hibernate.validator.InvalidStateException: validation failed for: com.locuslive.odyssey.entity.OneTimeReference
| at org.hibernate.validator.event.ValidateEventListener.validate(ValidateEventListener.java:143)
| at org.hibernate.validator.event.ValidateEventListener.onPreInsert(ValidateEventListener.java:167)
| at org.hibernate.action.EntityIdentityInsertAction.preInsert(EntityIdentityInsertAction.java:119)
| at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:42)
| at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250)
| at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:298)
| at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:181)
| at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:107)
| at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:131)
| at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:87)
| at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:38)
| at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:618)
| at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:592)
| at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:596)
| at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:212)
| at org.jboss.seam.persistence.EntityManagerProxy.persist(EntityManagerProxy.java:135)
| at com.locuslive.odyssey.session.shippinginstruction.ShippingInstructionRequest.requestShippingInstruction(ShippingInstructionRequest.java:80)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
| at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
| at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.bpm.BusinessProcessInterceptor.aroundInvoke(BusinessProcessInterceptor.java:49)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
| at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:155)
| at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:91)
| at com.locuslive.odyssey.session.shippinginstruction.ShippingInstructionRequest_$$_javassist_31.requestShippingInstruction(ShippingInstructionRequest_$$_javassist_31.java)
| at com.locuslive.odyssey.entity.BookingHome.requestShippingInstruction(BookingHome.java:847)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
| at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
| at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.persistence.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:48)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.core.ConversationInterceptor.aroundInvoke(ConversationInterceptor.java:65)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.bpm.BusinessProcessInterceptor.aroundInvoke(BusinessProcessInterceptor.java:49)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.transaction.TransactionInterceptor$1.work(TransactionInterceptor.java:38)
| at org.jboss.seam.util.Work.workInTransaction(Work.java:40)
| at org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:32)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.security.SecurityInterceptor.aroundInvoke(SecurityInterceptor.java:40)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
| at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:155)
| at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:91)
| at com.locuslive.odyssey.entity.BookingContainerHome_$$_javassist_17.requestShippingInstruction(BookingContainerHome_$$_javassist_17.java)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:328)
| ... 51 more
| 13:04:28,619 ERROR [SeamPhaseListener] swallowing exception
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098271#4098271
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4098271
18Â years, 8Â months
[Persistence, JBoss/CMP, Hibernate, Database] - Re: Refering to a datasource wih its ENC name
by MarcusDidiusFalco
Ok the Bean is now deployed, but it seems I can get a connection from the datasource, but somehow I cannot work with it:
ctx = new InitialContext();
| DataSource ds = (DataSource) ctx.lookup("java:/comp/env/jdbc/FencingDS");
| System.out.println(ds.toString());
| Connection con = (Connection) ds.getConnection();
| System.out.println("Connection is closed: " + con.isClosed());
| System.out.println(con.toString() + " " + con.getCatalog());
| Statement stmt = con.createStatement();
| ResultSet resultSet = stmt.executeQuery("SELECT * FROM fencer");
| while (resultSet.next()) {
| System.out.println(resultSet.getString("firstName"));
| System.out.println(resultSet.getString("lastName"));
| }
I know that the Select should work, because I have copied it from thy MySQL console.
13:41:21,109 INFO [EJB3Deployer] Deployed: file:/C:/jboss-4.2.1.GA/server/defau
| lt/deploy/GeneralTest.jar
| 13:41:25,656 INFO [STDOUT] org.jboss.resource.adapter.jdbc.WrapperDataSource@13
| dc4d5
| 13:41:25,656 INFO [STDOUT] Connection is closed: false
| 13:41:25,656 INFO [STDOUT] org.jboss.resource.adapter.jdbc.WrappedConnection@17
| b650a null
| 13:41:25,656 ERROR [STDERR] java.sql.SQLException: Table not found in statement
| [SELECT * FROM fencer]
When I change the lookup to
anonymous wrote : DataSource ds = (DataSource) ctx.lookup("java:FencingDS");
everything works fine.
So I guess, I still have some problem with the mapping of the jndi-Names.
Can somebody help me out with this problem please?
Thanks,
Hans
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098265#4098265
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4098265
18Â years, 8Â months