[jBPM Users] - JBPM 4.1 Blob issue on AS400 DB2
by irisjacky99
=== 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@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
16 years, 5 months
[jBPM Users] - Re: Jboss jbpm 4.2 integration with spring
by msahai
hi mwohlf,
i did not get it properly.where i have to add this line.
do i have to add it within <id-generator> tag.
can you show me sample cfg , to which you are refering too.
my sample cfg is:
<?xml version="1.0" encoding="UTF-8"?>
<jbpm-configuration>
<process-engine-context>
<repository-service />
<repository-cache />
<execution-service />
<history-service />
<management-service />
<identity-service />
<task-service />
<!-- Here we needed to change the transaction interceptor -->
<command-service name="txRequiredCommandService">
<skip-interceptor />
<retry-interceptor />
<environment-interceptor />
<spring-transaction-interceptor transactionManager="transactionManager"/>
</command-service>
<command-service name="newTxRequiredCommandService">
<retry-interceptor />
<environment-interceptor policy="requiresNew" />
<spring-transaction-interceptor transactionManager="transactionManager"/>
</command-service>
<!-- Added spring as read-context -->
<script-manager default-expression-language="juel"
default-script-language="juel"
read-contexts="execution, environment, process-engine, spring"
write-context="">
<script-language name="juel"
factory="org.jbpm.pvm.internal.script.JuelScriptEngineFactory" />
</script-manager>
<id-generator/>
<address-resolver />
<business-calendar>
</business-calendar>
<mail-template name='task-notification'>
${task.name}
<![CDATA[Hi ${task.assignee},
Task "${task.name}" has been assigned to you.
${task.description}
Sent by JBoss jBPM
]]>
</mail-template>
<mail-template name='task-reminder'>
${task.name}
<![CDATA[Hey ${task.assignee},
Do not forget about task "${task.name}".
${task.description}
Sent by JBoss jBPM
]]>
</mail-template>
</process-engine-context>
<transaction-context>
<repository-session />
<db-session />
<message-session />
<timer-session />
<history-session />
<mail-session>
<mail-server>
<session-properties resource="jbpm.mail.properties" />
</mail-server>
</mail-session>
<!-- Need to set explicitly that we don't want jbpm to create sessions -->
<hibernate-session current="true" />
</transaction-context>
</jbpm-configuration>
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4264726#4264726
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4264726
16 years, 5 months
[jBPM Users] - embedded jbpm
by lasalle.enola
Hi all,
I am currently evaluating/learning jbpm(4.1). Since our application businness layer is running on a ejb-container, my thoughts are to use jbpm embedded as a library. Have a couple of questions regarding this infrastructure. Might be a bit long...but thanks in advance
a)First is this a valid solution. I did see some spring modules but it was for 3.x so I skipped it. My plan is to write a Facade Service(most likely accessible locally only) which exposes the service Process Engine etc
b)For simple processes in which each state is invoked by an external event looks like the above will work.
c) if I wanted to use the more complex stuff like timers, etc would the embedded library still be able to support. In Quartz, the schedule usually allows some thread management -- how does jbpm support similar functionality. Quartz schedulers do also support clustering and I think guarantees only one process locks the job and invokes it. Can i assume the same for jbpm?
thanks for now, might have more questions as we go.
~lasalle
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4264700#4264700
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4264700
16 years, 5 months