[ 
https://issues.apache.org/jira/browse/PLUTO-360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Elliot Metsger updated PLUTO-360:
---------------------------------

    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.  (was: FileAssemblerTest cannot be executed offline, XMLUnit goes 
looking for a schema on the internet.  Probably need to tell XMLUnit to use a 
local schema.)

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)



> FileAssemblerTest cannot be executed offline
> --------------------------------------------
>
>                 Key: PLUTO-360
>                 URL: https://issues.apache.org/jira/browse/PLUTO-360
>             Project: Pluto
>          Issue Type: Improvement
>          Components: build system
>    Affects Versions: 1.1.3
>            Reporter: Elliot Metsger
>         Assigned To: Elliot Metsger
>            Priority: Minor
>             Fix For: 1.2.0, 1.1.4
>
>
> FileAssemblerTest cannot be executed offline, XMLUnit goes looking for a 
> schema on the internet. Probably need to tell XMLUnit to use a local schema.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to