<div dir="ltr"><p>Hi All<br></p><p><br></p><p>I have downloaded and installed 6.0.1 full and the jboss instance and web console are running</p><p><br></p><p>The eclipse project &quot;evaluation&quot; when run as a junit app is giving me this error<br>
</p><p><br></p><p>java.lang.NullPointerException</p><p>    at org.jbpm.test.JbpmJUnitBaseTestCase.cleanupSingletonSessionId(JbpmJUnitBaseTestCase.java:695)</p><p>    at org.jbpm.test.JbpmJUnitBaseTestCase.setUp(JbpmJUnitBaseTestCase.java:186)<br>
</p><p>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</p><p>    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)</p><p>    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)</p>
<p>    at java.lang.reflect.Method.invoke(Method.java:606)</p><p>    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)</p><p>    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)</p>
<p>    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)</p><p>    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)</p><p>    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)</p>
<p>    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)</p><p>    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)</p><p>    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)</p>
<p>    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)</p><p>    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)</p><p>    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)</p>
<p>    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)</p><p>    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)</p><p>    at org.junit.runners.ParentRunner.run(ParentRunner.java:309)</p>
<p>    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)</p><p>    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)</p><p>    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)</p>
<p>    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)</p><p>    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)</p><p>    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)</p>
<p><br></p><p><br></p><p>1. what is the issue here?</p><p>2. Why does the jbpm-test-6.0.1-20140120.jar need to be referenced for the solution to work? <br></p><p>3. Because of question 2 giving me problems I googled some and found this <a class="" title="Issue running sample project - jBPM 6.0.1 Final">Issue running sample project - jBPM 6.0.1 Final</a>, this comment in particular: <a class="" title="Re: Issue running sample project - jBPM 6.0.1 Final">Re: Issue running sample project - jBPM 6.0.1 Final</a><br>
</p><p>    As per that post  <a class="" title="Re: Re: Issue running sample project - jBPM 6.0.1 Final">Re: Re: Issue running sample project - jBPM 6.0.1 Final</a>, created the persistence.xml (attached) but the test code still didnt work.<br>
</p><p>   
 I copied the code and tried to run the code as follows in a main() with
 an EntityManager as recommended in the post (as attached Run.java)<br></p><p><br></p><p>    Then i get this <br></p><p>     Caused by: org.hibernate.service.jndi.JndiException: Unable to lookup JNDI name [jdbc/jbpm-ds]<br>
</p><p><br></p><p>    Most likely the persistence.xml in the test jar mentioned in (2), so i remove it from includes and rerun<br></p><p><br></p><p>    Exception on Run.java line 67 <br></p><p>   
 Exception in thread &quot;main&quot; javax.persistence.PersistenceException: No 
Persistence provider for EntityManager named org.jbpm.persistence.jpa<br></p><p><br></p><p>    Then i try to swap my boolean old to false to run the code with an EntityManager defined (Run.java line 40):</p><p><br></p><p>
    Exception raised on EntityManager </p><p><br></p><p>Exception
 in thread &quot;main&quot; javax.persistence.PersistenceException: 
[PersistenceUnit: org.jbpm.persistence.jpa.updated] Unable to build 
EntityManagerFactory</p><p>    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:930)</p><p>    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)</p>
<p>    at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:72)</p><p>    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63)</p><p>    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:47)</p>
<p>    at com.sample.Run.main(Run.java:41)</p><p>Caused by: org.hibernate.service.jndi.JndiException: Error parsing JNDI name [java:jboss/datasources/jbpmDS]</p><p>    at org.hibernate.service.jndi.internal.JndiServiceImpl.parseName(JndiServiceImpl.java:92)</p>
<p>    at org.hibernate.service.jndi.internal.JndiServiceImpl.locate(JndiServiceImpl.java:63)</p><p>  
  at 
org.hibernate.service.jdbc.connections.internal.DatasourceConnectionProviderImpl.configure(DatasourceConnectionProviderImpl.java:116)</p><p>    at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)</p>
<p>    at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)</p><p>    at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)</p>
<p>    at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.buildJdbcConnectionAccess(JdbcServicesImpl.java:223)</p><p>    at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:89)</p><p>
    at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)</p><p>    at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)</p>
<p>    at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)</p><p>    at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:78)</p><p>    at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2295)</p>
<p>    at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2291)</p><p>    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1760)</p><p>    at org.hibernate.ejb.EntityManagerFactoryImpl.&lt;init&gt;(EntityManagerFactoryImpl.java:94)</p>
<p>    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:920)</p><p>    ... 5 more</p><p>Caused
 by: javax.naming.NoInitialContextException: Need to specify class name 
in environment or system property, or as an applet parameter, or in an 
application resource file:  java.naming.factory.initial</p><p>    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)</p><p>    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)</p>
<p>    at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:344)</p><p>    at javax.naming.InitialContext.getNameParser(InitialContext.java:499)</p><p>    at org.hibernate.service.jndi.internal.JndiServiceImpl.parseName(JndiServiceImpl.java:86)</p>
<p><br></p><p><br></p><p>So how do i get it to point to the data source defined in the demo ( &lt;jta-data-source&gt;java:jboss/datasources/jbpmDS&lt;/jta-data-source&gt;)?</p><p><br></p><p>Thanks in advance,</p><p><br></p>
<p>q<br></p><p><br></p><p>   <br></p><p><br></p><p>   <br></p></div>