Changing the database to Oracle-Problem
dnyanesh.ginde Jan 26, 2011 6:09 AMHello,
I am using JBoss AS 5.1.09(jdk 1.6 version) with JBoss ESB 4.9 deployed on the JBoss AS. When I test the quickstart "bpm_orchestration2" using the default HSQL DB everything seems to work fine and I get the desired output as given in readme.txt.
Now I change the database to Oracle(Oracle XE) by following the steps mentioned below:
Switching database from HSQLDB to Oracle:
1) Remove deploy/hsqldb-ds.xml and add the following in a file named deploy/oracle-ds.
xml:
2) Replace deploy/jbossesb-registry.sar/juddi-ds.xml with the same configuration in
the previous step (change the database name if needed).
Make sure to keep the jndi-name(juddiDB).
3) Replace deploy/jbossesb.esb/message-store-ds.xml with the same configuration in
step one (change the database).
Again make sure the keep the jndi-name(JBossESBDS).
4) Replace the database name in the 'message-store-sql' element in deploy/jbossesb.esb/
jbossesb-service.xml.
5) Edit jbossesb-registry.sar/juddi_config/META-INF/persistence.xml. The hibernate.dialect property
must be set to "org.hibernate.dialect.OracleDialect".
6) Replace deploy/messaging/hsqldb-persistence-service.xml with the
oracle-persistence-service.xml.
7) Copy ojdbc14.jar to servers lib directory.
Now change the database for jbpm:
1) Change the dialect in deploy/jbpm.esb/hibernate.cfg.xml to <property name="hibernate.dialect">org.hibernate.dialect.OracleDialect</property>
2) Change the local datasource in deploy/jbpm.esb/jbpm-ds.xml.
3) Change the sql file name in deploy/jbpm.esb/jbpm-service.xml to jbpm-sql/jbpm.jpdl.oracle.sql.
When I start the server I can see no errors and all the tables have been created in the Oracle XE Database.
I change the "dbstore" values to point to my new DB in the jbossesb-properties.xml of the quickstart "bpm_orchestration2".
Then I test the quickstart "bpm_orchestration2" as given in readme.txt.
The ant deploy and ant deployProcess seem to work fine and I can see the deployed process in jbpm-console.
The ant startProcess also seems to work fine however when I look at the server console I get the following exception:
[STDOUT] (pool-21-thread-1) Message structure: 2011-01-26 15:51:00,009 INFO [STDOUT] (pool-21-thread-1) [ message: [ JBOSS_XML ] header: [ To: JMSEpr [ PortReference < <wsa:Address jms:127.0.0.1:1099#queue/quickstart_bpm_orchestration2_start_Request_esb/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>, <wsa:ReferenceProperties jbossesb:java.naming.provider.url : 127.0.0.1:1099/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.url.pkgs : org.jnp.interfaces/>, <wsa:ReferenceProperties jbossesb:destination-type : queue/>, <wsa:ReferenceProperties jbossesb:destination-name : queue/quickstart_bpm_orchestration2_start_Request_esb/>, <wsa:ReferenceProperties jbossesb:specification-version : 1.1/>, <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/>, <wsa:ReferenceProperties jbossesb:persistent : true/>, <wsa:ReferenceProperties jbossesb:acknowledge-mode : AUTO_ACKNOWLEDGE/>, <wsa:ReferenceProperties jbossesb:transacted : false/>, <wsa:ReferenceProperties jbossesb:type : urn:jboss/esb/epr/type/jms/> > ] MessageID: 3cea41a8-2dca-49bc-87b9-7f163fca54ae RelatesTo: jms:correlationID#3cea41a8-2dca-49bc-87b9-7f163fca54ae ] context: {} body: [ objects: {org.jboss.soa.esb.message.defaultEntry=Getting Started} ] fault: [ ] attachments: [ Named:{}, Unnamed:[] ] properties: [ {org.jboss.soa.esb.message.transport.type=Deferred serialized value: f5c6d8, org.jboss.soa.esb.message.byte.size=2875, jboss.esb:category=MessageCounter,deployment=Quickstart_bpm_orchestration2.esb,service-category=BPM_Orchestration2_Starter_Service,service-name=Starter_ServiceTime=336495, javax.jms.message.redelivered=false, org.jboss.soa.esb.gateway.original.queue.name=Deferred serialized value: 1d1b039, org.jboss.soa.esb.message.source=Deferred serialized value: 1889305} ] ] 2011-01-26 15:51:00,567 INFO [STDOUT] (pool-21-thread-1) Message structure: 2011-01-26 15:51:00,567 INFO [STDOUT] (pool-21-thread-1) [ message: [ JBOSS_XML ] header: [ To: JMSEpr [ PortReference < <wsa:Address jms:127.0.0.1:1099#queue/quickstart_bpm_orchestration2_start_Request_esb/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>, <wsa:ReferenceProperties jbossesb:java.naming.provider.url : 127.0.0.1:1099/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.url.pkgs : org.jnp.interfaces/>, <wsa:ReferenceProperties jbossesb:destination-type : queue/>, <wsa:ReferenceProperties jbossesb:destination-name : queue/quickstart_bpm_orchestration2_start_Request_esb/>, <wsa:ReferenceProperties jbossesb:specification-version : 1.1/>, <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/>, <wsa:ReferenceProperties jbossesb:persistent : true/>, <wsa:ReferenceProperties jbossesb:acknowledge-mode : AUTO_ACKNOWLEDGE/>, <wsa:ReferenceProperties jbossesb:transacted : false/>, <wsa:ReferenceProperties jbossesb:type : urn:jboss/esb/epr/type/jms/> > ] MessageID: 3cea41a8-2dca-49bc-87b9-7f163fca54ae RelatesTo: jms:correlationID#3cea41a8-2dca-49bc-87b9-7f163fca54ae ] context: {} body: [ objects: {org.jboss.soa.esb.message.defaultEntry=Getting Started, jbpmProcessInstId=50, jbpmProcessDefName=bpm_orchestration2Process, jbpmCommandCode=StartProcessInstanceCommand, jbpmVariableMappings={theBody=Getting Started}} ] fault: [ ] attachments: [ Named:{}, Unnamed:[] ] properties: [ {org.jboss.soa.esb.message.transport.type=Deferred serialized value: f5c6d8, org.jboss.soa.esb.message.byte.size=2875, jboss.esb:category=MessageCounter,deployment=Quickstart_bpm_orchestration2.esb,service-category=BPM_Orchestration2_Starter_Service,service-name=Starter_ServiceTime=560079353, javax.jms.message.redelivered=false, org.jboss.soa.esb.gateway.original.queue.name=Deferred serialized value: 1d1b039, org.jboss.soa.esb.message.source=Deferred serialized value: 1889305} ] ] 2011-01-26 15:51:00,650 ERROR [org.jbpm.graph.def.GraphElement] (JbpmJobExector:192.168.0.100:1) action threw exception: null java.lang.NullPointerException at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at org.jbpm.instantiation.Delegation.instantiate(Delegation.java:162) at org.jbpm.instantiation.Delegation.getInstance(Delegation.java:126) 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:597) at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:197) at org.jbpm.instantiation.Delegation_$$_javassist_57.getInstance(Delegation_$$_javassist_57.java) at org.jbpm.graph.def.Action.execute(Action.java:136) 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:597) at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:197) at org.jbpm.graph.def.Action_$$_javassist_80.execute(Action_$$_javassist_80.java) at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:280) 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:597) at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:197) at org.jbpm.graph.def.Node_$$_javassist_127.executeAction(Node_$$_javassist_127.java) at org.jbpm.job.ExecuteActionJob.execute(ExecuteActionJob.java:33) at org.jbpm.job.executor.JobExecutorThread.executeJob(JobExecutorThread.java:172) at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:63)
Can anybody please help me know what is wrong? Why is it working fine in HSQLDB and not in Oracle?
Thanks & Regards,
Dnyanesh Ginde