6 Replies Latest reply on Mar 31, 2009 5:00 PM by Jorge Ruiz

    Cannot open connection

    Daniel Wachter Newbie

      Hello


      I know, normally a Error like this points to a earlier problem in the stackTrace but I found no relevant errors...


      My stacktrace:



      15:49:08,267 INFO  [Contexts] starting up: org.jboss.seam.security.facesSecurityEvents
      15:49:08,283 INFO  [Initialization] done initializing Seam
      15:49:08,308 INFO  [SeamFilter] Initializing filter: org.jboss.seam.web.loggingFilter
      15:49:08,308 INFO  [SeamFilter] Initializing filter: org.jboss.seam.web.ajax4jsfFilter
      15:49:08,957 INFO  [CacheManager] Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory
      15:49:08,961 INFO  [LRUMapCacheFactory] Creating LRUMap cache instance using parameters: {org.apache.myfaces.trinidadinternal.DISABLE_CONTENT_COMPRESSION=true, org.apache.myfaces.trinidad.CACHE_VIEW_ROOT=false, org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER=com.sun.facelets.FaceletViewHandler, com.sun.faces.injectionProvider=org.jboss.web.jsf.integration.injection.JBossInjectionProvider, facelets.DEVELOPMENT=true, org.richfaces.SKIN=blueSky, javax.faces.DEFAULT_SUFFIX=.xhtml}
      15:49:08,961 INFO  [LRUMapCacheFactory] Creating LRUMap cache instance of default capacity
      15:49:09,006 INFO  [CacheManager] Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory
      15:49:09,007 INFO  [LRUMapCacheFactory] Creating LRUMap cache instance using parameters: {org.apache.myfaces.trinidadinternal.DISABLE_CONTENT_COMPRESSION=true, org.apache.myfaces.trinidad.CACHE_VIEW_ROOT=false, org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER=com.sun.facelets.FaceletViewHandler, com.sun.faces.injectionProvider=org.jboss.web.jsf.integration.injection.JBossInjectionProvider, facelets.DEVELOPMENT=true, org.richfaces.SKIN=blueSky, javax.faces.DEFAULT_SUFFIX=.xhtml}
      15:49:09,007 INFO  [LRUMapCacheFactory] Creating LRUMap cache instance of default capacity
      15:49:09,007 INFO  [SeamFilter] Initializing filter: org.jboss.seam.web.redirectFilter
      15:49:09,008 INFO  [SeamFilter] Initializing filter: org.jboss.seam.web.exceptionFilter
      15:49:09,008 INFO  [SeamFilter] Initializing filter: org.jboss.seam.web.multipartFilter
      15:49:09,008 INFO  [SeamFilter] Initializing filter: org.jboss.seam.debug.hotDeployFilter
      15:49:09,087 INFO  [EARDeployer] Started J2EE application: file:/opt/jboss/as_4.2.2/server/default/deploy/maxcontrol.ear
      15:49:27,515 INFO  [Contexts] starting up: org.jboss.seam.security.identity
      15:49:27,523 INFO  [Contexts] starting up: org.jboss.seam.web.session
      15:49:29,776 ERROR [STDERR] 28.02.2008 15:49:29 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/opt/jboss/as_4.2.2/server/default/tmp/deploy/tmp59856maxcontrol.ear-contents/lib/jboss-seam-mail.jar!/META-INF/seam-mail.taglib.xml
      15:49:29,807 ERROR [STDERR] 28.02.2008 15:49:29 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/opt/jboss/as_4.2.2/server/default/tmp/deploy/tmp59856maxcontrol.ear-contents/lib/jboss-seam-ui.jar!/META-INF/s.taglib.xml
      15:49:29,837 ERROR [STDERR] 28.02.2008 15:49:29 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/opt/jboss/as_4.2.2/server/default/tmp/deploy/tmp59856maxcontrol.ear-contents/lib/jsf-facelets.jar!/META-INF/jsf-core.taglib.xml
      15:49:29,909 ERROR [STDERR] 28.02.2008 15:49:29 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/opt/jboss/as_4.2.2/server/default/tmp/deploy/tmp59856maxcontrol.ear-contents/lib/jsf-facelets.jar!/META-INF/jsf-html.taglib.xml
      15:49:29,927 ERROR [STDERR] 28.02.2008 15:49:29 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/opt/jboss/as_4.2.2/server/default/tmp/deploy/tmp59856maxcontrol.ear-contents/lib/jsf-facelets.jar!/META-INF/jsf-ui.taglib.xml
      15:49:29,945 ERROR [STDERR] 28.02.2008 15:49:29 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/opt/jboss/as_4.2.2/server/default/tmp/deploy/tmp59856maxcontrol.ear-contents/lib/jsf-facelets.jar!/META-INF/jstl-core.taglib.xml
      15:49:29,955 ERROR [STDERR] 28.02.2008 15:49:29 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/opt/jboss/as_4.2.2/server/default/tmp/deploy/tmp59856maxcontrol.ear-contents/lib/jsf-facelets.jar!/META-INF/jstl-fn.taglib.xml
      15:49:30,386 ERROR [STDERR] 28.02.2008 15:49:30 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/opt/jboss/as_4.2.2/server/default/tmp/deploy/tmp59856maxcontrol.ear-contents/lib/richfaces-ui-3.1.4.GA.jar!/META-INF/a4j.taglib.xml
      15:49:30,395 ERROR [STDERR] 28.02.2008 15:49:30 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/opt/jboss/as_4.2.2/server/default/tmp/deploy/tmp59856maxcontrol.ear-contents/lib/richfaces-ui-3.1.4.GA.jar!/META-INF/ajax4jsf.taglib.xml
      15:49:30,451 ERROR [STDERR] 28.02.2008 15:49:30 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/opt/jboss/as_4.2.2/server/default/tmp/deploy/tmp59856maxcontrol.ear-contents/lib/richfaces-ui-3.1.4.GA.jar!/META-INF/rich.taglib.xml
      15:49:30,473 ERROR [STDERR] 28.02.2008 15:49:30 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/opt/jboss/as_4.2.2/server/default/tmp/deploy/tmp59856maxcontrol.ear-contents/lib/richfaces-ui-3.1.4.GA.jar!/META-INF/richfaces.taglib.xml
      15:49:30,560 ERROR [STDERR] 28.02.2008 15:49:30 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/opt/jboss/as_4.2.2/server/default/tmp/deploy/tmp59856maxcontrol.ear-contents/lib/trinidad-impl-1.2.6.jar!/META-INF/tr.taglib.xml
      15:49:30,569 ERROR [STDERR] 28.02.2008 15:49:30 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/opt/jboss/as_4.2.2/server/default/tmp/deploy/tmp59856maxcontrol.ear-contents/lib/trinidad-impl-1.2.6.jar!/META-INF/trh.taglib.xml
      15:49:39,339 INFO  [STDOUT] Hibernate: select user0_.id as id15_, user0_.language as language15_, user0_.password as password15_, user0_.email as email15_, user0_.surname as surname15_, user0_.forename as forename15_ from user user0_ where user0_.email=? limit ?
      15:49:40,219 INFO  [STDOUT] Hibernate: select alert0_.id as id0_, alert0_.dateTime as dateTime0_, alert0_.stateDescription_id as stateDe10_0_, alert0_.alertBit as alertBit0_, alert0_.subBit as subBit0_, alert0_.dysfunctionDescription_id as dysfunc11_0_, alert0_.device_id as device9_0_, alert0_.priority as priority0_, alert0_.causation_id as causation7_0_, alert0_.alertSetting_id as alertSet8_0_, alert0_.generated as generated0_ from alert alert0_ group by alert0_.device_id , alert0_.dysfunctionDescription_id
      15:49:40,237 INFO  [STDOUT] Hibernate: select statedescr0_.id as id22_0_, statedescr0_.labelKey as labelKey22_0_ from stateDescription statedescr0_ where statedescr0_.id=?
      15:49:40,240 INFO  [STDOUT] Hibernate: select dysfunctio0_.id as id19_0_, dysfunctio0_.level as level19_0_, dysfunctio0_.labelKey as labelKey19_0_, dysfunctio0_.subBit as subBit19_0_ from dysfunctionDescription dysfunctio0_ where dysfunctio0_.id=?
      15:49:40,243 INFO  [STDOUT] Hibernate: select device0_.id as id4_5_, device0_.serialNumber as serialNu3_4_5_, device0_.failureSince as failureS4_4_5_, device0_.model_id as model13_4_5_, device0_.networkAddress as networkA5_4_5_, device0_.connectionInformation as connecti6_4_5_, device0_.connectionType_id as connect15_4_5_, device0_.macAddress as macAddress4_5_, device0_.vpnPass as vpnPass4_5_, device0_.vpnUser as vpnUser4_5_, device0_.maxComNumber as maxComN10_4_5_, device0_.facility_id as facility16_4_5_, device0_.builtInPowerA as builtIn11_4_5_, device0_.builtInPowerB as builtIn12_4_5_, device0_.datalogger_id as datalogger14_4_5_, device0_.dtype as dtype4_5_, model1_.id as id11_0_, model1_.description as descript2_11_0_, model1_.deviceType_id as deviceType3_11_0_, devicetype2_.id as id18_1_, devicetype2_.labelKey as labelKey18_1_, connection3_.id as id17_2_, connection3_.labelKey as labelKey17_2_, facility4_.id as id5_3_, facility4_.address as address5_3_, facility4_.name as name5_3_, facility4_.country as country5_3_, facility4_.city as city5_3_, facility4_.zip as zip5_3_, facility4_.commission as commission5_3_, facility4_.maxcontrolStart as maxcontr8_5_3_, facility4_.maxcontrolEnd as maxcontr9_5_3_, facility4_.availability as availab10_5_3_, facility4_.perDevicePermission as perDevi11_5_3_, datalogger5_.id as id4_4_, datalogger5_.serialNumber as serialNu3_4_4_, datalogger5_.failureSince as failureS4_4_4_, datalogger5_.model_id as model13_4_4_, datalogger5_.networkAddress as networkA5_4_4_, datalogger5_.connectionInformation as connecti6_4_4_, datalogger5_.connectionType_id as connect15_4_4_, datalogger5_.macAddress as macAddress4_4_, datalogger5_.vpnPass as vpnPass4_4_, datalogger5_.vpnUser as vpnUser4_4_, datalogger5_.maxComNumber as maxComN10_4_4_, datalogger5_.facility_id as facility16_4_4_ from device device0_ left outer join model model1_ on device0_.model_id=model1_.id left outer join deviceType devicetype2_ on model1_.deviceType_id=devicetype2_.id left outer join connectionType connection3_ on device0_.connectionType_id=connection3_.id left outer join facility facility4_ on device0_.facility_id=facility4_.id left outer join device datalogger5_ on device0_.datalogger_id=datalogger5_.id where device0_.id=? and device0_.dtype in (1, 2)
      15:49:40,274 INFO  [STDOUT] Hibernate: select causation0_.id as id16_0_, causation0_.labelKey as labelKey16_0_ from causation causation0_ where causation0_.id=?
      15:49:40,277 INFO  [STDOUT] Hibernate: select alertsetti0_.id as id1_3_, alertsetti0_.user_id as user8_1_3_, alertsetti0_.occurence as occurence1_3_, alertsetti0_.active as active1_3_, alertsetti0_.dateTime as dateTime1_3_, alertsetti0_.stateDescription_id as stateDes7_1_3_, alertsetti0_.dysfunctionDescription_id as dysfunct6_1_3_, alertsetti0_.intervalMinutes as interval5_1_3_, user1_.id as id15_0_, user1_.language as language15_0_, user1_.password as password15_0_, user1_.email as email15_0_, user1_.surname as surname15_0_, user1_.forename as forename15_0_, statedescr2_.id as id22_1_, statedescr2_.labelKey as labelKey22_1_, dysfunctio3_.id as id19_2_, dysfunctio3_.level as level19_2_, dysfunctio3_.labelKey as labelKey19_2_, dysfunctio3_.subBit as subBit19_2_ from alertsetting alertsetti0_ inner join user user1_ on alertsetti0_.user_id=user1_.id inner join stateDescription statedescr2_ on alertsetti0_.stateDescription_id=statedescr2_.id inner join dysfunctionDescription dysfunctio3_ on alertsetti0_.dysfunctionDescription_id=dysfunctio3_.id where alertsetti0_.id=?
      15:49:40,284 INFO  [STDOUT] SIZE: 1
      15:49:40,527 WARN  [JDBCExceptionReporter] SQL Error: 0, SQLState: null
      15:49:40,527 ERROR [JDBCExceptionReporter] Transaction is not active: tx=TransactionImple < ac, BasicAction: -3f57fd17:92a6:47c6c94e:3b status: ActionStatus.ABORT_ONLY >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -3f57fd17:92a6:47c6c94e:3b status: ActionStatus.ABORT_ONLY >)
      15:49:40,536 ERROR [STDERR] 28.02.2008 15:49:40 com.sun.facelets.FaceletViewHandler handleRenderException
      SCHWERWIEGEND: Error Rendering View[/alertOverview.xhtml]
      javax.faces.FacesException: javax.el.ELException: /alertOverview.xhtml @38,139 value="#{graphicFactory.makeDurationGraphic(alert.device.ID, alert.dysfunctionDescription.ID, 5)}": javax.ejb.EJBTransactionRolledbackException: org.hibernate.exception.GenericJDBCException: Cannot open connection
              at javax.faces.component.UIOutput.getValue(UIOutput.java:176)
              at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:189)
              at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:320)
              at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:200)
              at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:836)
              at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:304)
              at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer.renderKids(ColumnRenderer.java:151)
              at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer._renderKids(ColumnRenderer.java:168)
              at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer._renderTD(ColumnRenderer.java:330)
              at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer._renderDataMode(ColumnRenderer.java:241)
              at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer.encodeAll(ColumnRenderer.java:96)
              at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:224)
              at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:751)
              at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:304)
              at org.apache.myfaces.trinidadinternal.renderkit.core.desktop.DesktopTableRenderer._renderRegularColumns(DesktopTableRenderer.java:998)
              at org.apache.myfaces.trinidadinternal.renderkit.core.desktop.DesktopTableRenderer.renderSingleRow(DesktopTableRenderer.java:111)
              at org.apache.myfaces.trinidadinternal.renderkit.core.desktop.DesktopTableRenderer$1.processRowImpl(DesktopTableRenderer.java:861)
              at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.TableUtils$RowLoop.processRow(TableUtils.java:117)
              at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.TableUtils$RowLoop.loop(TableUtils.java:103)
              at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.TableUtils$RowLoop.run(TableUtils.java:75)
              at org.apache.myfaces.trinidadinternal.renderkit.core.desktop.DesktopTableRenderer._renderTableRows(DesktopTableRenderer.java:912)
              at org.apache.myfaces.trinidadinternal.renderkit.core.desktop.DesktopTableRenderer.renderTableRows(DesktopTableRenderer.java:638)
              at org.apache.myfaces.trinidadinternal.renderkit.core.desktop.DesktopTableRenderer.renderTableContent(DesktopTableRenderer.java:364)
              at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.TableRenderer.encodeAll(TableRenderer.java:375)
              at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:224)
              at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:751)
              at org.apache.myfaces.trinidad.component.UIXCollection.encodeEnd(UIXCollection.java:527)
              at org.apache.myfaces.trinidad.component.UIXComponentBase.__encodeRecursive(UIXComponentBase.java:1339)
              at org.apache.myfaces.trinidad.component.UIXComponentBase.__encodeRecursive(UIXComponentBase.java:1334)
              at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeAll(UIXComponentBase.java:771)
              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
              at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
              at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:178)
              at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:176)
              at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
              at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
              at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
              at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
              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.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:238)
              at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:195)
              at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:138)
              at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              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:45)
              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:158)
              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.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
              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:262)
              at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:856)
              at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:566)
              at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1508)
              at java.lang.Thread.run(Thread.java:595)
      Caused by: javax.el.ELException: /alertOverview.xhtml @38,139 value="#{graphicFactory.makeDurationGraphic(alert.device.ID, alert.dysfunctionDescription.ID, 5)}": jav
      15:49:40,537 ERROR [STDERR] ax.ejb.EJBTransactionRolledbackException: org.hibernate.exception.GenericJDBCException: Cannot open connection
              at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)
              at javax.faces.component.UIOutput.getValue(UIOutput.java:173)
              ... 81 more
      Caused by: javax.ejb.EJBTransactionRolledbackException: org.hibernate.exception.GenericJDBCException: Cannot open connection
              at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:87)
              at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
              at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
              at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:240)
              at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:210)
              at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:84)
              at $Proxy123.makeDurationGraphic(Unknown Source)
              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.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
              at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
              at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
              at org.javassist.tmp.java.lang.Object_$$_javassist_4.makeDurationGraphic(Object_$$_javassist_4.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:329)
              at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:274)
              at org.jboss.el.parser.AstMethodSuffix.getValue(AstMethodSuffix.java:59)
              at org.jboss.el.parser.AstValue.getValue(AstValue.java:67)
              at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
              at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
              ... 82 more
      Caused by: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection
              at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:629)
              at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:73)
              at com.solarmax.maxcontrol.action.util.GraphicFactoryImpl.makeDurationGraphic(GraphicFactoryImpl.java:60)
              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:112)
              at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
              at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:44)
              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.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
              at org.jboss.seam.persistence.EntityManagerProxyInterceptor.aroundInvoke(EntityManagerProxyInterceptor.java:26)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
              at org.jboss.seam.persistence.HibernateSessionProxyInterceptor.aroundInvoke(HibernateSessionProxyInterceptor.java:27)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
              at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
              at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50)
              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.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:101)
              at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
              ... 120 more
      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:426)
              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:1547)
              at org.hibernate.loader.Loader.doQuery(Loader.java:673)
              at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
              at org.hibernate.loader.Loader.doList(Loader.java:2220)
              at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
              at org.hibernate.loader.Loader.list(Loader.java:2099)
              at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
              at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
              at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
              at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
              at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
              at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:64)
              ... 151 m
      15:49:40,538 ERROR [STDERR] ore
      Caused by: org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -3f57fd17:92a6:47c6c94e:3b status: ActionStatus.ABORT_ONLY >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -3f57fd17:92a6:47c6c94e:3b status: ActionStatus.ABORT_ONLY >)
              at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:94)
              at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:47)
              at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
              ... 165 more
      Caused by: javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -3f57fd17:92a6:47c6c94e:3b status: ActionStatus.ABORT_ONLY >
              at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:304)
              at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:396)
              at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
              at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
              ... 167 more




      My Bean:



      @Stateless
      @Name("graphicFactory")
      public class GraphicFactoryImpl implements GraphicFactory {
      
           @PersistenceContext
           private EntityManager m_EM;
           
           /**
            * The method makeDurationGraphic returns a graphic-definition
            * in form of a string.
            */
           public String makeDurationGraphic(String p_DeviceID, String p_DysfunctionDescriptionID, String p_DayCount) {
      
                
                // Select the editingStates of the given alert from the database
                
                List<EditingState> m_LastEditingsStates = m_EM.createQuery("SELECT e FROM EditingState e JOIN e.alert a WHERE a.device.ID = :deviceID AND a.dysfunctionDescription.ID = :dysfunctionDescriptionID")
                     .setParameter("deviceID", Long.valueOf(p_DeviceID))
                     .setParameter("dysfunctionDescriptionID", Long.valueOf(p_DysfunctionDescriptionID))
                     .getResultList();




      If I change the query (e.g. SELECT e FROM EditingState e) the page will be rendered without a error...


      Is there a Problem how I load the Persistence manager?


      Components file:



        <!-- Loading Entity-Manager -->
        <persistence:managed-persistence-context name="entityManager"
                                                 auto-create="true"
                                                 persistence-unit-jndi-name="java:/maxcontrolEntityManagerFactory" />



      Thank you for helping...

        • 1. Re: Cannot open connection
          Daniel Wachter Newbie


          1. I tried to change the stateless bean into a stateful bean with extendend persistence type.

          2. I tried it with removing the trinidad components



          But with both trys I get the same error...
          Any hints for this?


          It seams like I have a problem with my persistence scope...

          • 2. Re: Cannot open connection
            Srinivasan N. Raguraman Newbie

            @PersistenceContext
                 private EntityManager m_EM;


            I assume you are using a different persistence context than the one defined in the your components.xml


            Which database are you connecting to? in-memory HSQL DB? check your ds file in jboss deploy directory.

            • 3. Re: Cannot open connection
              Daniel Wachter Newbie

              The persistence context should be fine. If I query my Object like


              List<EditingState> m_LastEditingsStates = m_EM.createQuery("SELECT e FROM EditingState e")



              or


              m_EM.find(EditingState.class, "aID");




              It works perfectly, but If I try to get the bbject via other objects I get a error.


              List<EditingState> m_LastEditingsStates = m_EM.createQuery("
              SELECT e FROM EditingState e 
              JOIN e.alert a 
              WHERE a.device.ID = :deviceID 
              AND a.dysfunctionDescription.ID = :dysfunctionDescriptionID");



              • 4. Re: Cannot open connection
                Daniel Wachter Newbie

                I found the causation of the problem!
                If I call the method from my bean, it always be called twice...
                (because on the first call there are no params the query fails)


                my view:


                <h:dataTable value="#{m_Alerts}" var="alert" rows="#{m_Alerts.rowCount}">
                   <h:column>
                      <f:facet name="header">#{msg.f_aov_duration}</f:facet>
                      <h:outputText value="#{graphicFactory.makeDurationGraphic(alert.device.ID, alert.dysfunctionDescription.ID, 5)}" escape="false" />
                   </h:column>
                </h:dataTable>



                my bean:



                public String makeDurationGraphic(String p_DeviceID, String p_DysfunctionDescriptionID, String p_DayCount) {
                }



                Why my method makeDurationGraphic() is called twice?

                • 5. Re: Cannot open connection
                  Daniel Wachter Newbie

                  Now I found the cause of the problem!
                  If I launch my method within a h:output tag the method is always called one time before...


                  Example:


                  This calls the makeGraphic() method twice, the first time with param null:


                  <h:output value="#{graphicFactory.makeGraphic(Param)}">





                  This calls the makeGraphic() method one time as it should:


                  #{graphicFactory.makeGraphic(Param)}



                  Cause I want to output some html tags I have to work with h:output!
                  Is this a bug?
                  Thanx

                  • 6. Re: Cannot open connection
                    Jorge Ruiz Newbie
                    it is called multiple times because you have the method inside an interator (h:dataTable), i had the same problem when using the method inside c:forEach, which is also an iterator

                    a solution that worked for me was redefining the method so the entityManager was never called from that method.
                    let me explain myself better:

                    First i had this:

                    #{alumnoAdmin.getCiclo(alumnoestudio)} inside a <c:forEach>
                    getCiclo calls entityManager.createQuery to set the value of an object named "epa", then exception happens because this method is executed multiple times.

                    Now i have it working like this:

                    #{alumnoAdmin.getCiclo(alumnoestudio)} inside a <c:forEach>
                    getCiclo calls directly the value of "epa", but epa was already instanced and set in alumnoAdmin constructor

                    public AlumnoAdmin() {
                    epa = entityManager.createQuery(...)
                    }

                    so entityManager was called in the constructor and only in there. In other words, entityManager is never called from getCiclo (never called multiple times but once), the exception never happens.

                    hope this helps