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