03-19-2013 06:06 PM
——————————————————————————-
Test set: org.activiti.examples.bpmn.scripttask.ScriptTaskTest
——————————————————————————-
Tests run: 4, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.193 sec <<< FAILURE!
testAutoStoreVariables(org.activiti.examples.bpmn.scripttask.ScriptTaskTest) Time elapsed: 0.075 sec <<< ERROR!
org.activiti.engine.ActivitiException: couldn't find a variable type that is able to serialize sun.org.mozilla.javascript.internal.Undefined@30baae4a
at org.activiti.engine.impl.variable.DefaultVariableTypes.findVariableType(DefaultVariableTypes.java:62)
at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.createVariableInstance(VariableScopeImpl.java:359)
at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.createVariableLocal(VariableScopeImpl.java:292)
at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.createVariableLocal(VariableScopeImpl.java:279)
…
at org.activiti.engine.impl.TaskServiceImpl.complete(TaskServiceImpl.java:161)
at org.activiti.examples.bpmn.scripttask.ScriptTaskTest.testAutoStoreVariables(ScriptTaskTest.java:76)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at junit.framework.TestCase.runTest(TestCase.java:176)
at org.activiti.engine.impl.test.PvmTestCase.runTest(PvmTestCase.java:65)
at junit.framework.TestCase.runBare(TestCase.java:141)
at org.activiti.engine.impl.test.AbstractActivitiTestCase.runBare(AbstractActivitiTestCase.java:86)
at junit.framework.TestResult$1.protect(TestResult.java:122)
at junit.framework.TestResult.runProtected(TestResult.java:142)
at junit.framework.TestResult.run(TestResult.java:125)
at junit.framework.TestCase.run(TestCase.java:129)
at junit.framework.TestSuite.runTest(TestSuite.java:255)
at junit.framework.TestSuite.run(TestSuite.java:250)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:146)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
at com.sun.proxy.$Proxy0.invoke(Unknown Source)
at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:145)
at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:87)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
public void testUndefinedType() {
boolean serializable = (Undefined.instance instanceof Serializable);
assertTrue(serializable);
}
03-20-2013 06:02 AM
03-20-2013 11:19 AM
03-20-2013 08:04 PM
03-21-2013 07:29 AM
That said, I have no idea why the implementation of the Undefined class would be different across JDK builds.
03-21-2013 06:20 PM
03-24-2013 05:07 PM
What build number are you using? I just tried with Oracle 1.7.0_17 (64-bit) build for OS X and I ran into the same issue. Undefined doesn't implement Serializable, so the same test fails. There is no 32-bit build for OS X, so I couldn't repeat that part of the scenario.Hi brianshowers,
03-24-2013 09:54 PM
<scriptTask id="script2" scriptFormat="JavaScript" activiti:autoStoreVariables="true">
<script><![CDATA[
var sum = a + b;
]]></script>
</scriptTask>
03-25-2013 07:22 AM
03-25-2013 09:26 AM
package sun.org.mozilla.javascript.internal;
public class Undefined
{
public static final Object instance = new Undefined();
public Object readResolve()
{
return instance;
}
}
i have used jd-gui-0.3.3.windows to display this jar file.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.