I guess I found the mystery here. As illustrated by the stacktrace below, the XmlSchema code builds a DOM from the input source.

DocumentBuilderFactory docFac = DocumentBuilderFactory.newInstance();
           docFac.setNamespaceAware(true);
           DocumentBuilder builder = docFac.newDocumentBuilder();
           Document doc = builder.parse(inputSource);

In my environment, I get instance of org.apache.xerces.jaxp.DocumentBuilderImpl (from xercesImpl-2.8.1) for the builder and the parser tries to follow the schemaLocation which in turn throws the UnknownHostException.

So those who doesn't see the problems, you probably get a different impl of the DocumentBuilder.

Thanks,
Raymond

Thread [main] (Suspended (exception UnknownHostException)) Inet4AddressImpl.lookupAllHostAddr(String) line: not available [native method] InetAddress$1.lookupAllHostAddr(String) line: 849 InetAddress.getAddressFromNameService(String, InetAddress) line: 1200 InetAddress.getAllByName0(String, InetAddress, boolean) line: 1153 InetAddress.getAllByName(String, InetAddress) line: 1083 InetAddress.getAllByName(String) line: 1019 InetAddress.getByName(String) line: 969 InetSocketAddress.<init>(String, int) line: 124 HttpClient(NetworkClient).doConnect(String, int) line: 157 HttpClient.openServer(String, int) line: 394 HttpClient.openServer() line: 529 HttpClient.<init>(URL, Proxy, int) line: 233 HttpClient.New(URL, Proxy, int, boolean) line: 306 HttpClient.New(URL, Proxy, int) line: 323 HttpURLConnection.getNewHttpClient(URL, Proxy, int) line: 788 HttpURLConnection.plainConnect() line: 729 HttpURLConnection.connect() line: 654 HttpURLConnection.getInputStream() line: 977 XMLEntityManager.setupCurrentEntity(String, XMLInputSource, boolean, boolean) line: not available XMLVersionDetector.determineDocVersion(XMLInputSource) line: not available XIncludeAwareParserConfiguration(XML11Configuration).parse(boolean) line: not available XIncludeAwareParserConfiguration(XML11Configuration).parse(XMLInputSource) line: not available DOMParser(XMLParser).parse(XMLInputSource) line: not available DOMParser.parse(InputSource) line: not available DocumentBuilderImpl.parse(InputSource) line: not available XmlSchemaCollection.read(InputSource, ValidationEventHandler, TargetNamespaceValidator) line: 303 SchemaBuilder.resolveXmlSchema(String, String, String, TargetNamespaceValidator) line: 1884 SchemaBuilder.handleImport(XmlSchema, Element, Element) line: 1620 SchemaBuilder.handleXmlSchemaElement(Element, String) line: 175 SchemaBuilder.build(Document, String, ValidationEventHandler) line: 82 XmlSchemaCollection.read(Document, String, ValidationEventHandler, TargetNamespaceValidator) line: 359 XmlSchemaCollection.read(Document, String, ValidationEventHandler) line: 353 Interface2WSDLGenerator.loadXSD(XmlSchemaCollection, XSDefinition) line: 402 Interface2WSDLGenerator.addSchemaExtension(XSDefinition, XmlSchemaCollection, WSDLDefinition, Definition) line: 384 Interface2WSDLGenerator.generate(Interface, WSDLDefinition) line: 256 Interface2WSDLGeneratorTestCase.testGenerate() line: 57 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object...) line: 597 TestMethodRunner.executeMethodBody() line: 99 TestMethodRunner.runUnprotected() line: 81 TestMethodRunner(BeforeAndAfterRunner).runProtected() line: 34 TestMethodRunner.runMethod() line: 75 TestMethodRunner.run() line: 45 TestClassMethodsRunner.invokeTestMethod(Method, RunNotifier) line: 75 TestClassMethodsRunner.run(RunNotifier) line: 36 TestClassRunner$1.runUnprotected() line: 42 TestClassRunner$1(BeforeAndAfterRunner).runProtected() line: 34 TestClassRunner.run(RunNotifier) line: 52 JUnit4TestClassReference(JUnit4TestReference).run(TestExecution) line: 45 TestExecution.run(ITestReference[]) line: 38 RemoteTestRunner.runTests(String[], String, TestExecution) line: 460 RemoteTestRunner.runTests(TestExecution) line: 673 RemoteTestRunner.run() line: 386 RemoteTestRunner.main(String[]) line: 196--------------------------------------------------
From: "Jean-Sebastien Delfino" <[EMAIL PROTECTED]>
Sent: Friday, July 25, 2008 4:33 PM
To: <dev@tuscany.apache.org>
Subject: Re: Error building binding-ws-axis2

Simon Nash wrote:
Raymond Feng wrote:
One possibility is such
cases is a difference between the Sun and IBM JDKs.  I'm on Sun JDK
1.5.0_13-b03, so I tried changing to the IBM JDK and this produced the
build failure you and Sebastien are seeing when the system ID is set
to a non-null string.

I'm usually building in parallel on Windows IBM JDK 1.5 SR8, Linux RHEL 5 IBM JDK 1.5 SR8 and Linux RHEL 5 SUN JDK 6 Update 7.

All three failed with the same error before Raymond's change.
All work with his change.

--
Jean-Sebastien

Reply via email to