[JBoss Seam] - Exception:Transaction is not active
by mnrz
Hello
I have a form in which some information will be saved or retrieved from database. sometimes, when I am going to save new information, an exception from database will prevent from inserting data, for example, in my case, a duplicate entry exception is thrown
the problem is after this exception the bean is going to load the data from database but it throws this one:
| ERROR - logExceptions(72) | Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=null:
| 1193039491093/144, BranchQual=null:1193039491093, localId=0:144]; - nested throwable: (javax.resource.Resource
| Exception: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=null:1193039491093/144
| , BranchQual=null:1193039491093, localId=0:144])
| javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection
| at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.jav
| a:567)
| at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:56)
| at com.payvand.search.dao.StoredQueryDaoImpl.loadAll(StoredQueryDaoImpl.java:71)
| 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.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:109)
| at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
| at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:37)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
| at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:21)
| at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
| 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:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationI
| nterceptor.java:52)
| at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown Source)
| 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:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
|
| at sun.reflect.GeneratedMethodAccessor63.invoke(Unknown Source)
| 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:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
| at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
| at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50)
| at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
| at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
| at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManag
| erInterceptor.java:54)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
| at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
| at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
| at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:201)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
| at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
| at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
| at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
| at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
| at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:181)
| at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:79)
| at $Proxy86.loadAll(Unknown Source)
| at com.payvand.search.model.business.FavoriteQueryAction.loadAllTags(FavoriteQueryAction.java:62)
| at com.payvand.search.model.business.FavoriteQueryAction.addNewTaggedQuery(FavoriteQueryAction.java:12
| 4)
| 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.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:109)
| at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
| at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:37)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
| at org.jboss.seam.interceptors.BijectionInterceptor.bijectNonreentrantComponent(BijectionInterceptor.j
| ava:79)
| at org.jboss.seam.interceptors.BijectionInterceptor.bijectComponent(BijectionInterceptor.java:58)
| at sun.reflect.GeneratedMethodAccessor154.invoke(Unknown Source)
| 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:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:21)
| at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
| 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:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationI
| nterceptor.java:52)
| at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown Source)
| 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:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
|
| at sun.reflect.GeneratedMethodAccessor63.invoke(Unknown Source)
| 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:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
| at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
| at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50)
| at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
| at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
| at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManag
| erInterceptor.java:54)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
| at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
| at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
| at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
| at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
| at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
| at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
| at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
| at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:181)
| at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:79)
| at $Proxy93.addNewTaggedQuery(Unknown Source)
| at com.payvand.search.model.business.FavoriteQuery$$FastClassByCGLIB$$877db397.invoke(<generated>)
| at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
| at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:45)
| at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:74)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
| at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
| at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
| at org.jboss.seam.intercept.ClientSideInterceptor.interceptInvocation(ClientSideInterceptor.java:83)
| at org.jboss.seam.intercept.ClientSideInterceptor.intercept(ClientSideInterceptor.java:52)
| at com.payvand.search.model.business.FavoriteQuery$$EnhancerByCGLIB$$52e48812.addNewTaggedQuery(<gener
| ated>)
| 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 com.sun.el.parser.AstValue.invoke(AstValue.java:151)
| at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
| at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
| at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
| at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
| at javax.faces.component.UICommand.broadcast(UICommand.java:109)
| at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
| at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
| at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:329)
| at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
| at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
| at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:100)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:29)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamCharacterEncodingFilter.doFilter(SeamCharacterEncodingFilter.java:41)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.ja
| va:744)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
| at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: org.hibernate.exception.GenericJDBCException: Cannot open connection
| at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
| at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
| at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
| at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
| at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:420)
| at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
| at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
| at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561)
| at org.hibernate.loader.Loader.doQuery(Loader.java:661)
| at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
| at org.hibernate.loader.Loader.doList(Loader.java:2145)
| at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
| at org.hibernate.loader.Loader.list(Loader.java:2024)
| at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:392)
| at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:333)
| at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
| at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114)
| at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
| at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:53)
| ... 188 more
| Caused by: org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=2
| 57, GlobalId=null:1193039491093/144, BranchQual=null:1193039491093, localId=0:144]; - nested throwable: (javax
| .resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=null
| :1193039491093/144, BranchQual=null:1193039491093, localId=0:144])
| at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:94)
| at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.ja
| va:69)
| at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:417)
| ... 202 more
| Caused by: javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=25
| 7, GlobalId=null:1193039491093/144, BranchQual=null:1193039491093, localId=0:144]
| at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.j
| ava:290)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManage
| r2.java:392)
| at org.jboss.resource.adapter.jdbc.local.LocalTxDataSource$ConnectionManagerDelegate.allocateConnectio
| n(LocalTxDataSource.java:78)
| at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
| ... 204 more
|
if I refresh the form, loading data from database will be done with no problem and I don't want to ask my user to press the Refresh button each time it happens !!!!
I also, place a @Transactional on my dao class but nothing has changed
what is the problem with that?
thank you all
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4097468#4097468
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4097468
18Â years, 8Â months
[JBoss Messaging] - Failed to download and/or install client side AOP stack
by monk2009
Hello All,
Some one must've hit this problem - seems like configuration issue. Here it goes.
OS: WinXP
Java: 1.6
JBoss AS: 4.2.1 GA
JBM: 1.4.0.GA
When JMS over HTTPS is used locally (Clent and the server reside on the same machine) it works. When client is on another machine it fails and get the following error:
java.lang.RuntimeException: Failed to download and/or install client side AOP stack
| at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:199)
| at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:87)
| at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:82)
| at com.lmco.spv.jms.testers.JBossMessagingTester.main(JBossMessagingTester.java:49)
| Caused by: org.jboss.jms.exception.MessagingNetworkFailureException: Failed to connect client
| at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.createClient(ClientConnectionFactoryDelegate.java:304)
| at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$getClientAOPStack$aop(ClientConnectionFactoryDelegate.java:228)
| at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.getClientAOPStack(ClientConnectionFactoryDelegate.java)
| at org.jboss.jms.client.ClientAOPStackLoader.load(ClientAOPStackLoader.java:75)
| at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:192)
| ... 3 more
| Caused by: java.lang.reflect.InvocationTargetException
| 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:597)
| at org.jboss.remoting.InvokerRegistry.loadClientInvoker(InvokerRegistry.java:419)
| at org.jboss.remoting.InvokerRegistry.createClientInvoker(InvokerRegistry.java:320)
| at org.jboss.remoting.Client.connect(Client.java:441)
| at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.createClient(ClientConnectionFactoryDelegate.java:300)
| ... 7 more
| Caused by: java.lang.NullPointerException
| at org.jboss.remoting.transport.http.ssl.HTTPSClientInvoker.createSocketFactory(HTTPSClientInvoker.java:144)
| at org.jboss.remoting.RemoteClientInvoker.<init>(RemoteClientInvoker.java:46)
| at org.jboss.remoting.transport.http.HTTPClientInvoker.<init>(HTTPClientInvoker.java:105)
| at org.jboss.remoting.transport.http.ssl.HTTPSClientInvoker.<init>(HTTPSClientInvoker.java:63)
| at org.jboss.remoting.transport.https.TransportClientFactory.createClientInvoker(TransportClientFactory.java:39)
| ... 15 more
| Failed to download and/or install client side AOP stack
| org.jboss.jms.exception.MessagingNetworkFailureException: Failed to connect client
| at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.createClient(ClientConnectionFactoryDelegate.java:304)
| at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$getClientAOPStack$aop(ClientConnectionFactoryDelegate.java:228)
| at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.getClientAOPStack(ClientConnectionFactoryDelegate.java)
| at org.jboss.jms.client.ClientAOPStackLoader.load(ClientAOPStackLoader.java:75)
| at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:192)
| at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:87)
| at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:82)
| at com.lmco.spv.jms.testers.JBossMessagingTester.main(JBossMessagingTester.java:49)
| Caused by: java.lang.reflect.InvocationTargetException
| 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:597)
| at org.jboss.remoting.InvokerRegistry.loadClientInvoker(InvokerRegistry.java:419)
| at org.jboss.remoting.InvokerRegistry.createClientInvoker(InvokerRegistry.java:320)
| at org.jboss.remoting.Client.connect(Client.java:441)
| at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.createClient(ClientConnectionFactoryDelegate.java:300)
| ... 7 more
| Caused by: java.lang.NullPointerException
| at org.jboss.remoting.transport.http.ssl.HTTPSClientInvoker.createSocketFactory(HTTPSClientInvoker.java:144)
| at org.jboss.remoting.RemoteClientInvoker.<init>(RemoteClientInvoker.java:46)
| at org.jboss.remoting.transport.http.HTTPClientInvoker.<init>(HTTPClientInvoker.java:105)
| at org.jboss.remoting.transport.http.ssl.HTTPSClientInvoker.<init>(HTTPSClientInvoker.java:63)
| at org.jboss.remoting.transport.https.TransportClientFactory.createClientInvoker(TransportClientFactory.java:39)
| ... 15 more
|
The test code is as follows:
| package com.spv.jms.testers;
|
| import java.util.Properties;
| import javax.naming.Context;
| import javax.naming.InitialContext;
| import javax.jms.*;
|
|
| public class JBossMessagingTester
| {
|
| public static void main(String args[]) throws Exception
| {
| Properties env = new Properties();
| env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.HttpNamingContextFactory");
| env.setProperty(Context.PROVIDER_URL, "https://mtngt4fv1:443/invoker/JNDIFactorySSL");
|
|
| Connection conn = null;
|
| try {
|
| Context ctx = new InitialContext(env);
| System.out.println("Created InitialContext, env= " + env);
|
| //looking up JMS connection factory over HTTPs
| ConnectionFactory connectionFactory = (ConnectionFactory)ctx.lookup("HTTPSConnectionFactory");
| System.out.println("connectionFactory= " + connectionFactory.toString());
|
| Destination queue = (Destination)ctx.lookup("queue/A");
|
| conn = connectionFactory.createConnection();
|
| Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
|
| MessageProducer producer = session.createProducer(queue);
|
| Message m = session.createTextMessage(new String("wazzaaa??!"));
|
| producer.send(m);
|
|
| }catch(Exception e){
| e.printStackTrace();
|
| }finally{
| if(conn != null)
| conn.close();
| }
| }
| }
|
This thread talks about it but didn't quite work for moi.
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=116748
Any help in this matter immensely appreciated.
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4097463#4097463
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4097463
18Â years, 8Â months
[Beginners Corner] - How is shutdown.sh related to jmx-console?
by konstandinos
Hi
I've figured out that in order to call shutdown.sh correctly from my /etc/init.d/jboss script (ie: when I type /etc/init.d/jboss stop) I need to use the arguments: -S -u username -p password
... and that this username/password pair is defined in JBOSS_HOME/server/default/conf/properties/jmx-console-users.properties
Now I'm wondering, what does the jmx-console webapp have to do with shutting down my JBoss instance? And since shutdown.sh is associated to jmx-console, why isn't run.sh?
I've followed the steps in securing my JBoss instance. Thus jmx-console isn't being used at all. I'm wanting to remove it alltogether, including its .properties files in the server's conf/ directory. But it seems shutting down my server correctly depends on the existenece of these .properties files.
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4097459#4097459
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4097459
18Â years, 8Â months
[JBoss Seam] - Re: Question - Can't save outjected DataModelSelection until
by jfrankman
Here is the ClientTransmittalVO class:
@Entity
|
| @NamedQueries
| ( {
| @NamedQuery(name = "findClientTransmittalByOfficeId",
| query = "select clientTransmittal from ClientTransmittalVO clientTransmittal " +
| "join fetch clientTransmittal.office office " +
| "where (office.id = :officeid and clientTransmittal.transdate=:filterDate) ")
|
|
| })
| @Table(name = "FBCLIENTTRANS")
| @Name("clientTransmittal")
| public class ClientTransmittalVO {
|
| private int id;
| private Date transdate;
| private String countycode;
| private Integer agentno;
| private String clientfirstname;
| private String clientlastname;
| private String receiptnumber;
| private Integer clientid;
| private ClientVO client;
| private FBOffice office;
|
| private Set<ClientTransmittalLineItemVO> clientTransmittalLineItemVOs = new HashSet<ClientTransmittalLineItemVO>(
| 0);
|
| public ClientTransmittalVO() {
| }
|
| public ClientTransmittalVO(int id, String countycode) {
| this.id = id;
| this.countycode = countycode;
| }
| public ClientTransmittalVO(int id, Date transdate, String countycode,
| Integer agentno, String clientfirstname, String clientlastname,
| String receiptnumber, Integer clientid,
| Set<ClientTransmittalLineItemVO> clientTransmittalLineItemVOs) {
| this.id = id;
| this.transdate = transdate;
| this.countycode = countycode;
| this.agentno = agentno;
| this.clientfirstname = clientfirstname;
| this.clientlastname = clientlastname;
| this.receiptnumber = receiptnumber;
| this.clientid = clientid;
| this.clientTransmittalLineItemVOs = clientTransmittalLineItemVOs;
| }
|
| @Id
| @Column(name = "ID", unique = true, nullable = false)
| @NotNull @GeneratedValue
| public int getId() {
| return this.id;
| }
|
| @Temporal(TemporalType.DATE)
| @Basic @Column(name = "TRANSDATE")
| @NotNull
| public Date getTransdate() {
| return this.transdate;
| }
|
| @Column(name = "COUNTYCODE", nullable = false, length = 5)
| @NotNull
| @Length(max = 5)
| public String getCountycode() {
| return this.countycode;
| }
|
| @Column(name = "AGENTNO")
| public Integer getAgentno() {
| return this.agentno;
| }
|
| @Column(name = "CLIENTFIRSTNAME", length = 50)
| @Length(max = 50)
| public String getClientfirstname() {
| return this.clientfirstname;
| }
|
| @Column(name = "CLIENTLASTNAME", length = 50)
| @Length(max = 50)
| public String getClientlastname() {
| return this.clientlastname;
| }
|
| @Column(name = "RECEIPTNUMBER", length = 10)
| @Length(max = 10)
| public String getReceiptnumber() {
| return this.receiptnumber;
| }
|
| @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "clientTransmittal")
| @OrderBy(value="lineitemid")
| @Cascade(value = org.hibernate.annotations.CascadeType.DELETE_ORPHAN) //hibernate annotation, not jpa
| public Set<ClientTransmittalLineItemVO> getClientTransmittalLineItems() {
| return this.clientTransmittalLineItemVOs;
| }
|
| @ManyToOne(cascade = {CascadeType.MERGE})
| @JoinColumn(name = "CLIENTID", nullable = false)
| @NotNull
| public ClientVO getClient() {
| return client;
| }
|
| @ManyToOne(fetch=FetchType.EAGER)
| @JoinColumn(name="OFFICEID")
| public FBOffice getOffice() {
| return office;
| }
|
| public void setId(int id) {
| this.id = id;
| }
|
| public void setTransdate(Date transdate) {
| this.transdate = transdate;
| }
|
|
|
| public void setCountycode(String countycode) {
| this.countycode = countycode;
| }
|
|
| public void setAgentno(Integer agentno) {
| this.agentno = agentno;
| }
|
|
| public void setClientfirstname(String clientfirstname) {
| this.clientfirstname = clientfirstname;
| }
|
| public void setClientlastname(String clientlastname) {
| this.clientlastname = clientlastname;
| }
|
| public void setReceiptnumber(String receiptnumber) {
| this.receiptnumber = receiptnumber;
| }
|
|
| public void setClientTransmittalLineItems(
| Set<ClientTransmittalLineItemVO> clientTransmittalLineItemVOs) {
| this.clientTransmittalLineItemVOs = clientTransmittalLineItemVOs;
| }
|
| @Transient
| public List<ClientTransmittalLineItemVO> getLineItemsList()
| {
| List<ClientTransmittalLineItemVO> list = new ArrayList<ClientTransmittalLineItemVO>(getClientTransmittalLineItems());
| return list;
|
| }
|
| public void setClient(ClientVO client) {
| this.client = client;
| }
|
| @Transient
| public void addLineItem(ClientTransmittalLineItemVO lineItem)
| {
| clientTransmittalLineItemVOs.add(lineItem);
| lineItem.setClientTransmittal(this);
| }
|
| @Transient
| public void removeLineItem(ClientTransmittalLineItemVO lineItem)
| {
| //clientTransmittalLineItemVOs.add(lineItem);
| clientTransmittalLineItemVOs.remove(lineItem);
| //lineItem.setClientTransmittal(this);
| }
|
| public void setOffice(FBOffice office) {
| this.office = office;
| }
|
| @Override
| public int hashCode() {
| final int PRIME = 31;
| int result = 1;
| result = PRIME * result + id;
| return result;
| }
|
| @Override
| public boolean equals(Object obj) {
| if (this == obj)
| return true;
| if (obj == null)
| return false;
| if (getClass() != obj.getClass())
| return false;
| final ClientTransmittalVO other = (ClientTransmittalVO) obj;
| if (id != other.id)
| return false;
| return true;
| }
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4097457#4097457
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4097457
18Â years, 8Â months
[JNDI/Naming/Network] - automatically reconnecting to LDAP-server using MBean Extern
by axismundi
We get an exception after not using the JNDI-connection for a few minutes:
javax.naming.CommunicationException: connection closed [Root exception is java.io.IOException: connection closed];
|
How can I instruct the MBean to reconnect automatically?
| <mbean code="org.jboss.naming.ExternalContext"
| name="jboss.jndi:service=ExternalContext,jndiName=external/ldap/swm">
| <attribute name="JndiName">external/ldap/swm</attribute>
| <attribute name="Properties">
| java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory
| java.naming.provider.url=ldap://svmetaprod01:389/o=SWM
| java.naming.security.principal=cn=ReadOnlyAdmin,o=swm
| java.naming.security.authentication=simple
| java.naming.security.credentials=Ca024334
| com.sun.jndi.ldap.connect.timeout=5000
| </attribute>
| <attribute name="InitialContext">javax.naming.ldap.InitialLdapContext</attribute>
| <attribute name="RemoteAccess">false</attribute>
| </mbean>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4097455#4097455
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4097455
18Â years, 8Â months
[Security & JAAS/JBoss] - ActiveDirectory for login, DB for roles-query?
by soema3
Hi everybody,
thas my big problem:
The users are saved in the ActiveDirectory on a central server. I can login with JBoss with the login-config.xml:
<application-policy name="xxx">
| <authentication>
| <login-module code="org.jboss.security.auth.spi.LdapLoginModule" flag="required">
| <module-option name="dsJndiName">java:/DefaultDS</module-option>
| <module-option name="java.naming.factory.initial">com.sun.jndi.ldap.LdapCtxFactory</module-option>
| <module-option name="java.naming.provider.url">ldap://192.168.1.10:389/DC=bsp,DC=local??base?(objectClass=*)</module-option>
| <module-option name="java.naming.security.authentication">simple</module-option>
| <module-option name="principalDNPrefix">CN=</module-option>
| <module-option name="principalDNSuffix">,CN=Users,DC=bsp,DC=local</module-option>
| <!--<module-option name="rolesCtxDN">CN=Users,DC=bsp,DC=local</module-option>-->
| <module-option name="uidAttributeID">sAMAccountName</module-option>
| <module-option name="matchOnUserDN">false</module-option>
| <!--<module-option name="roleAttributeID">cn</module-option>
| <module-option name="roleAttributeIsDN">true</module-option>-->
| </login-module>
| </authentication>
| </application-policy>
the problem is that the roles of the users are not saved in the AD. Instead i can find them in a database with columns like bit isAdmin for example.
I dont know how to add roles to the users or configurate the login-file to separate the source of the user and roles.
Have anybody a suggestion?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4097452#4097452
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4097452
18Â years, 8Â months