From: Mills, B. C <bm...@ne...> - 2004-03-05 17:15:29
|
Problem: One suite of jython unit tests uses older version of xerces than another suite of tests that need to be run together in the same JVM. Attempted Solution: I am trying to use jreload to load HttpUnit classes. I want the ability to run through one suite of tests using one version and then load HttpUnit and run the remaining tests in the same JVM. I can't just do separate test runs due to reporting limitations. It seems like I am able to use jreload to load the classes but when I attempt to instantiate them like this: from jreload import makeLoadSet makeLoadSet('httpunit', ['/opt/httpunit/1.5.4/jars/xercesImpl.jar', '/opt/httpunit/1.5.4/jars/junit.jar', '/opt/httpunit/1.5.4/lib/httpunit.jar', '/opt/httpunit/1.5.4/jars/Tidy.jar', '/opt/httpunit/1.5.4/jars/js.jar', '/opt/httpunit/1.5.4/jars/nekohtml.jar', '/opt/httpunit/1.5.4/jars/xmlParserAPIs.jar']) from httpunit.com.meterware.httpunit import * conversation = WebConversation() I get the following: Traceback (innermost last): File "jreloadTest.py", line 13, in ? java.lang.ClassFormatError: com/meterware/httpunit/WebConversation (Illegal UTF8 string in constant pool) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:488) at java.lang.ClassLoader.defineClass(ClassLoader.java:423) at jxxload_help.PathVFSJavaLoader.loadClassFromBytes(PathVFSJavaLoader.java) at jxxload_help.PathVFSJavaLoader.loadClass(PathVFSJavaLoader.java) at java.lang.ClassLoader.loadClass(ClassLoader.java:250) at jxxload_help.PackageManager.findClass(PackageManager.java) at org.python.core.PyJavaClass.initLazy(PyJavaClass.java) at org.python.core.PyJavaClass.initialize(PyJavaClass.java) at org.python.core.PyJavaClass.initConstructors(PyJavaClass.java) at org.python.core.PyJavaClass.__call__(PyJavaClass.java) at org.python.core.PyObject.__call__(PyObject.java) at org.python.pycode._pyx0.f$0(jreloadTest.py:14) at org.python.pycode._pyx0.call_function(jreloadTest.py) at org.python.core.PyTableCode.call(PyTableCode.java) at org.python.core.PyCode.call(PyCode.java) at org.python.core.Py.runCode(Py.java) at org.python.core.__builtin__.execfile_flags(__builtin__.java) at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java) at org.python.util.jython.main(jython.java) java.lang.ClassFormatError: java.lang.ClassFormatError: com/meterware/httpunit/WebConversation (Illegal UTF8 string in constant pool) I know the jars are good because when I just add them to the jython classpath everything works fine for the HttpUnit tests but breaks the other suite of tests. Any advice would be greatly appreciated. -------------------------------------------------------------- Brian C. Mills Software Engineer Network Solutions http://www.networksolutions.com |