[jboss-user] [jBPM] - Re: Storing a long String (>255 Characters) in a Process Variable is not Possible(?)
Silvio Meier
do-not-reply at jboss.com
Tue Mar 29 04:57:36 EDT 2011
Silvio Meier [http://community.jboss.org/people/k0k0pelli] created the discussion
"Re: Storing a long String (>255 Characters) in a Process Variable is not Possible(?)"
To view the discussion, visit: http://community.jboss.org/message/596150#596150
--------------------------------------------------------------
To illustrate the problem, I attached a simple dummy test. After deploying it (execute the deploy class) and istantiating (using the class CreateInstance) a process with a test variable (testvar) that should be stored in a long text field is created. the acutal code looks as follows:
ProcessEngine processEngine = new Configuration().setResource("jbpm.cfg.xml").buildProcessEngine();
RepositoryService repositoryService = processEngine.getRepositoryService();
ExecutionService executionService = processEngine.getExecutionService();
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("testvar", "This is a test variable for a text".toCharArray());
executionService.startProcessInstanceByKey("test", variables);
After creating the instance with the long text variable testvar, the following exception occurs:
Caused by: java.lang.ClassCastException: [C cannot be cast to java.lang.String
at org.hibernate.type.TextType.toString(TextType.java:94)
at org.hibernate.type.NullableType.nullSafeToString(NullableType.java:117)
at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:158)
at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:131)
at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:2015)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2261)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2678)
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.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1028)
at org.jbpm.pvm.internal.tx.HibernateSessionResource.prepare(HibernateSessionResource.java:56)
at org.jbpm.pvm.internal.tx.StandardTransaction.commit(StandardTransaction.java:107)
at org.jbpm.pvm.internal.tx.StandardTransaction.complete(StandardTransaction.java:64)
at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:57)
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.svc.ExecutionServiceImpl.createVariables(ExecutionServiceImpl.java:174)
I didn't find an open issue in the ticket tracker. Are there any ideas?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/596150#596150]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110329/27a1bea7/attachment.html
More information about the jboss-user
mailing list