Pluto
  1. Pluto
  2. PLUTO-360

FileAssemblerTest cannot be executed offline

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1.3
    • Fix Version/s: 1.1.5, 2.0.0
    • Component/s: build system
    • Labels:
      None

      Description

      FileAssemblerTest cannot be executed offline, XMLUnit goes looking for a schema on the internet. Probably need to tell XMLUnit to use a local schema.

        Activity

        Elliot Metsger created issue -
        Hide
        Elliot Metsger added a comment -

        Looks like we need to set a custom entity resolver on XMLUnit, but I'm not sure how to do this with XMLUnit 1.0. XMLUnit 1.1 beta has been released with explicit support for custom entity resolvers, but alas they do not have a Maven 2 artifact published for 1.1 beta. I've pinged the XMLUnit list on this issue.

        Here's the stacktrace, btw, when executing the test offline:

        java.net.UnknownHostException: java.sun.com
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
        at java.net.Socket.connect(Socket.java:516)
        at java.net.Socket.connect(Socket.java:466)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:365)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:477)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:214)
        at sun.net.www.http.HttpClient.New(HttpClient.java:287)
        at sun.net.www.http.HttpClient.New(HttpClient.java:299)
        at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:795)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:747)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:672)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:916)
        at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
        at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
        at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source)
        at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
        at org.custommonkey.xmlunit.XMLUnit.buildDocument(XMLUnit.java:352)
        at org.custommonkey.xmlunit.XMLUnit.buildDocument(XMLUnit.java:339)
        at org.custommonkey.xmlunit.Diff.<init>(Diff.java:99)
        at org.custommonkey.xmlunit.XMLAssert.assertXMLEqual(XMLAssert.java:195)
        at org.custommonkey.xmlunit.XMLTestCase.assertXMLEqual(XMLTestCase.java:266)
        at org.apache.pluto.util.assemble.file.FileAssemblerTest.testAssembleToNewDirectory(FileAssemblerTest.java:72)
        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:585)
        at junit.framework.TestCase.runTest(TestCase.java:164)
        at junit.framework.TestCase.runBare(TestCase.java:130)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:120)
        at junit.framework.TestSuite.runTest(TestSuite.java:230)
        at junit.framework.TestSuite.run(TestSuite.java:225)
        at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
        at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

        Show
        Elliot Metsger added a comment - Looks like we need to set a custom entity resolver on XMLUnit, but I'm not sure how to do this with XMLUnit 1.0. XMLUnit 1.1 beta has been released with explicit support for custom entity resolvers, but alas they do not have a Maven 2 artifact published for 1.1 beta. I've pinged the XMLUnit list on this issue. Here's the stacktrace, btw, when executing the test offline: java.net.UnknownHostException: java.sun.com at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177) at java.net.Socket.connect(Socket.java:516) at java.net.Socket.connect(Socket.java:466) at sun.net.NetworkClient.doConnect(NetworkClient.java:157) at sun.net.www.http.HttpClient.openServer(HttpClient.java:365) at sun.net.www.http.HttpClient.openServer(HttpClient.java:477) at sun.net.www.http.HttpClient.<init>(HttpClient.java:214) at sun.net.www.http.HttpClient.New(HttpClient.java:287) at sun.net.www.http.HttpClient.New(HttpClient.java:299) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:795) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:747) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:672) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:916) at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source) at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) at org.custommonkey.xmlunit.XMLUnit.buildDocument(XMLUnit.java:352) at org.custommonkey.xmlunit.XMLUnit.buildDocument(XMLUnit.java:339) at org.custommonkey.xmlunit.Diff.<init>(Diff.java:99) at org.custommonkey.xmlunit.XMLAssert.assertXMLEqual(XMLAssert.java:195) at org.custommonkey.xmlunit.XMLTestCase.assertXMLEqual(XMLTestCase.java:266) at org.apache.pluto.util.assemble.file.FileAssemblerTest.testAssembleToNewDirectory(FileAssemblerTest.java:72) 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:585) at junit.framework.TestCase.runTest(TestCase.java:164) at junit.framework.TestCase.runBare(TestCase.java:130) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:120) at junit.framework.TestSuite.runTest(TestSuite.java:230) at junit.framework.TestSuite.run(TestSuite.java:225) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
        Elliot Metsger made changes -
        Field Original Value New Value
        Description FileAssemblerTest cannot be executed offline, XMLUnit goes looking for a schema on the internet. Probably need to tell XMLUnit to use a local schema. FileAssemblerTest cannot be executed offline, XMLUnit goes looking for a schema on the internet. Probably need to tell XMLUnit to use a local schema.
        Elliot Metsger made changes -
        Fix Version/s 1.1.5 [ 12312652 ]
        Fix Version/s 1.1.4 [ 12312421 ]
        Elliot Metsger made changes -
        Fix Version/s 1.2.0 [ 12312213 ]
        Fix Version/s 2.0.0 [ 12312914 ]
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Hide
        Elliot Metsger added a comment -

        Upgraded to XMLUnit 1.1 and supplied FileAssemblerTest with a custom entity resolver that reads the DTD as a class resource.

        Show
        Elliot Metsger added a comment - Upgraded to XMLUnit 1.1 and supplied FileAssemblerTest with a custom entity resolver that reads the DTD as a class resource.
        Mark Thomas made changes -
        Workflow jira [ 12402981 ] Default workflow, editable Closed status [ 12565274 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12565274 ] jira [ 12586010 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        306d 35m 1 Elliot Metsger 02/Mar/08 04:25

          People

          • Assignee:
            Elliot Metsger
            Reporter:
            Elliot Metsger
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development