Have you tried sticking spring-beans.dtd in your WEB-INF directory?

I use jsf-spring and I've yet to see this error pop up.

On 10/4/05, tony kerz <[EMAIL PROTECTED]> wrote:
> my apologies, you're absolutely right simon.
>
> at a glance, it looks myfaces related because it is going after
> faces-config.xml in myfaces.jar, but a closer examination of the stack
> trace indicates that it's spring and/or spring-jsf related...
> i'll try around those forums/mailing lists for some insight...
>
> org.springframework.beans.factory.BeanDefinitionStoreException:
> IOException parsing XML document from URL
> [jar:file:/C:/Documents%20and%20Settings/Tony/My%20Documents/work/eclipse/conciergeWeb/.deployables/conciergeWeb/WEB-INF/lib/myfaces.jar!/META-INF/faces-config.xml];
>
> nested exception is java.net.UnknownHostException: java.sun.com
> java.net.UnknownHostException: java.sun.com
>     at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
>     at java.net.Socket.connect(Socket.java:507)
>     at java.net.Socket.connect(Socket.java:457)
>     at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
>     at sun.net.www.http.HttpClient.openServer(HttpClient.java:365)
>     at sun.net.www.http.HttpClient.openServer(HttpClient.java:477)
>     at sun.net.www.http.HttpClient.<init>(HttpClient.java:214)
>     at sun.net.www.http.HttpClient.New(HttpClient.java:287)
>     at sun.net.www.http.HttpClient.New(HttpClient.java:299)
>     at
> sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:792)
>     at
> sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:744)
>     at
> sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:669)
>     at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:913)
>     at
> com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:973)
>     at
> com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:905)
>     at
> com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:872)
>     at
> com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:282)
>     at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(XMLDocumentScannerImpl.java:1021)
>     at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
>     at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
>     at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
>     at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
>     at
> com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:250)
>     at
> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)
>     at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:98)
>     at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:161)
>     at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:125)
>     at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:141)
>     at
> org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:126)
>     at
> de.mindmatters.faces.spring.FacesSpringWebApplicationContext.loadBeanDefinitions(FacesSpringWebApplicationContext.java:370)
>     at
> org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
>     at
> org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
>     at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:268)
>     at
> org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:134)
>     at
> de.mindmatters.faces.spring.support.FacesSpringVariableResolver$GetFacesSpringWebApplicationContext.<clinit>(FacesSpringVariableResolver.java:113)
>     at
> de.mindmatters.faces.spring.support.FacesSpringVariableResolver.getFacesSpringWebApplicationContext(FacesSpringVariableResolver.java:146)
>     at
> de.mindmatters.faces.spring.support.FacesSpringVariableResolver.resolveVariable(FacesSpringVariableResolver.java:139)
>     at
> org.apache.myfaces.el.ValueBindingImpl$ELVariableResolver.resolveVariable(ValueBindingImpl.java:637)
>     at org.apache.commons.el.NamedValue.evaluate(NamedValue.java:124)
>     at
> org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:441)
>     at
> org.apache.jsp.tag.web.layout_tag.doTag(org.apache.jsp.tag.web.layout_tag:143)
>     at
> org.apache.jsp.home_jsp._jspx_meth_tags_layout_0(org.apache.jsp.home_jsp:100)
>     at org.apache.jsp.home_jsp._jspService(org.apache.jsp.home_jsp:73)
>
> Simon Kitching wrote:
>
> > Craig McClanahan wrote:
> >
> >> On 10/3/05, *tony kerz* <[EMAIL PROTECTED]
> >> <mailto:[EMAIL PROTECTED]>> wrote:
> >>
> >>     after a few lumps i realized that the following issue:
> >>
> >>     org.springframework.beans.factory.BeanDefinitionStoreException:
> >>     IOException parsing XML document from URL
> >>
> >> [jar:file:/C:/Documents%20and%20Settings/Tony/My%20Documents/work/eclipse/conciergeWeb/.deployables/conciergeWeb/WEB-INF/lib/myfaces.jar!/META-INF/faces-
> >>
> >>     config.xml];
> >>
> >>
> >>     nested exception is java.net.UnknownHostException: java.sun.com
> >>     <http://java.sun.com>
> >>     java.net.UnknownHostException: java.sun.com <http://java.sun.com>
> >>
> >>     was due to not having a connection to the internet.
> >>     in some circumstances, i need to work when disconnected.
> >>
> >>     anyone know any tricks to address this? i have a local copy of the
> >>     DTD,
> >>     but i'm not sure where to place it or what to do to make myfaces
> >> look
> >>     locally for it.
> >>
> >>     i think i can always brute force it by removing the DTD from the
> >>     faces-config.xml in myfaces.jar, but i would prefer a more practical
> >>     solution.
> >>
> >>     by the way still using 1.0.9 of myfaces...
> >>
> >>
> >> FWIW, the JSF RI deals with this situation by using Commons Digester
> >> to parse the faces-config.xml files, and it registers an internal
> >> local copy of the relevant DTDs so that validated parsing can happen
> >> even when you are offline.  That sort of thing ought to be possible
> >> no matter what parsing technology MyFaces is using.
> >>
> >
> > From a peek at the source code, I can't see any problem. An instance
> > of FacesConfigEntityResolver is registered with the digester as the
> > entity resolver, and that class has:
> >  public InputSource resolveEntity(String publicId, String systemId)
> > throws IOException
> >  {
> >      InputStream stream;
> >      if (systemId.equals(FACES_CONFIG_1_0_DTD_SYSTEM_ID))
> >      {
> >          stream =
> > ClassUtils.getResourceAsStream(FACES_CONFIG_1_0_DTD_RESOURCE);
> >      }
> >      else if (systemId.equals(FACES_CONFIG_1_1_DTD_SYSTEM_ID))
> >      {
> >          stream =
> > ClassUtils.getResourceAsStream(FACES_CONFIG_1_1_DTD_RESOURCE);
> >      }
> >    ...
> >
> > So references to the standard DTDs will be retrieved from the
> > classpath, not from a remote URL. And file
> > "org/apache/myfaces/resource/web-facesconfig_1_1.dtd" is present in
> > the jarfile.
> >
> > History in subversion only goes back to 07 July 2005, but these
> > features have been present since at least then.
> >
> > Tony, I think you'll need to do some more investigation....
> >
> > Regards,
> >
> > Simon
> >
>
>
>

Reply via email to