You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Seth Tager <se...@gmail.com> on 2005/08/28 19:31:33 UTC

Connection Refused

I'm using slide on my development machine and on a server. The code
runs properly on my development machine, but I get the stack trace
incuded below when I run the code on the server.

I'm accessing an xml file in the slide repository programmatically,
through org.apache.xerces.parsers.DOMParser. My intuition here is that
there's something is going wrong in the xerces code, rather than with
slide, but I'm not sure. "Connection refused" seems to indicate that
slide may be involved.

I print out the url that it's choking on and when I can and past that
url into my browser it loads the file without a problem.

Does anyone have a clue what the problem might be?

Seth

Partial stack trace (the last line is in my code):

java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
        at java.net.Socket.connect(Socket.java:452)
        at java.net.Socket.connect(Socket.java:402)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:306)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:267)
        at sun.net.www.http.HttpClient.New(HttpClient.java:339)
        at sun.net.www.http.HttpClient.New(HttpClient.java:320)
        at sun.net.www.http.HttpClient.New(HttpClient.java:315)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:521)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:498)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:521)
       at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:498)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:626)
        at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown
Source)
        at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
        at org.apache.xerces.impl.XMLEntityManager.startDocumentEntity(Unknown
Source)
        at org.apache.xerces.impl.XMLDocumentScannerImpl.setInputSource(Unknown
Source)
        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
        at com.ttools.statemachine.MachineFactory.parseMachinesFromId(MachineFactory.java:295)
        ...

---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


Re: Connection Refused

Posted by Seth Tager <se...@gmail.com>.
Thanks for the suggestion. It turned out to be even more obscure than that.

The hosts file had bad dns info for the slide server domain. 

Seth


On 8/28/05, John Rousseau <jr...@archivas.com> wrote:
> Xerces is trying to look up the DTD/Schema (look for the URL in the
> first few lines of the XML you are parsing).
> 
> It looks like your server machine can't make the connection out to the
> internet to get the DTD/Schema.
> 
> There are several ways to deal with this: open the network, use a local
> URL for the DTD/Schema, don't validate the XML, etc.
> 
> This is not a slide bug.
> 
> -John
> 
> 
> Seth Tager wrote:
> > I'm using slide on my development machine and on a server. The code
> > runs properly on my development machine, but I get the stack trace
> > incuded below when I run the code on the server.
> >
> > I'm accessing an xml file in the slide repository programmatically,
> > through org.apache.xerces.parsers.DOMParser. My intuition here is that
> > there's something is going wrong in the xerces code, rather than with
> > slide, but I'm not sure. "Connection refused" seems to indicate that
> > slide may be involved.
> >
> > I print out the url that it's choking on and when I can and past that
> > url into my browser it loads the file without a problem.
> >
> > Does anyone have a clue what the problem might be?
> >
> > Seth
> >
> > Partial stack trace (the last line is in my code):
> >
> > java.net.ConnectException: Connection refused
> >         at java.net.PlainSocketImpl.socketConnect(Native Method)
> >         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
> >         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
> >         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
> >         at java.net.Socket.connect(Socket.java:452)
> >         at java.net.Socket.connect(Socket.java:402)
> >         at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
> >         at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)
> >         at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
> >         at sun.net.www.http.HttpClient.<init>(HttpClient.java:306)
> >         at sun.net.www.http.HttpClient.<init>(HttpClient.java:267)
> >         at sun.net.www.http.HttpClient.New(HttpClient.java:339)
> >         at sun.net.www.http.HttpClient.New(HttpClient.java:320)
> >         at sun.net.www.http.HttpClient.New(HttpClient.java:315)
> >         at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:521)
> >         at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:498)
> >         at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:521)
> >        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:498)
> >         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:626)
> >         at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown
> > Source)
> >         at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
> >         at org.apache.xerces.impl.XMLEntityManager.startDocumentEntity(Unknown
> > Source)
> >         at org.apache.xerces.impl.XMLDocumentScannerImpl.setInputSource(Unknown
> > Source)
> >         at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
> >         at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
> >         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> >         at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
> >         at com.ttools.statemachine.MachineFactory.parseMachinesFromId(MachineFactory.java:295)
> >         ...
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: slide-user-help@jakarta.apache.org
> >
> >
> 
> --
> John Rousseau
> Archivas, Inc.
> jrousseau@archivas.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


Re: Connection Refused

Posted by Guillaume Bailleul <gu...@free.fr>.
There is also a feature in Xerces to link a local file to the DTD URL. 
So the XML file has not to be modified and the network has not to be opened.
Look the documentation of EntityResolver.

Guillaume

John Rousseau wrote:

> Xerces is trying to look up the DTD/Schema (look for the URL in the 
> first few lines of the XML you are parsing).
>
> It looks like your server machine can't make the connection out to the 
> internet to get the DTD/Schema.
>
> There are several ways to deal with this: open the network, use a 
> local URL for the DTD/Schema, don't validate the XML, etc.
>
> This is not a slide bug.
>
> -John
>
>
> Seth Tager wrote:
>
>> I'm using slide on my development machine and on a server. The code
>> runs properly on my development machine, but I get the stack trace
>> incuded below when I run the code on the server.
>>
>> I'm accessing an xml file in the slide repository programmatically,
>> through org.apache.xerces.parsers.DOMParser. My intuition here is that
>> there's something is going wrong in the xerces code, rather than with
>> slide, but I'm not sure. "Connection refused" seems to indicate that
>> slide may be involved.
>>
>> I print out the url that it's choking on and when I can and past that
>> url into my browser it loads the file without a problem.
>>
>> Does anyone have a clue what the problem might be?
>>
>> Seth
>>
>> Partial stack trace (the last line is in my code):
>>
>> java.net.ConnectException: Connection refused
>>         at java.net.PlainSocketImpl.socketConnect(Native Method)
>>         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
>>         at 
>> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
>>         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
>>         at java.net.Socket.connect(Socket.java:452)
>>         at java.net.Socket.connect(Socket.java:402)
>>         at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
>>         at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)
>>         at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
>>         at sun.net.www.http.HttpClient.<init>(HttpClient.java:306)
>>         at sun.net.www.http.HttpClient.<init>(HttpClient.java:267)
>>         at sun.net.www.http.HttpClient.New(HttpClient.java:339)
>>         at sun.net.www.http.HttpClient.New(HttpClient.java:320)
>>         at sun.net.www.http.HttpClient.New(HttpClient.java:315)
>>         at 
>> sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:521) 
>>
>>         at 
>> sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:498) 
>>
>>         at 
>> sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:521) 
>>
>>        at 
>> sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:498) 
>>
>>         at 
>> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:626) 
>>
>>         at 
>> org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown
>> Source)
>>         at 
>> org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
>>         at 
>> org.apache.xerces.impl.XMLEntityManager.startDocumentEntity(Unknown
>> Source)
>>         at 
>> org.apache.xerces.impl.XMLDocumentScannerImpl.setInputSource(Unknown
>> Source)
>>         at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown 
>> Source)
>>         at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown 
>> Source)
>>         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>>         at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>>         at 
>> com.ttools.statemachine.MachineFactory.parseMachinesFromId(MachineFactory.java:295) 
>>
>>         ...
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: slide-user-help@jakarta.apache.org
>>
>>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


Re: Connection Refused

Posted by John Rousseau <jr...@archivas.com>.
Xerces is trying to look up the DTD/Schema (look for the URL in the 
first few lines of the XML you are parsing).

It looks like your server machine can't make the connection out to the 
internet to get the DTD/Schema.

There are several ways to deal with this: open the network, use a local 
URL for the DTD/Schema, don't validate the XML, etc.

This is not a slide bug.

-John


Seth Tager wrote:
> I'm using slide on my development machine and on a server. The code
> runs properly on my development machine, but I get the stack trace
> incuded below when I run the code on the server.
> 
> I'm accessing an xml file in the slide repository programmatically,
> through org.apache.xerces.parsers.DOMParser. My intuition here is that
> there's something is going wrong in the xerces code, rather than with
> slide, but I'm not sure. "Connection refused" seems to indicate that
> slide may be involved.
> 
> I print out the url that it's choking on and when I can and past that
> url into my browser it loads the file without a problem.
> 
> Does anyone have a clue what the problem might be?
> 
> Seth
> 
> Partial stack trace (the last line is in my code):
> 
> java.net.ConnectException: Connection refused
>         at java.net.PlainSocketImpl.socketConnect(Native Method)
>         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
>         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
>         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
>         at java.net.Socket.connect(Socket.java:452)
>         at java.net.Socket.connect(Socket.java:402)
>         at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
>         at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)
>         at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
>         at sun.net.www.http.HttpClient.<init>(HttpClient.java:306)
>         at sun.net.www.http.HttpClient.<init>(HttpClient.java:267)
>         at sun.net.www.http.HttpClient.New(HttpClient.java:339)
>         at sun.net.www.http.HttpClient.New(HttpClient.java:320)
>         at sun.net.www.http.HttpClient.New(HttpClient.java:315)
>         at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:521)
>         at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:498)
>         at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:521)
>        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:498)
>         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:626)
>         at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown
> Source)
>         at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
>         at org.apache.xerces.impl.XMLEntityManager.startDocumentEntity(Unknown
> Source)
>         at org.apache.xerces.impl.XMLDocumentScannerImpl.setInputSource(Unknown
> Source)
>         at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
>         at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
>         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>         at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>         at com.ttools.statemachine.MachineFactory.parseMachinesFromId(MachineFactory.java:295)
>         ...
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org
> 
> 

-- 
John Rousseau
Archivas, Inc.
jrousseau@archivas.com

---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org