03-21-2011 09:16 AM
void saveUser(User user)
but when I extended one of my existing classes to provide the expected User interface and passed it in I received the ClassCastException below. I realise that creating a User object with IdentityService.newUser is the expected usage but it would be nice to avoid copying the data from my user object to the Activiti user object. At least if this is necessary it would be good to declare a public class that must be passed into the saveUser method.
java.lang.ClassCastException: org.activiti.examples.bpmn.servicetask.UserInfo cannot be cast to org.activiti.engine.impl.identity.UserEntity
at org.activiti.engine.impl.cmd.SaveUserCmd.<init>(SaveUserCmd.java:30)
at org.activiti.engine.impl.IdentityServiceImpl.saveUser(IdentityServiceImpl.java:54)
at org.activiti.examples.bpmn.servicetask.IdentityTask.execute(IdentityTask.java:21)
at org.activiti.examples.bpmn.servicetask.IdentityTaskTest.testCreateUser(IdentityTaskTest.java:19)
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:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
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)
03-21-2011 01:06 PM
03-22-2011 03:16 AM
03-22-2011 07:12 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.