The moose likes JSF and the fly likes Connection refused: connect in faces-config.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Connection refused: connect in faces-config.xml" Watch "Connection refused: connect in faces-config.xml" New topic

Connection refused: connect in faces-config.xml

Vani Sreedharan

Joined: May 11, 2006
Posts: 14
I have an EAR which has a web project developed using JSF. When i import the EAR in WSAD 5.1.2 error occurs in the following line of faces-config.xml,

<!DOCTYPE faces-config PUBLIC
"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"

Application fails to deploy. Reason - Connection refused: connect.

Any ideas?

Ali Gohar
Ranch Hand

Joined: Mar 18, 2004
Posts: 572
have you included the correct jar files for JSF in the classpath?
Vani Sreedharan

Joined: May 11, 2006
Posts: 14
Have not included any JARS as this was a ready made EAR. I tried importing it in a workspace in WSAD 5.1.2.
This error goes off when that DTD was imported to local and that path was given in faces-config.xml.But cant proceed with this option as the EAR has to be deployed in different websphere boxes and local path cant be extended or placing the dtd in all machines is unnecessary.

It will be of great help if you can tell what are the jars to be placed in classpath?
Ali Gohar
Ranch Hand

Joined: Mar 18, 2004
Posts: 572
The EAR should have the appropriate jar files like if it is using MyFaces then it should have MyFaces jar files which can be downloaded at

if it is using Sun's JSF implementation then it should include those jars, which can be downloaded at java.sun.com/javaee/javaserverfaces/download.html

You faces-config in your previous post tells that it is using JSF version 1.1, so that EAR should have version 1.1 jar files
Eric Leschinski

Joined: Jun 21, 2011
Posts: 1
I got the error: "java.net.ConnectException: Connection refused: connect"

What I was trying to do was validate an blahContext.xml file with a parser, but the problem comes when the parser tries to go out and validate the doctype dtd link.


The following code produces the error mentioned at the top. The failure happens when the parser goes out to validate the dtd link.

It works if you uncomment the commented lines where I overload the resolver to not do anything on link resolving. Bonus: it validates the other XML entities in the document.

Used these includes:

I agree. Here's the link: http://aspose.com/file-tools
subject: Connection refused: connect in faces-config.xml
Similar Threads
Getting an error in my Java Console when trying to load an applet
JSF with Weblogic 8.1 sp3
Problem with building columns dynamically using dataTable tag
Refering .dtd file offline from faces-config.xml
local reference to dtd