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

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


Thanks, Robinthomas. 

I did notice this issue on DB2, which will result in another sql exception, DataTruncationException. We fixed this one already. We didn't let JBPM hbm to generate tables. Instead, we use table script to create them. The length of the BLOB is 1048576 now. 

In fact, the above code works when we use it in unit test extending AbstractTransactionalSpringJbpmTestCase  when the deployment is created fresh with the start process. However, it won't work if we try to start a process already deployed in the database, even unit testing. Found a link seems to related to this. 

http://www-01.ibm.com/support/docview.wss?uid=nas16b3919404d0b1c2a86256ed60055bcbf

But upgrading jt400.jar doesn't solved the problem, already tried. Hibernate 3.3.2 documentation also says 

anonymous wrote : 
  | clob, blob
  | 
  |     Type mappings for the JDBC classes java.sql.Clob and java.sql.Blob. These types can be inconvenient for some applications, since the blob or clob object cannot be reused outside of a transaction. Driver support is patchy and inconsistent. 
  | 

I also debug the JBPM code. the getBytes() called outside the session.load() . Not sure it is related to the way JBPM is implemented just doesn't fit AS400 DB2. I tried to changed the behavior of transactions on JBPM, but there is little documentation talking about that. Only a little bit mentioned in the JBPM Dev Guide, talking about using SpringTransactionInterceptor. Our caller method of above code is already wrapped in the Required transaction. It should join the tx if JBPM is using required as well. 

I am posting the whole jbpm config here in case someone can help. 


  | <?xml version="1.0" encoding="UTF-8"?>
  | 
  | <jbpm-configuration>
  | 
  | 	<import resource="jbpm.jpdl.cfg.xml" />
  | 	<import resource="jbpm.identity.cfg.xml" />
  | 	<import resource="jbpm.jobexecutor.cfg.xml" />
  | 	 <import resource="jbpm.businesscalendar.cfg.xml" />
  | 	<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>
  | 			<retry-interceptor />
  | 			<environment-interceptor />
  | 			<spring-transaction-interceptor />
  | 		</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 />
  | 		<types resource="jbpm.variable.types.xml" />
  | 
  | 		<address-resolver />
  | 
  | 
  | 		   <mail-template name='task-notification'>
  | 		      <to users="${task.assignee}"/>
  | 		      <subject>${task.name}</subject>
  | 		      <text><![CDATA[Hi ${task.assignee},
  | 		Task "${task.name}" has been assigned to you.
  | 		${task.description}
  | 		
  | 		Sent by JBoss jBPM
  | 		]]></text>
  | 		    </mail-template>
  | 		  
  | 		    <mail-template name='task-reminder'>
  | 		      <to users="${task.assignee}"/>
  | 		      <subject>${task.name}</subject>
  | 		      <text><![CDATA[Hey ${task.assignee},
  | 		Do not forget about task "${task.name}".
  | 		${task.description}
  | 		
  | 		Sent by JBoss jBPM
  | 		]]></text>
  | 		    </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=4264910#4264910

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



More information about the jboss-user mailing list