Testcase: testSimpleParse :JPF found unexpected errors: gov.nasa.jpf.vm.NoUncaughtExceptionsPropertyJavaPathfinder ( core system v8.0 (rev 29+))

134 views
Skip to first unread message

Rokia

unread,
Mar 22, 2016, 8:21:28 AM3/22/16
to Java™ Pathfinder
Hi,

I get  BUILD FAILED when building jpf-core v8.0 (rev 29+) because one test case fails , here is the error trace of this test case:

Testcase: testSimpleParse took 0.892 sec
    FAILED
JPF found unexpected errors: gov.nasa.jpf.vm.NoUncaughtExceptionsProperty
junit.framework.AssertionFailedError: JPF found unexpected errors: gov.nasa.jpf.vm.NoUncaughtExceptionsProperty
    at gov.nasa.jpf.util.test.TestJPF.fail(TestJPF.java:164)
    at gov.nasa.jpf.util.test.TestJPF.noPropertyViolation(TestJPF.java:816)
    at gov.nasa.jpf.util.test.TestJPF.verifyNoPropertyViolation(TestJPF.java:830)
    at gov.nasa.jpf.test.xerces.SAXParserTest.testSimpleParse(SAXParserTest.java:43)

Thanks in advance for your help.

Nastaran Shafiei

unread,
Mar 22, 2016, 3:02:57 PM3/22/16
to java-pa...@googlegroups.com
What version of Java are you using to run and build JPF, and to build the system under test?

Nastaran

--

---
You received this message because you are subscribed to the Google Groups "Java™ Pathfinder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-pathfind...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rokia

unread,
Mar 22, 2016, 3:17:44 PM3/22/16
to Java™ Pathfinder
Java 1.8 for the build of JPF. The system under test is Rand.java, it is build at the same time as the build of JPF when I run "ant test" command.

Thanks

Nastaran Shafiei

unread,
Mar 22, 2016, 6:50:10 PM3/22/16
to java-pa...@googlegroups.com
To see the actual error occurred when running the SAXParserTest.testSimpleParse method, please have a look at the file jpf-core/build/tests/TEST-gov.nasa.jpf.test.xerces.SAXParserTest.txt. The first stack trace represents the error that you should look at. The one that you sent is a JPF exception which wraps around the system under test error, and is thrown by JPF to report a failed test but it does not indicate what the cause of the error is.

Nastaran

Rokia

unread,
Mar 23, 2016, 1:42:16 AM3/23/16
to Java™ Pathfinder
Ok. here is the first stack trace I find in the file jpf-core/build/tests/TEST-gov.nasa.jpf.test.xerces.SAXParserTest.txt :

gov.nasa.jpf.vm.NoUncaughtExceptionsProperty
org.xml.sax.SAXException
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1188)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:655)
    at gov.nasa.jpf.test.xerces.SAXParserTest.testSimpleParse(SAXParserTest.java:60)
    at java.lang.reflect.Method.invoke(gov.nasa.jpf.vm.JPF_java_lang_reflect_Method)
    at gov.nasa.jpf.util.test.TestJPF.runTestMethod(TestJPF.java:648)

For the system under test, I am sorry I said Rand.java but it is SAXParserTest.class

Thanks

Nastaran Shafiei

unread,
Mar 23, 2016, 6:02:40 PM3/23/16
to Java™ Pathfinder
What is the output when you run the following command?

bin/test +test.vm.halt_on_throw="*" gov.nasa.jpf.test.xerces.SAXParserTest

Rokia

unread,
Mar 24, 2016, 7:50:42 AM3/24/16
to Java™ Pathfinder
When I run that command I get the following output:

 testing testSimpleParse()
  running jpf with args: +http.connection=http://*.dtd -- gov.nasa.jpf.CachedROHttpConnection +http.cache_dir=src/tests/gov/nasa/jpf/test/xerces +log.info=http
JavaPathfinder core system v8.0 (rev 29) - (C) 2005-2014 United States Government. All rights reserved.


====================================================== system under test
gov.nasa.jpf.test.xerces.SAXParserTest.runTestMethod()

====================================================== search started: 3/24/16 12:49 PM

====================================================== error 1
gov.nasa.jpf.vm.NoUncaughtExceptionsProperty
java.lang.NoSuchMethodException: Calling java.nio.Buffer.<init>(IIII)V
    at java.nio.CharBuffer.<init>(CharBuffer.java:281)
    at java.nio.HeapCharBuffer.<init>(HeapCharBuffer.java:57)
    at java.nio.CharBuffer.allocate(CharBuffer.java:335)
    at sun.net.www.ParseUtil.decode(ParseUtil.java:180)
    at sun.net.www.protocol.file.Handler.openConnection(Handler.java:80)
    at sun.net.www.protocol.file.Handler.openConnection(Handler.java:72)
    at java.net.URL.openConnection(URL.java:979)
    at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:621)
    at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:189)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:812)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1140)

    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:655)
    at gov.nasa.jpf.test.xerces.SAXParserTest.testSimpleParse(SAXParserTest.java:60)
    at java.lang.reflect.Method.invoke(gov.nasa.jpf.vm.JPF_java_lang_reflect_Method)
    at gov.nasa.jpf.util.test.TestJPF.runTestMethod(TestJPF.java:648)


====================================================== snapshot #1
thread java.lang.Thread:{id:0,name:main,status:RUNNING,priority:5,isDaemon:false,lockCount:0,suspendCount:0}
  owned locks:sun.net.www.protocol.file.Handler@c45
  call stack:
    at java.nio.CharBuffer.<init>(CharBuffer.java:281)
    at java.nio.HeapCharBuffer.<init>(HeapCharBuffer.java:57)
    at java.nio.CharBuffer.allocate(CharBuffer.java:335)
    at sun.net.www.ParseUtil.decode(ParseUtil.java:180)
    at sun.net.www.protocol.file.Handler.openConnection(Handler.java:80)
    at sun.net.www.protocol.file.Handler.openConnection(Handler.java:72)
    at java.net.URL.openConnection(URL.java:979)
    at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:621)
    at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:189)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:812)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1140)

    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:655)
    at gov.nasa.jpf.test.xerces.SAXParserTest.testSimpleParse(SAXParserTest.java:60)
    at java.lang.reflect.Method.invoke(Method.java)
    at gov.nasa.jpf.util.test.TestJPF.runTestMethod(TestJPF.java:648)


====================================================== results
error #1: gov.nasa.jpf.vm.NoUncaughtExceptionsProperty "java.lang.NoSuchMethodException: Calling java.nio...."

====================================================== search finished: 3/24/16 12:49 PM
java.lang.AssertionError: JPF found unexpected errors: gov.nasa.jpf.vm.NoUncaughtExceptionsProperty

    at gov.nasa.jpf.util.test.TestJPF.fail(TestJPF.java:164)
    at gov.nasa.jpf.util.test.TestJPF.noPropertyViolation(TestJPF.java:816)
    at gov.nasa.jpf.util.test.TestJPF.verifyNoPropertyViolation(TestJPF.java:830)
    at gov.nasa.jpf.test.xerces.SAXParserTest.testSimpleParse(SAXParserTest.java:43)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at gov.nasa.jpf.util.test.TestJPF.invoke(TestJPF.java:499)
    at gov.nasa.jpf.util.test.TestJPF.runTests(TestJPF.java:558)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at gov.nasa.jpf.tool.RunTest.main(RunTest.java:185)
......................................... test method failed with: JPF found unexpected errors: gov.nasa.jpf.vm.NoUncaughtExceptionsProperty
......................................... testSimpleParse: Failed

......................................... execution of testsuite: gov.nasa.jpf.test.xerces.SAXParserTest FAILED
.... [1] testSimpleParse: Failed
......................................... tests: 1, failures: 1, errors: 0

Nastaran Shafiei

unread,
Mar 24, 2016, 8:26:07 PM3/24/16
to java-pa...@googlegroups.com
The stack trace indicates that the system under test is trying to access a method which is missing from the model class - the constructor Buffer(IIII) is missing from the model class java.nio.Buffer in jpf-core, that is why you get java.lang.NoSuchMethodException. But the question is why your system under test is trying to access this method. One possibility is that there might be some jpf extension that is used along with jpf-core and models some underlying classes such as sun.net.* or java.net.URL. To see what is loaded, use the option “ -log”. Another possibility is that this is caused due to a different OS/Java implementation.

Nastaran

Rokia

unread,
Mar 30, 2016, 4:30:21 AM3/30/16
to Java™ Pathfinder
Ok. Thank you for your help.
Reply all
Reply to author
Forward
0 new messages