[jBPM] - org.jbpm.api.JbpmException: couldn't instantiate hibernate configuration class org.hibernate.cfg.Configuration
by Chaitanya Desai
Chaitanya Desai [http://community.jboss.org/people/chaitanya_d6%40yahoo.com] created the discussion
"org.jbpm.api.JbpmException: couldn't instantiate hibernate configuration class org.hibernate.cfg.Configuration"
To view the discussion, visit: http://community.jboss.org/message/537030#537030
--------------------------------------------------------------
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
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/537030#537030]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years
[EJB 3.0] - configure dlq in ejb3-interceptors-aop.xml file
by Lee Gerakos
Lee Gerakos [http://community.jboss.org/people/geneseo] created the discussion
"configure dlq in ejb3-interceptors-aop.xml file"
To view the discussion, visit: http://community.jboss.org/message/537015#537015
--------------------------------------------------------------
Hi,
I've setup the SecurityStore used with JBoss Messaging to use an ldap based authentication security domain.
The "messaging" security domain allows for an "unauthenticatedIdentity" which is not possible with the login module I am using. Instead I would like to specify the DLQUser and DLQPassword on a global basis.
I see that for ejb2, I can specify these parameters in the standardjboss.xml file that is in the conf directory.
According to http://www.jboss.org/ejb3/docs/tutorial/configuration/configuration.html http://www.jboss.org/ejb3/docs/tutorial/configuration/configuration.html the standardjboss.xml file is not used for ejb3. So I am trying to understand how I can configure the ejb3-interceptors-aop.xml file to have the DLQUser and DLQPassword listed as a default when not overridden by the MDB itself.
I see how the existence of annotations can be used in "expr" attributes. But I am not sure how to determine if a specific property is set.
So for example, if the MDB has the DLQUser/DLQPassword values set:
@MessageDriven( activationConfig = {
@ActivationConfigProperty( propertyName = "destination", propertyValue = "/queue/MyDestination" ),
@ActivationConfigProperty( propertyName = "messageSelector", propertyValue = "service_msg_type = 'instance_state'" ),
@ActivationConfigProperty( propertyName = "providerAdapterJNDI", propertyValue="java:/RemoteJMSProvider"),
@ActivationConfigProperty( propertyName = "user", propertyValue = "foo" ),
*@ActivationConfigProperty( propertyName = "DLQUser", propertyValue = "foo" ),
@ActivationConfigProperty( propertyName = "DLQPassword", propertyValue = "bar" ),*
@ActivationConfigProperty( propertyName = "password", propertyValue = "bar" ) } )
I don't want to overwrite them. But if they weren't specified, like below:
@MessageDriven( activationConfig = {
@ActivationConfigProperty( propertyName = "destination", propertyValue = "/queue/MyDestination" ),
@ActivationConfigProperty( propertyName = "messageSelector", propertyValue = "service_msg_type = 'instance_state'" ),
@ActivationConfigProperty( propertyName = "providerAdapterJNDI", propertyValue="java:/RemoteJMSProvider"),
@ActivationConfigProperty( propertyName = "user", propertyValue = "foo" ),
@ActivationConfigProperty( propertyName = "password", propertyValue = "bar" ) } )
How do I inject them in the ejb3-interceptors-aop.xml file below:
<domain name="Message Driven Bean" extends="Intercepted Bean" inheritBindings="true">
<bind pointcut="execution(public * *->*(..))">
<interceptor-ref name="org.jboss.ejb3.security.AuthenticationInterceptorFactory"/>
<interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/>
</bind>
<!-- TODO: Authorization? -->
<bind pointcut="execution(public * *->*(..))">
<interceptor-ref name="org.jboss.ejb3.tx.CMTTxInterceptorFactory"/>
<interceptor-ref name="org.jboss.ejb3.stateless.StatelessInstanceInterceptor"/>
<interceptor-ref name="org.jboss.ejb3.tx.BMTTxInterceptorFactory"/>
<interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/>
<interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/>
<!-- interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/ -->
<stack-ref name="EJBInterceptors"/>
</bind>
<annotation expr="class(*) AND !class((a)org.jboss.ejb3.annotation.Pool)">
@org.jboss.ejb3.annotation.Pool (value="StrictMaxPool", maxSize=15, timeout=10000)
</annotation>
</domain>
I also read through http://docs.jboss.org/aop/1.3/aspect-framework/reference/en/html_single/i... http://docs.jboss.org/aop/1.3/aspect-framework/reference/en/html_single/i... but didn't see anything specific to annotations with properties being specified. I see how to check for the existence of an annotation, just not one specified with values.
Any information is greatly appreciated.
Thanks!
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/537015#537015]
Start a new discussion in EJB 3.0 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years