8 Replies Latest reply on Mar 15, 2012 4:11 PM by Karsten Wutzke

    Strange javax.resource.ResourceException: IJ000459: Transaction is not active: tx=TransactionImple < ac, BasicAction (EJB + JSF 2 view-scoped + CMT)

    Karsten Wutzke Expert

      Hello,

       

      I have the following strange exception for a page. Let me try to explain, it's tough. OK, I have a join table between prequalifications and companies (n companies participate in one "PQ", both interconnected entities have simple integer IDs):

       

      DDL:

      {code}

      CREATE TABLE Partnerships

      (

        prequalification_id INTEGER            NOT NULL,

        company_id          INTEGER            NOT NULL,

        ordinal_nbr         SMALLINT DEFAULT 0 NOT NULL,

       

        PRIMARY KEY (prequalification_id, company_id),

        FOREIGN KEY (prequalification_id) REFERENCES Prequalifications (id),

        FOREIGN KEY (company_id) REFERENCES Companies (id)

      );{code}

      I also use an ordinal number to keep track of the order of the companies per PQ. Likely correct JPA mapping from Prequalification entity using the JPA 2 @OrderColumn:

      {code}

      @Entity

      @Table(name = "Prequalifications")

      public class Prequalification implements Serializable

      {

          ...

       

          @ManyToMany

          @JoinTable(name = "Partnerships", joinColumns = @JoinColumn(name = "prequalification_id", referencedColumnName = "id", insertable = false, updatable = false), inverseJoinColumns = @JoinColumn(name = "company_id", referencedColumnName = "id", insertable = false, updatable = false))

          @OrderColumn(name = "ordinal_nbr", nullable = false)

          private List<Company> companies;

       

          ...

      }

      {code}

      Here ordinal_nbr is the JPA order column (starting at zero), but in the DB I have some old and wrong data for the ordinal_nbr:

      {code}INSERT INTO Partnerships (prequalification_id, company_id, ordinal_nbr) VALUES

      (1, 1, 1),

       

      (2, 1, 1),

      (2, 5, 2),

      (2, 3, 3),

      (2, 7, 4),

       

      (3, 1, 1),

      (3, 9, 2),

      (3, 3, 3),

       

      (4, 1, 1),

      (4, 9, 2),

       

      (5, 1, 1),

       

      (7, 1, 1),

       

      (9, 1, 1),

      (9, 9, 2),

      (9, 3, 3),

      (9, 7, 4),

       

      (10, 1, 0),

      (10, 10, 2),

      (10, 5, 3),

       

      (11, 1, 0),

       

      (12, 1, 1),

      (12, 7, 2),

      (12, 3, 3),

      (12, 10, 4),

       

      (13, 1, 0),

      (13, 5, 1),

       

      (14, 1, 0),

      (14, 11, 1),

       

      (15, 1, 0),

      (15, 10, 1),

       

      (17, 1, 0),

      (17, 10, 1),

      (17, 5, 2),

       

      (18, 1, 0),

      (18, 11, 1),

      (18, 5, 2);{code}

      Loading pages with ID 11, 13, 14, 15, 17, and 18 work, because their ordinal_nbr starts at 0 and has no gaps (which 10 has for example). All others fail with the below exception (see last column in the SQL INSERTs). I have no idea why this happens on JBoss AS 7.1. Here's the exception:

      {code}

      java.lang.IllegalStateException: JBAS011048: Failed to construct component instance

      at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:163)

      at org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:95)

      at org.jboss.as.web.deployment.component.WebComponentInstantiator$2.<init>(WebComponentInstantiator.java:96)

      at org.jboss.as.web.deployment.component.WebComponentInstantiator.initializeInstance(WebComponentInstantiator.java:94)

      at org.jboss.as.web.deployment.WebInjectionContainer.newInstance(WebInjectionContainer.java:86)

      at org.jboss.as.web.deployment.jsf.JsfInjectionProvider.invokePostConstruct(JsfInjectionProvider.java:69)

      at com.sun.faces.mgbean.BeanBuilder.invokePostConstruct(BeanBuilder.java:223)

      at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:105)

      at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:409)

      at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:269)

      at com.sun.faces.el.ManagedBeanELResolver.resolveBean(ManagedBeanELResolver.java:244)

      at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:116)

      at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)

      at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)

      at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:72)

      at org.apache.el.parser.AstValue.getValue(AstValue.java:147)

      at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:189)

      at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50)

      at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)

      at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:68)

      at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:189)

      at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50)

      at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)

      at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)

      at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182)

      at javax.faces.component.UIOutput.getValue(UIOutput.java:169)

      at com.sun.faces.renderkit.html_basic.MenuRenderer.getCurrentSelectedValues(MenuRenderer.java:648)

      at com.sun.faces.renderkit.html_basic.MenuRenderer.renderOptions(MenuRenderer.java:749)

      at com.sun.faces.renderkit.html_basic.MenuRenderer.renderSelect(MenuRenderer.java:844)

      at com.sun.faces.renderkit.html_basic.MenuRenderer.encodeEnd(MenuRenderer.java:298)

      at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)

      at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:312)

      at com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(GridRenderer.java:185)

      at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:129)

      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)

      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1757)

      at org.richfaces.renderkit.RendererBase.renderChildren(RendererBase.java:276)

      at org.richfaces.renderkit.html.PanelRenderer.encodeEnd(PanelRenderer.java:181)

      at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)

      at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:312)

      at com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(GridRenderer.java:185)

      at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:129)

      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)

      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1757)

      at org.richfaces.renderkit.RendererBase.renderChildren(RendererBase.java:276)

      at org.richfaces.renderkit.html.CollapsiblePanelRenderer.encodeContent(CollapsiblePanelRenderer.java:215)

      at org.richfaces.renderkit.html.CollapsiblePanelRenderer.encodeContentChild(CollapsiblePanelRenderer.java:159)

      at org.richfaces.renderkit.html.CollapsiblePanelRenderer.doEncodeChildren(CollapsiblePanelRenderer.java:152)

      at org.richfaces.renderkit.RendererBase.encodeChildren(RendererBase.java:157)

      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)

      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1757)

      at javax.faces.render.Renderer.encodeChildren(Renderer.java:168)

      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)

      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1757)

      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1760)

      at org.richfaces.renderkit.html.LayoutRenderer.renderLayout(LayoutRenderer.java:41)

      at org.richfaces.renderkit.html.LayoutRenderer.doEncodeChildren(LayoutRenderer.java:79)

      at org.richfaces.renderkit.RendererBase.encodeChildren(RendererBase.java:157)

      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)

      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1757)

      at org.richfaces.renderkit.RendererBase.renderChildren(RendererBase.java:276)

      at org.richfaces.renderkit.html.PageRenderer.encodeChildren(PageRenderer.java:338)

      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)

      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1757)

      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1760)

      at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:402)

      at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)

      at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288)

      at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288)

      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)

      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)

      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)

      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

      at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

      at org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

      at org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)

      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)

      at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)

      at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:154)

      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)

      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)

      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)

      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)

      at java.lang.Thread.run(Unknown Source)

      Caused by: javax.ejb.EJBTransactionRolledbackException: org.hibernate.exception.GenericJDBCException: Could not open connection

      at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleInCallerTx(CMTTxInterceptor.java:139)

      at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:204)

      at org.jboss.as.ejb3.tx.CMTTxInterceptor.mandatory(CMTTxInterceptor.java:257)

      at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:184)

      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

      at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)

      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

      at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)

      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

      at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)

      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

      at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)

      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

      at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

      at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165)

      at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:173)

      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

      at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

      at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:72)

      at de.poyry.pqgenerator.service.PqService$$$view42.findSinglePq(Unknown Source)

      at de.poyry.pqgenerator.facade.PqHome.init(PqHome.java:137)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

      at java.lang.reflect.Method.invoke(Unknown Source)

      at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptorFactory$ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptorFactory.java:130)

      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

      at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)

      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

      at org.jboss.as.weld.injection.WeldInjectionInterceptor.processInvocation(WeldInjectionInterceptor.java:73)

      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

      at org.jboss.as.ee.component.ManagedReferenceFieldInjectionInterceptorFactory$ManagedReferenceFieldInjectionInterceptor.processInvocation(ManagedReferenceFieldInjectionInterceptorFactory.java:112)

      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

      at org.jboss.as.ee.component.ManagedReferenceFieldInjectionInterceptorFactory$ManagedReferenceFieldInjectionInterceptor.processInvocation(ManagedReferenceFieldInjectionInterceptorFactory.java:112)

      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

      at org.jboss.as.ee.component.ManagedReferenceFieldInjectionInterceptorFactory$ManagedReferenceFieldInjectionInterceptor.processInvocation(ManagedReferenceFieldInjectionInterceptorFactory.java:112)

      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

      at org.jboss.as.ee.component.ManagedReferenceFieldInjectionInterceptorFactory$ManagedReferenceFieldInjectionInterceptor.processInvocation(ManagedReferenceFieldInjectionInterceptorFactory.java:112)

      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

      at org.jboss.as.ee.component.ManagedReferenceFieldInjectionInterceptorFactory$ManagedReferenceFieldInjectionInterceptor.processInvocation(ManagedReferenceFieldInjectionInterceptorFactory.java:112)

      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

      at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)

      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

      at org.jboss.as.ee.component.ManagedReferenceInterceptorFactory$ManagedReferenceInterceptor.processInvocation(ManagedReferenceInterceptorFactory.java:106)

      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

      at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)

      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

      at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)

      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

      at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

      at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:161)

      ... 95 more

      Caused by: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection

      at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1361)

      at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:816)

      at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:770)

      at org.jboss.as.jpa.container.AbstractEntityManager.find(AbstractEntityManager.java:193)

      at de.poyry.pqgenerator.service.JpaCrudService.find(JpaCrudService.java:65)

      at de.poyry.pqgenerator.service.PqService.findSinglePq(PqService.java:44)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

      at java.lang.reflect.Method.invoke(Unknown Source)

      at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72)

      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

      at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:374)

      at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:127)

      at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:135)

      at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36)

      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

      at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)

      at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36)

      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

      at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)

      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

      at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:84)

      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

      at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)

      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

      at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

      at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53)

      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

      at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)

      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

      at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:202)

      ... 144 more

      Caused by: org.hibernate.exception.GenericJDBCException: Could not open connection

      at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:52)

      at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)

      at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)

      at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:304)

      at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.getConnection(LogicalConnectionImpl.java:169)

      at org.hibernate.engine.jdbc.internal.proxy.ConnectionProxyHandler.extractPhysicalConnection(ConnectionProxyHandler.java:82)

      at org.hibernate.engine.jdbc.internal.proxy.ConnectionProxyHandler.continueInvocation(ConnectionProxyHandler.java:138)

      at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81)

      at $Proxy112.prepareStatement(Unknown Source)

      at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$5.doPrepare(StatementPreparerImpl.java:147)

      at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:166)

      at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareQueryStatement(StatementPreparerImpl.java:145)

      at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1739)

      at org.hibernate.loader.Loader.doQuery(Loader.java:828)

      at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:289)

      at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)

      at org.hibernate.loader.Loader.loadEntity(Loader.java:2058)

      at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:82)

      at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:72)

      at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3697)

      at org.hibernate.event.internal.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:439)

      at org.hibernate.event.internal.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:420)

      at org.hibernate.event.internal.DefaultLoadEventListener.load(DefaultLoadEventListener.java:204)

      at org.hibernate.event.internal.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:251)

      at org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:148)

      at org.hibernate.internal.SessionImpl.fireLoad(SessionImpl.java:954)

      at org.hibernate.internal.SessionImpl.get(SessionImpl.java:870)

      at org.hibernate.internal.SessionImpl.get(SessionImpl.java:863)

      at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:795)

      ... 174 more

      Caused by: java.sql.SQLException: javax.resource.ResourceException: IJ000460: Error checking for a transaction

      at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:137)

      at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:67)

      at org.hibernate.internal.AbstractSessionImpl$NonContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:276)

      at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:297)

      ... 199 more

      Caused by: javax.resource.ResourceException: IJ000460: Error checking for a transaction

      at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:362)

      at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:464)

      at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:129)

      ... 202 more

      Caused by: javax.resource.ResourceException: IJ000459: Transaction is not active: tx=TransactionImple < ac, BasicAction: 0:ffffc0a8b216:-6517148a:4f60ec82:5d0 status: ActionStatus.ABORT_ONLY >

      at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:352)

      ... 204 more

      {code}

      Again what makes it so strange is that it only happens on a few entities (it's a details page for an entity + much more). Some ID's just work fine.

       

      The exception stems from a JSF managed bean referenced from the page when loading (init() method on a JSF 2 @ViewScoped bean):

      {code} at de.poyry.pqgenerator.service.PqService$$$view49.findSinglePq(Unknown Source)

      at de.poyry.pqgenerator.facade.PqHome.init(PqHome.java:137){code}

      which there is:

      {code}

      @ManagedBean

      @ViewScoped

      public class PqHome implements DropListener, Serializable

      {

          ...

       

          private Prequalification pq;

       

          @EJB

          private PqService pqService;

       

          ...

       

          @PostConstruct

          public void init()

          {

              ...

       

              pq = pqService.findSinglePq(pqId);        //     <------      line 137

       

              ...

          }

      }

      {code}

      Why is this exception thrown on some IDs only? Why does it hint a transaction problem? Why does the exception have such a strange signature? What can I do about this?

       

      I tried @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) and @TransactionAttribute(TransactionAttributeType.REQUIRED) on the PqHome class, but it's no difference. (DOES IT WORK THAT WAY AT ALL? Where do I put the transaction annotations if not here?)

       

      Thanks for ANY help

       

      Karsten

        • 1. Re: Strange javax.resource.ResourceException: IJ000459: Transaction is not active: tx=TransactionImple < ac, BasicAction (EJB + JSF 2 view-scoped + CMT)
          Scott Marlow Master

          Enable TRACE logging, get the error to occur again and attach the server.log output.  We can look for clues as to why the transaction is marked ABORT_ONLY.

           

          Are you on the latest AS (7.1.1) build?

          • 3. Re: Strange javax.resource.ResourceException: IJ000459: Transaction is not active: tx=TransactionImple < ac, BasicAction (EJB + JSF 2 view-scoped + CMT)
            Scott Marlow Master

            Can you repeat the test but also change the following in standalone.xml:

             

             

            <logger category="com.arjuna">

                            <level name="WARN"/>

                        </logger>

             

            Change to:

             

             

            <logger category="com.arjuna">

                            <level name="TRACE"/>

                        </logger>

             

            And attach the server.log again.

             

            Scott

            • 5. Re: Strange javax.resource.ResourceException: IJ000459: Transaction is not active: tx=TransactionImple < ac, BasicAction (EJB + JSF 2 view-scoped + CMT)
              Scott Marlow Master

              The 'transaction is not active' error is caused by a null pointer exception at de.poyry.pqgenerator.service.DocumentService.findDocumentsFor() line 50.  you need to eliminate the null pointer exception.

              15:12:19,589 ERROR [org.jboss.ejb3.invocation] (http-localhost-127.0.0.1-8080-3) JBAS014134: EJB Invocation failed on component DocumentService for method public java.util.List de.poyry.pqgenerator.service.DocumentService.findDocumentsFor(java.util.List): javax.ejb.EJBTransactionRolledbackException

                  at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleInCallerTx(CMTTxInterceptor.java:139) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:204) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.as.ejb3.tx.CMTTxInterceptor.mandatory(CMTTxInterceptor.java:257) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:184) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:173) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:72) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                  at de.poyry.pqgenerator.service.DocumentService$$$view6.findDocumentsFor(Unknown Source) [classes:]

                  at de.poyry.pqgenerator.facade.PqHome.findRandomDocumentFor(PqHome.java:686) [classes:]

                  at de.poyry.pqgenerator.facade.PqHome.buildFullModel(PqHome.java:512) [classes:]

                  at de.poyry.pqgenerator.facade.PqHome.init(PqHome.java:163) [classes:]

                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_02]

                  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.7.0_02]

                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.7.0_02]

                  at java.lang.reflect.Method.invoke(Unknown Source) [rt.jar:1.7.0_02]

                  at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptorFactory$ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptorFactory.java:130) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.as.weld.injection.WeldInjectionInterceptor.processInvocation(WeldInjectionInterceptor.java:73) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.as.ee.component.ManagedReferenceFieldInjectionInterceptorFactory$ManagedReferenceFieldInjectionInterceptor.processInvocation(ManagedReferenceFieldInjectionInterceptorFactory.java:112) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.as.ee.component.ManagedReferenceFieldInjectionInterceptorFactory$ManagedReferenceFieldInjectionInterceptor.processInvocation(ManagedReferenceFieldInjectionInterceptorFactory.java:112) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.as.ee.component.ManagedReferenceFieldInjectionInterceptorFactory$ManagedReferenceFieldInjectionInterceptor.processInvocation(ManagedReferenceFieldInjectionInterceptorFactory.java:112) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.as.ee.component.ManagedReferenceFieldInjectionInterceptorFactory$ManagedReferenceFieldInjectionInterceptor.processInvocation(ManagedReferenceFieldInjectionInterceptorFactory.java:112) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.as.ee.component.ManagedReferenceFieldInjectionInterceptorFactory$ManagedReferenceFieldInjectionInterceptor.processInvocation(ManagedReferenceFieldInjectionInterceptorFactory.java:112) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.as.ee.component.ManagedReferenceInterceptorFactory$ManagedReferenceInterceptor.processInvocation(ManagedReferenceInterceptorFactory.java:106) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:161) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:95) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.as.web.deployment.component.WebComponentInstantiator$2.<init>(WebComponentInstantiator.java:96) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.as.web.deployment.component.WebComponentInstantiator.initializeInstance(WebComponentInstantiator.java:94) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.as.web.deployment.WebInjectionContainer.newInstance(WebInjectionContainer.java:86) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.as.web.deployment.jsf.JsfInjectionProvider.invokePostConstruct(JsfInjectionProvider.java:69) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

                  at com.sun.faces.mgbean.BeanBuilder.invokePostConstruct(BeanBuilder.java:223) [jsf-impl-2.1.7-jbossorg-2.jar:]

                  at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:105) [jsf-impl-2.1.7-jbossorg-2.jar:]

                  at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:409) [jsf-impl-2.1.7-jbossorg-2.jar:]

                  at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:269) [jsf-impl-2.1.7-jbossorg-2.jar:]

                  at com.sun.faces.el.ManagedBeanELResolver.resolveBean(ManagedBeanELResolver.java:244) [jsf-impl-2.1.7-jbossorg-2.jar:]

                  at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:116) [jsf-impl-2.1.7-jbossorg-2.jar:]

                  at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176) [jsf-impl-2.1.7-jbossorg-2.jar:]

                  at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203) [jsf-impl-2.1.7-jbossorg-2.jar:]

                  at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:72) [jbossweb-7.0.13.Final.jar:]

                  at org.apache.el.parser.AstValue.getTarget(AstValue.java:94) [jbossweb-7.0.13.Final.jar:]

                  at org.apache.el.parser.AstValue.getType(AstValue.java:82) [jbossweb-7.0.13.Final.jar:]

                  at org.apache.el.ValueExpressionImpl.getType(ValueExpressionImpl.java:176) [jbossweb-7.0.13.Final.jar:]

                  at org.jboss.weld.el.WeldValueExpression.getType(WeldValueExpression.java:93) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                  at com.sun.faces.facelets.el.TagValueExpression.getType(TagValueExpression.java:98) [jsf-impl-2.1.7-jbossorg-2.jar:]

                  at javax.faces.convert.NumberConverter.getAsObject(NumberConverter.java:584) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                  at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:171) [jsf-impl-2.1.7-jbossorg-2.jar:]

                  at javax.faces.component.UIViewParameter.getConvertedValue(UIViewParameter.java:394) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                  at javax.faces.component.UIInput.validate(UIInput.java:960) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                  at javax.faces.component.UIInput.executeValidate(UIInput.java:1233) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                  at javax.faces.component.UIInput.processValidators(UIInput.java:698) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                  at javax.faces.component.UIViewParameter.processValidators(UIViewParameter.java:273) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                  at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1214) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                  at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1214) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                  at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:1172) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                  at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76) [jsf-impl-2.1.7-jbossorg-2.jar:]

                  at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.7-jbossorg-2.jar:]

                  at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [jsf-impl-2.1.7-jbossorg-2.jar:]

                  at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]

                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

                  at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]

                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

                  at org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65) [solder-impl-3.1.0.Final.jar:3.1.0.Final]

                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]

                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

                  at org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74) [solder-impl-3.1.0.Final.jar:3.1.0.Final]

                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]

                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

                  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]

                  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]

                  at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

                  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]

                  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]

                  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]

                  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]

                  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]

                  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]

                  at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]

                  at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_02]

              Caused by: java.lang.NullPointerException

                  at de.poyry.pqgenerator.service.DocumentService.findDocumentsFor(DocumentService.java:50) [classes:]

                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_02]

                  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.7.0_02]

                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.7.0_02]

                  at java.lang.reflect.Method.invoke(Unknown Source) [rt.jar:1.7.0_02]

                  at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:374) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:127) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:135) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:82) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                  at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:202) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                  ... 107 more

              • 6. Re: Strange javax.resource.ResourceException: IJ000459: Transaction is not active: tx=TransactionImple < ac, BasicAction (EJB + JSF 2 view-scoped + CMT)
                Karsten Wutzke Expert

                Solved, thanks.......... why didn't I know this before? (rethoric)

                 

                But honestly, why aren't ERROR level messages shown when having the console logger configured to INFO level?

                 

                Karsten

                • 7. Re: Strange javax.resource.ResourceException: IJ000459: Transaction is not active: tx=TransactionImple < ac, BasicAction (EJB + JSF 2 view-scoped + CMT)
                  Scott Marlow Master

                  Do you happen to have a 'server.log' that experiences this error without trace logging?  I would like to see if the null pointer was there and we missed it or not.  If its like you said, only showing the NullPointerException if TRACE logging is enabled, we will need to fix that.

                   

                  Scott

                  • 8. Re: Strange javax.resource.ResourceException: IJ000459: Transaction is not active: tx=TransactionImple < ac, BasicAction (EJB + JSF 2 view-scoped + CMT)
                    Karsten Wutzke Expert

                    My fault, it's all there. I've just missed the NPE at all times. I never paid attention to the stack traces before the last two or three. I have no idea why the container keeps repeating the stack trace so many times, effectively hiding the real cause somewhere inbetween.

                     

                    The problem can be seen in the attached server log. There's the same stack trace and you just tend to jump to the end and then scroll up a little and when you keep seeing the same trace over and over, why bother scrolling up even further? I'd never expect the cause near the top of the log. As you can see from the server log attached, it has been emptied before inspection, but I would say it's almost impossible to find such a stack trace in an unemptied server log. IMHO

                     

                    If there's anything to be fixed it should rather be the repetitiveness of the stack traces and maybe the order of the real cause, if that makes sense.

                     

                    Karsten