You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Christian Wiesing <wi...@web.de> on 2007/10/22 19:56:03 UTC

Facelets validation problem without an Internet connection

Hello,

i have a problem with the facelets validation. When i start my application with an internet connection or without facelets it is working well. Without an internet connection and with facelets I’m getting the attached Exception. The Tomcat XML validation is turned off. 

I’m using:
MyFaces 1.2.0
JDK 1.6.0
Facelets: 1.1.13
Tomcat 6.0.14

Has anyone an idea how i can solve this problem?

Regards, 

Christian

------------------------------

INFO: Reading standard config META-INF/standard-faces-config.xml
22.10.2007 19:39:47 org.apache.myfaces.config.FacesConfigurator feedClassloaderConfigurations
INFO: Reading config jar:file:/G:/JSF_Seminar/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/JSF_Start/WEB-INF/lib/jsf-facelets.jar!/META-INF/faces-config.xml
22.10.2007 19:39:49 org.apache.myfaces.webapp.DefaultFacesInitializer initFaces
SCHWERWIEGEND: Error initializing MyFaces: java.net.UnknownHostException: java.sun.com
javax.faces.FacesException: java.net.UnknownHostException: java.sun.com
	at org.apache.myfaces.config.FacesConfigurator.feedClassloaderConfigurations(FacesConfigurator.java:425)
	at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:171)
	at org.apache.myfaces.webapp.DefaultFacesInitializer.initFaces(DefaultFacesInitializer.java:112)
	at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:57)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
	at org.apache.catalina.core.StandardService.start(StandardService.java:516)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
	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:597)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.net.UnknownHostException: java.sun.com
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
	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:388)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:500)
	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:318)
	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:792)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:733)
	at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:658)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:981)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:677)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1316)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:1283)
	at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:283)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(XMLDocumentScannerImpl.java:1168)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(XMLDocumentScannerImpl.java:1068)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:988)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:645)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:508)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
	at org.apache.commons.digester.Digester.parse(Digester.java:1745)
	at org.apache.myfaces.config.impl.digester.DigesterFacesConfigUnmarshallerImpl.getFacesConfig(DigesterFacesConfigUnmarshallerImpl.java:194)
	at org.apache.myfaces.config.impl.digester.DigesterFacesConfigUnmarshallerImpl.getFacesConfig(DigesterFacesConfigUnmarshallerImpl.java:34)
	at org.apache.myfaces.config.FacesConfigurator.feedClassloaderConfigurations(FacesConfigurator.java:419)
	... 18 more
22.10.2007 19:39:49 org.apache.catalina.core.ApplicationContext log
SCHWERWIEGEND: StandardWrapper.Throwable
java.lang.IllegalStateException: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions!
If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml.
A typical config looks like this;
<listener>
  <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>

	at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:90)
	at javax.faces.webapp.FacesServlet.init(FacesServlet.java:88)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4045)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4351)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
	at org.apache.catalina.core.StandardService.start(StandardService.java:516)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
	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:597)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
22.10.2007 19:39:49 org.apache.catalina.core.StandardContext loadOnStartup
SCHWERWIEGEND: Servlet /JSF_Start threw load() exception
java.lang.IllegalStateException: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions!
If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml.
A typical config looks like this;
<listener>
  <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>

	at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:90)
	at javax.faces.webapp.FacesServlet.init(FacesServlet.java:88)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4045)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4351)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
	at org.apache.catalina.core.StandardService.start(StandardService.java:516)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
	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:597)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
22.10.2007 19:39:49 org.apache.coyote.http11.Http11Protocol start


______________________________________________________________________
XXL-Speicher, PC-Virenschutz, Spartarife & mehr: Nur im WEB.DE Club!		
Jetzt testen! http://produkte.web.de/club/?mc=021130


Re: Facelets validation problem without an Internet connection

Posted by Mike Kienenberger <mk...@gmail.com>.
As to where to provide a local copy, it depends on the library, the
xml parser, and the container (actually, just the xml parser's
EntityResolver, but typically all three influence this).

Often, if there's any support for a local dtd copy, it will be at the
WEB-INF directory level, so there's the first place to try to put one.
 Ie, .../WEB-INF/web-facesconfig_1_1.dtd

On 10/23/07, Oliver Böhm <bo...@javatux.de> wrote:
> Christian Wiesing <wiesing <at> web.de> writes:
>
> >
> > Hello,
> >
> > i have a problem with the facelets validation. When i start my application
> with an internet connection or
> > without facelets it is working well. Without an internet connection and with
> facelets I'm getting the
> > attached Exception. The Tomcat XML validation is turned off.
> >
> > I'm using:
> > MyFaces 1.2.0
> > JDK 1.6.0
> > Facelets: 1.1.13
> > Tomcat 6.0.14
> >
> > Has anyone an idea how i can solve this problem?
> >
> > Regards,
> >
> > Christian
> >
> ...
>
> Hello,
>
> this seems to be a problem with MyFaces 1.2.0, see
> https://issues.apache.org/jira/browse/MYFACES-1735
>
> Possible solutions:
> - downgrade to MyFaces 1.1.1
> - wait for MaFaces 1.2.1
> - remove or comment out the DOCTYPE definitions in faces-config.xml (not nice,
> but works for me)
>
> Or provide a local copy dtd/web-facesconfig_1_1.dtd in your webapp - but I don't
> know where. If you know where let me know...
>
> Ups, I saw, that is the faces-config.xml in jsf-facelets.jar - here I have no
> idea. You can patch it, but I don't think, that you want to do it.
>
> regards
> Oliver
>
>
>
>
>
>

Re: Facelets validation problem without an Internet connection

Posted by Oliver Böhm <bo...@javatux.de>.
Christian Wiesing <wiesing <at> web.de> writes:

> 
> Hello,
> 
> i have a problem with the facelets validation. When i start my application
with an internet connection or
> without facelets it is working well. Without an internet connection and with
facelets I’m getting the
> attached Exception. The Tomcat XML validation is turned off. 
> 
> I’m using:
> MyFaces 1.2.0
> JDK 1.6.0
> Facelets: 1.1.13
> Tomcat 6.0.14
> 
> Has anyone an idea how i can solve this problem?
> 
> Regards, 
> 
> Christian
> 
... 

Hello,

this seems to be a problem with MyFaces 1.2.0, see
https://issues.apache.org/jira/browse/MYFACES-1735

Possible solutions:
- downgrade to MyFaces 1.1.1
- wait for MaFaces 1.2.1
- remove or comment out the DOCTYPE definitions in faces-config.xml (not nice,
but works for me)

Or provide a local copy dtd/web-facesconfig_1_1.dtd in your webapp - but I don't
know where. If you know where let me know...

Ups, I saw, that is the faces-config.xml in jsf-facelets.jar - here I have no
idea. You can patch it, but I don't think, that you want to do it.

regards
Oliver