From: SourceForge.net <no...@so...> - 2005-07-13 18:53:15
|
Bugs item #1237749, was opened at 2005-07-13 12:53 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=438935&aid=1237749&group_id=44253 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: R. Matt Barnett (rmbarnett) Assigned to: Nobody/Anonymous (nobody) Summary: Integrated JUnit and SAX breakage Initial Comment: Consider the class: ---------------------------------------------------------------------- import junit.framework.TestCase; import javax.xml.parsers.*; import java.io.*; / public class SimpleXMLDefaultHandlerTester extends TestCase { private SAXParser _parser; public SimpleXMLDefaultHandlerTester() throws Exception { SAXParserFactory factory = SAXParserFactory.newInstance(); // Turn on validation, and turn off namespaces factory.setValidating(true); factory.setNamespaceAware(false); _parser = factory.newSAXParser(); } public void testX() throws Exception { } } --------------------------------------------------------------------- Running junit from the command line produces passes this testcase without problem, however, running this test case from within DrJava produces: 1 test failed: File: C:\Documents and Settings\g9053\Desktop\nofile [line: 1] Error: Exception in constructor: testX (java.lang.ClassCastException at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source) at config.java.custom.captrak.parsing.SimpleXMLDefaultHandlerTester.<init>(SimpleXMLDefaultHandlerTester.java:36) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at junit.framework.TestSuite.createTest(TestSuite.java:131) at junit.framework.TestSuite.addTestMethod(TestSuite.java:114) at junit.framework.TestSuite.<init>(TestSuite.java:75) at junit.runner.BaseTestRunner.getTest(BaseTestRunner.java:103) at edu.rice.cs.drjava.model.junit.JUnitTestManager.findTestClasses(JUnitTestManager.java:122) at edu.rice.cs.drjava.model.repl.newjvm.InterpreterJVM.findTestClasses(InterpreterJVM.java:666) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source) at sun.rmi.transport.Transport$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Unknown Source) at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source) at java.lang.Thread.run(Unknown Source) ) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=438935&aid=1237749&group_id=44253 |