could not insert: [org.jbpm.pvm.internal.lob.Lob] during deployment
mrboxie Nov 23, 2010 9:14 PMHi,
I am new to jbpm and run into the following strange issue. I used jpbm-4.4 with oracle. When I tried to deploy the following process.jpdl.xml, I got an exception as below.
org.hibernate.exception.GenericJDBCException: could not insert: [org.jbpm.pvm.internal.lob.Lob]
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2295)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2688)
at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:64)
at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:996)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1141)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at org.jbpm.pvm.internal.query.AbstractQuery.execute(AbstractQuery.java:93)
at org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.execute(ProcessDefinitionQueryImpl.java:67)
at org.jbpm.pvm.internal.query.AbstractQuery.untypedList(AbstractQuery.java:67)
at org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.list(ProcessDefinitionQueryImpl.java:157)
at org.jbpm.pvm.internal.repository.ProcessDeployer.checkKey(ProcessDeployer.java:133)
at org.jbpm.pvm.internal.repository.ProcessDeployer.deploy(ProcessDeployer.java:92)
at org.jbpm.pvm.internal.repository.DeployerManager.deploy(DeployerManager.java:46)
at org.jbpm.pvm.internal.repository.RepositorySessionImpl.deploy(RepositorySessionImpl.java:62)
at org.jbpm.pvm.internal.cmd.DeployCmd.execute(DeployCmd.java:47)
at org.jbpm.pvm.internal.cmd.DeployCmd.execute(DeployCmd.java:33)
at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:50)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:56)
at org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:43)
at org.jbpm.pvm.internal.repository.DeploymentImpl.deploy(DeploymentImpl.java:90)
at org.jbpm.examples.state.choice.StateChoiceTest.setUp(StateChoiceTest.java:63)
at junit.framework.TestCase.runBare(TestCase.java:128)
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 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: operation not allowed: streams type cannot be used in batching
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.driver.OraclePreparedStatement.addBatch(OraclePreparedStatement.java:3775)
at org.hibernate.jdbc.BatchingBatcher.addToBatch(BatchingBatcher.java:53)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2275)
... 39 more
The process.jpdl.xml is as following, it is edited using eclipse plugin.
<?xml version="1.0" encoding="UTF-8"?>
<process name="StateChoice" xmlns="http://jbpm.org/4.4/jpdl"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<on event="start">
<event-listener class="org.jbpm.examples.eventlistener.LogListener">
<field name="msg"><string value="Start on process definition"/></field>
</event-listener>
</on>
<on event="end">
<event-listener class="org.jbpm.examples.eventlistener.LogListener">
<field name="msg"><string value="End on process definition"/></field>
</event-listener>
</on>
<start g="16,60,48,48">
<on event="start">
<event-listener class="org.jbpm.examples.eventlistener.LogListener">
<field name="msg"><string value="Start on: Start"/></field>
</event-listener>
</on>
<transition to="wait for response"/>
</start>
<state g="96,58,109,52" name="wait for response">
<on event="start">
<event-listener class="org.jbpm.examples.eventlistener.LogListener">
<field name="msg"><string value="Start on: wait for response"/></field>
</event-listener>
</on>
<transition g="148,34:3,-15" name="accept" to="submit document"/>
<transition g="151,133:3,2" name="reject" to="try again"/>
</state>
<state g="238,8,114,52" name="submit document">
<!-- on event="start">
<event-listener class="org.jbpm.examples.eventlistener.LogListener">
<field name="msg"><string value="Start on: submit document"/></field>
</event-listener>
</on-->
<transition g="-42,-18" name="success" to="Actual Submit"/>
</state>
<state g="285,122,114,52" name="try again">
<transition g="240,88:-20,-1" name="retry" to="wait for response"/>
<transition g="-42,-18" name="failed" to="show why"/>
</state>
<end g="627,100,48,48" name="end1"/>
<task assignee="#{user}" g="483,37,92,52" name="Actual Submit">
<reminder duedate="2 minutes" repeat="1 minute"/>
<transition g="-42,-18" name="summited" to="end1"/>
</task>
<custom name="show why" g="471,173,92,52" class="org.jbpm.examples.state.choice.ShowWhy">
<transition name="give up" to="end1" g="-42,-18"/>
</custom>
</process>
One thing really confused me is if I remove the commented <on> element inside <state> element "submit document", the deployment works fine. Can anyone point out what is the issue here?
The code to deploy the process is:
deploymentId = repositoryService.createDeployment()
.addResourceFromClasspath("org/jbpm/examples/state/choice/process.jpdl.xml")
.deploy();
Thank you for your time.
-Bo