3 Replies Latest reply on Apr 13, 2010 10:03 PM by HuiSheng Xu

    org.jbpm.api.JbpmException: couldn't instantiate hibernate configuration class org.hibernate.cfg.Configuration

    Chaitanya Desai Newbie

      Hello ,

               I am new to jBPM . I installed jBPM 4.3 on Jboss 5.1 after making required changes in the build.xml within the install Folder.  I deploy the sample examples into JBOSS and then try to run one of them as JUNIT test. However I receive this error :

       

       

      ## EXCEPTION ###########################################
      17:24:56,456 INF | [DefaultCommandService] exception while executing command org.jbpm.pvm.internal.cmd.CheckDbCmd@fd68b1
      org.jbpm.api.JbpmException: couldn't instantiate hibernate configuration class org.hibernate.cfg.Configuration
      at org.jbpm.pvm.internal.wire.descriptor.HibernateConfigurationDescriptor.construct(HibernateConfigurationDescriptor.java:64)
      at org.jbpm.pvm.internal.wire.WireContext.construct(WireContext.java:469)
      at org.jbpm.pvm.internal.wire.WireContext.create(WireContext.java:448)
      at org.jbpm.pvm.internal.wire.WireContext.create(WireContext.java:437)
      at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:417)
      at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:327)
      at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:688)
      at org.jbpm.pvm.internal.wire.descriptor.HibernateSessionFactoryDescriptor.construct(HibernateSessionFactoryDescriptor.java:57)
      at org.jbpm.pvm.internal.wire.WireContext.construct(WireContext.java:469)
      at org.jbpm.pvm.internal.wire.WireContext.create(WireContext.java:448)
      at org.jbpm.pvm.internal.wire.WireContext.create(WireContext.java:437)
      at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:417)
      at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:327)
      at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:688)
      at org.jbpm.pvm.internal.env.BasicEnvironment.get(BasicEnvironment.java:139)
      at org.jbpm.pvm.internal.env.BasicEnvironment.get(BasicEnvironment.java:130)
      at org.jbpm.pvm.internal.wire.descriptor.HibernateSessionDescriptor.construct(HibernateSessionDescriptor.java:63)
      at org.jbpm.pvm.internal.wire.WireContext.construct(WireContext.java:469)
      at org.jbpm.pvm.internal.wire.WireContext.create(WireContext.java:448)
      at org.jbpm.pvm.internal.wire.WireContext.create(WireContext.java:437)
      at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:417)
      at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:327)
      at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:688)
      at org.jbpm.pvm.internal.env.BasicEnvironment.get(BasicEnvironment.java:139)
      at org.jbpm.pvm.internal.env.BasicEnvironment.get(BasicEnvironment.java:130)
      at org.jbpm.pvm.internal.env.EnvironmentImpl.getFromCurrent(EnvironmentImpl.java:201)
      at org.jbpm.pvm.internal.env.EnvironmentImpl.getFromCurrent(EnvironmentImpl.java:190)
      at org.jbpm.pvm.internal.cmd.CheckDbCmd.execute(CheckDbCmd.java:44)
      at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
      at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:54)
      at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
      at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
      at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
      at org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:43)
      at org.jbpm.pvm.internal.processengine.ProcessEngineImpl.checkDb(ProcessEngineImpl.java:152)
      at org.jbpm.pvm.internal.processengine.ProcessEngineImpl.<init>(ProcessEngineImpl.java:105)
      at org.jbpm.pvm.internal.cfg.ConfigurationImpl.buildProcessEngine(ConfigurationImpl.java:94)
      at org.jbpm.api.Configuration.getProcessEngine(Configuration.java:121)
      at org.jbpm.test.JbpmTestCase.initialize(JbpmTestCase.java:83)
      at org.jbpm.test.JbpmTestCase.setUp(JbpmTestCase.java:78)
      at org.jbpm.examples.async.activity.AsyncActivityTest.setUp(AsyncActivityTest.java:38)
      at junit.framework.TestCase.runBare(TestCase.java:128)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:120)
      at junit.framework.TestSuite.runTest(TestSuite.java:230)
      at junit.framework.TestSuite.run(TestSuite.java:225)
      at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
      Caused by: org.jbpm.api.JbpmException: couldn't construct new 'org.hibernate.cfg.Configuration' with args null
      at org.jbpm.pvm.internal.util.ReflectUtil.newInstance(ReflectUtil.java:117)
      at org.jbpm.pvm.internal.util.ReflectUtil.newInstance(ReflectUtil.java:88)
      at org.jbpm.pvm.internal.wire.descriptor.HibernateConfigurationDescriptor.construct(HibernateConfigurationDescriptor.java:62)
      ... 53 more
      Caused by: java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      at org.jbpm.pvm.internal.util.ReflectUtil.newInstance(ReflectUtil.java:114)
      ... 55 more
      Caused by: java.lang.ExceptionInInitializerError
      at org.hibernate.cfg.Configuration.reset(Configuration.java:201)
      at org.hibernate.cfg.Configuration.<init>(Configuration.java:220)
      at org.hibernate.cfg.Configuration.<init>(Configuration.java:224)
      ... 60 more
      Caused by: java.lang.NullPointerException
      at org.hibernate.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:167)
      at org.hibernate.cfg.Environment.<clinit>(Environment.java:558)
      ... 63 more
      ### EXCEPTION ###########################################

       

      Can any one help me in understanding and solving this exception ?

       

      -Regards,

      Chaitanya Desai