After some research, I think there is a bug in [1]. We shouldn't mix the usage of DTD and XSD. The correct one should be:

<taglib version="2.1" xmlns="http://java.sun.com/xml/ns/javaee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd";>

I fixed it in 1.x branch under r743523.

Thanks,
Raymond

--------------------------------------------------
From: "Raymond Feng" <[email protected]>
Sent: Wednesday, February 11, 2009 12:11 PM
To: <[email protected]>
Subject: Re: java.net.ConnectException when using Tuscany 1.3 + with Jetty

It seems that Jetty tries to resolve a DTD entity which is defined by a http URL. It's probably related to the taglib configuration. By looking the sca.tld at [1], there is DOCTYPE.

<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd";>

The URL is http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd is available, but I'm not sure if it should be the DTD instead of XSD. The following is what I found from the JSP spec.

<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd";>

Is it a bug in [1]?

[1] http://svn.apache.org/repos/asf/tuscany/branches/sca-java-1.x/modules/host-webapp/src/main/resources/META-INF/sca.tld

Thanks,
Raymond


From: enzo660 frm
Sent: Wednesday, February 11, 2009 11:19 AM
To: [email protected]
Subject: java.net.ConnectException when using Tuscany 1.3 + with Jetty


Hi!
I've been getting java.net.ConnectException when deploying a webapp in Jetty. This problem occurs only with Tuscany 1.3 +. Tuscany 1.2.x works fine. I deployed sample-calculator-ws-webapp.war that comes with the Tuscany distribution. The application gets deployed but Jetty some time to start up (around 5 mins with tuscany 1.3.x and around 3 mins with tuscany 1.4.x).
Here are the Jetty logs:

2009-02-04 13:43:15.639::INFO:  jetty-6.1.11
2009-02-04 13:43:15.694::INFO: Deploy /usr/local/thirdparty/jetty-6.1.11/contexts/test.xml -> org.mortbay.jetty.webapp.webappcont...@15ac3c9{/,/usr/local/thirdparty/jetty-6.1.11/webapps/test} 2009-02-04 13:43:15.714::INFO: Deploy /usr/local/thirdparty/jetty-6.1.11/contexts/javadoc.xml -> org.mortbay.jetty.handler.contexthand...@64883c{/javadoc,file:/usr/local/thirdparty/jetty-6.1.11/javadoc/} 2009-02-04 13:43:15.739::INFO: Deploy /usr/local/thirdparty/jetty-6.1.11/contexts/test-jndi.xml -> org.mortbay.jetty.webapp.webappcont...@1de17f4{/test-jndi,/usr/local/thirdparty/jetty-6.1.11/contexts/test-jndi.d} 2009-02-04 13:43:15.991::INFO: No Transaction manager found - if your webapp requires one, please configure one.
2009-02-04 13:43:15.069::WARN:  Unknown realm: Test JAAS Realm
2009-02-04 13:43:15.039::INFO: Extract jar:file:/usr/local/thirdparty/jetty-6.1.11/webapps/sample-calculator-ws-webapp.war!/ to /usr/local/thirdparty/jetty-6.1.11/work/Jetty_0_0_0_0_8080_sample-calculator-ws-webapp.war__sample-calculator-ws-webapp__-xjn4c9/webapp
2009-02-04 13:46:46.101::WARN:  EXCEPTION
java.net.ConnectException: Connection timed out
       at java.net.PlainSocketImpl.socketConnect(Native Method)
       at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
       at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
       at java.net.Socket.connect(Socket.java:519)
       at java.net.Socket.connect(Socket.java:469)
       at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
       at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
       at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
       at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)
       at sun.net.www.http.HttpClient.New(HttpClient.java:306)
       at sun.net.www.http.HttpClient.New(HttpClient.java:323)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:788) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:729) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:654) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:977) 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.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
       at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
       at org.mortbay.xml.XmlParser.parse(XmlParser.java:188)
       at org.mortbay.xml.XmlParser.parse(XmlParser.java:204)
at org.mortbay.jetty.webapp.TagLibConfiguration.configureWebApp(TagLibConfiguration.java:227) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1217) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:513) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)


thnx!
[email protected]

Reply via email to