0 Replies Latest reply on Apr 1, 2015 8:15 PM by Jeferson Dal Molin

    I'm getting java.sql.SQLException: No suitable driver found for jdbc:h2:mem:test

    Jeferson Dal Molin Newbie

      Hi all!

       

      When executing line 2 below, I'm getting: java.sql.SQLException: No suitable driver found for jdbc:h2:mem:test

       

      EntityManagerFactory emfTask = Persistence.createEntityManagerFactory( "org.jbpm.task" );

      TaskService taskService = new TaskService(emfTask, SystemEventListenerFactory.getSystemEventListener());

       

      Attached to the message there's my persistence.xml and standalone.xml files (I'm using JBoss AS 7.1.1).

       

      Does anyone have a clue how I can fix this?

       

      The complete log entries are:

       

      21:00:09,867 WARN  [org.jbpm.task.service.persistence.TaskLocalTransactionManager] (http-localhost-127.0.0.1-8080-1) Unable to begin transaction: javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: Could not open connection

        at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1361) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]

        at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1289) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]

        at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:1371) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]

        at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:60) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]

        at org.jbpm.task.service.persistence.TaskLocalTransactionManager.begin(TaskLocalTransactionManager.java:42) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final]

        at org.jbpm.task.service.persistence.TaskPersistenceManager.beginTransaction(TaskPersistenceManager.java:100) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final]

        at org.jbpm.task.service.persistence.TaskPersistenceManager.getUnescalatedDeadlines(TaskPersistenceManager.java:177) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final]

        at org.jbpm.task.service.TaskServiceSession.scheduleUnescalatedDeadlines(TaskServiceSession.java:242) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final]

        at org.jbpm.task.service.TaskService.initialize(TaskService.java:134) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final]

        at org.jbpm.task.service.TaskService.initialize(TaskService.java:119) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final]

        at org.jbpm.task.service.TaskService.<init>(TaskService.java:97) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final]

        at JbpmAPIUtil.addUsu(Unknown Source) at ClickAction.addUsers(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_67]

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_67]

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_67]

        at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_67]

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

        at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278) [jbossweb-7.0.13.Final.jar:]

        at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105) [jsf-impl-2.1.7-jbossorg-2.jar:]

        at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

        at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102) [jsf-impl-2.1.7-jbossorg-2.jar:]

        at javax.faces.component.UICommand.broadcast(UICommand.java:315) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

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

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

        at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81) [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.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(Thread.java:745) [rt.jar:1.7.0_67]

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

        at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:131) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

        at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:47) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

        at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

        at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

        at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:304) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

        at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.getConnection(LogicalConnectionImpl.java:169) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

        at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doBegin(JdbcTransaction.java:67) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

        at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.begin(AbstractTransactionImpl.java:160) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

        at org.hibernate.internal.SessionImpl.beginTransaction(SessionImpl.java:1263) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

        at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:57) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]

        ... 39 more

      Caused by: java.sql.SQLException: No suitable driver found for jdbc:h2:mem:test

        at java.sql.DriverManager.getConnection(DriverManager.java:596) [rt.jar:1.7.0_67]

        at java.sql.DriverManager.getConnection(DriverManager.java:187) [rt.jar:1.7.0_67]

        at org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl.getConnection(DriverManagerConnectionProviderImpl.java:173) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

        at org.hibernate.internal.AbstractSessionImpl$NonContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:276) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

        at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:297) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

        ... 44 more