[jboss-user] [jBPM Users] - JBPM 4.1 Blob issue on AS400 DB2

irisjacky99 do-not-reply at jboss.com
Tue Nov 10 01:37:38 EST 2009


=== Environment ==============================
- jBPM Version : JBPM 4.1
- Database : AS400/DB2
- JDK : 1.5.017
- Container :1.5.017
- Configuration :  the basic jbpm configuration comes with installation.

=== Problem description =========================
JBPM4.1 doesn't come with a db script for AS400/DB2.  We created the script ourselves. It works mostly fine, however, we have troubles when we trying load the the deployed the definition from database. Here is the code.

  | ProcessDefinitionQuery processDefQuery = repositoryService.createProcessDefinitionQuery();
  | 		
  | ProcessDefinitionQuery eBusinessProcessQuery = processDefQuery.processDefinitionKey("eBusinessApplicationProcessFlow");
  | ProcessDefinition processDef = eBusinessProcessQuery.uniqueResult();
  | 
  | 

>From research has been done so far, it seems that JBPM is trying to assess the length method of blob after resultset is closed. 

The part is having trouble in particular is the JBPM4_LOB. Here is the  table script created for it .

  |     create table INTBPMMGT.JBPM4_LOB (
  |         DBID_ bigint generated by default as identity (start with 1, increment by 1),
  |         DBVERSION_ integer not null,
  |         BLOB_VALUE_ blob,
  |         DEPLOYMENT_ bigint,
  |         NAME_ clob,
  |         primary key (DBID_)
  |     ) ;
  | 

Can anyone gives a hand?

=== Stacktrace ==============================
anonymous wrote : Hibernate: select deployment1_.OBJNAME_ as col_0_0_, deployment1_.DEPLOYMENT_ as col_1_0_ from JBPM4_DEPLOYMENT deployment0_, JBPM4_DEPLOYPROP deployment1_, JBPM4_DEPLOYPROP deployment2_, JBPM4_DEPLOYPROP deployment3_ where deployment1_.KEY_='pdid' and deployment1_.DEPLOYMENT_=deployment0_.DBID_ and deployment2_.KEY_='pdkey' and deployment2_.OBJNAME_=deployment1_.OBJNAME_ and deployment2_.DEPLOYMENT_=deployment0_.DBID_ and deployment3_.KEY_='pdversion' and deployment3_.OBJNAME_=deployment1_.OBJNAME_ and deployment3_.DEPLOYMENT_=deployment0_.DBID_ and deployment2_.STRINGVAL_='eBusinessApplicationProcessFlow'
  | Hibernate: select jobimpl0_.DBID_ as DBID1_3_, jobimpl0_.DBVERSION_ as DBVERSION3_3_, jobimpl0_.DUEDATE_ as DUEDATE4_3_, jobimpl0_.STATE_ as STATE5_3_, jobimpl0_.ISEXCLUSIVE_ as ISEXCLUS6_3_, jobimpl0_.LOCKOWNER_ as LOCKOWNER7_3_, jobimpl0_.LOCKEXPTIME_ as LOCKEXPT8_3_, jobimpl0_.EXCEPTION_ as EXCEPTION9_3_, jobimpl0_.RETRIES_ as RETRIES10_3_, jobimpl0_.PROCESSINSTANCE_ as PROCESS11_3_, jobimpl0_.EXECUTION_ as EXECUTION12_3_, jobimpl0_.CFG_ as CFG13_3_, jobimpl0_.SIGNAL_ as SIGNAL14_3_, jobimpl0_.EVENT_ as EVENT15_3_, jobimpl0_.REPEAT_ as REPEAT16_3_, jobimpl0_.CLASS_ as CLASS2_3_ from JBPM4_JOB jobimpl0_ where (jobimpl0_.LOCKOWNER_ is null) and jobimpl0_.RETRIES_>0 and jobimpl0_.STATE_<>'suspended' order by jobimpl0_.DUEDATE_ asc fetch first 1 rows only 
  | Hibernate: select deployment0_.DBID_ as DBID1_4_0_, deployment0_.NAME_ as NAME2_4_0_, deployment0_.TIMESTAMP_ as TIMESTAMP3_4_0_, deployment0_.STATE_ as STATE4_4_0_ from JBPM4_DEPLOYMENT deployment0_ where deployment0_.DBID_=?
  | Hibernate: select resources0_.DEPLOYMENT_ as DEPLOYMENT4_1_, resources0_.DBID_ as DBID1_1_, resources0_.NAME_ as NAME5_1_, resources0_.DBID_ as DBID1_2_0_, resources0_.DBVERSION_ as DBVERSION2_2_0_, resources0_.BLOB_VALUE_ as BLOB3_2_0_ from JBPM4_LOB resources0_ where resources0_.DEPLOYMENT_=?
  | 2009-11-10 17:18:35,250  INFO [main] [Log4jLog.java:52] [info] - exception while executing command org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl at 1b7a553
  | org.jbpm.api.JbpmException: couldn't extract bytes out of blob
  | 	at org.jbpm.pvm.internal.lob.BlobStrategyBlob.get(BlobStrategyBlob.java:27)
  | 	at org.jbpm.pvm.internal.lob.Lob.extractBytes(Lob.java:83)
  | 	at org.jbpm.pvm.internal.repository.DeploymentImpl.getBytes(DeploymentImpl.java:162)
  | 	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:585)
  | 	at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:197)
  | 	at org.jbpm.pvm.internal.repository.DeploymentImpl_$$_javassist_27.getBytes(DeploymentImpl_$$_javassist_27.java)
  | 	at org.jbpm.pvm.internal.repository.ProcessDeployer.deploy(ProcessDeployer.java:58)
  | 	at org.jbpm.pvm.internal.repository.DeployerManager.deploy(DeployerManager.java:46)
  | 	at org.jbpm.pvm.internal.repository.RepositorySessionImpl.getObject(RepositorySessionImpl.java:120)
  | 	at org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.execute(ProcessDefinitionQueryImpl.java:72)
  | 	at org.jbpm.pvm.internal.query.AbstractQuery.execute(AbstractQuery.java:81)
  | 	at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
  | 	at org.jbpm.pvm.internal.spring.CommandTransactionCallback.doInTransaction(CommandTransactionCallback.java:50)
  | 	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
  | 	at org.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:77)
  | 	at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:46)
  | 	at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
  | 	at org.jbpm.pvm.internal.query.AbstractQuery.untypedList(AbstractQuery.java:62)
  | 	at org.jbpm.pvm.internal.query.AbstractQuery.untypedUniqueResult(AbstractQuery.java:69)
  | 	at org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.uniqueResult(ProcessDefinitionQueryImpl.java:145)
  | 	at au.com.qbe.lmi.common.bmp.BPMProcessDeployerTest.testLoadDeployedProcessDefinition(BPMProcessDeployerTest.java:73)
  | 	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:585)
  | 	at junit.framework.TestCase.runTest(TestCase.java:164)
  | 	at junit.framework.TestCase.runBare(TestCase.java:130)
  | 	at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69)
  | 	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: java.sql.SQLException: [PWS0001] Function did not complete successfully.
  | 	at com.ibm.as400.access.JDError.throwSQLException(JDError.java:650)
  | 	at com.ibm.as400.access.JDLobLocator.getLength(JDLobLocator.java:126)
  | 	at com.ibm.as400.access.AS400JDBCBlobLocator.length(AS400JDBCBlobLocator.java:185)
  | 	at org.hibernate.lob.SerializableBlob.length(SerializableBlob.java:54)
  | 	at org.jbpm.pvm.internal.lob.BlobStrategyBlob.get(BlobStrategyBlob.java:25)
  | 	... 42 more



View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4264730#4264730

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4264730



More information about the jboss-user mailing list