?
=?iso-8859-1?B?SfFha2kgWi4gSS4=?=
I'm developping a java applet to be hosted in an embedded device. In
this applet I do an extensive use of XML and GET,POST communications
with the web server (that is in the embedded device). Everything works
fine, but the problem I'm facing is that everytime I use the standard
java XML classes, the Java virtual machine tryies to get these classes
from my embedded device. Those classes are not in there so after one
try it gets the clases from the locla machine (where the Vitual
Machine is running). This is the access log of my web server:
192.168.1.67 - - [28/Jan/1970:16:37:30 +0000] "GET /META-INF/services/
javax.xml.parsers.DocumentBuilderFactory HTTP/1.1" 404 0 "-" "Mozilla/
4.0 (Windows XP 5.1) Java/1.6.0_02"
192.168.1.67 - - [28/Jan/1970:16:37:30 +0000] "GET /META-INF/services/
javax.xml.transform.TransformerFactory HTTP/1.1" 404 0 "-" "Mozilla/
4.0 (Windows XP 5.1) Java/1.6.0_02"
192.168.1.67 - - [28/Jan/1970:16:37:30 +0000] "GET /META-INF/services/
com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager HTTP/1.1"
404 0 "-" "Mozilla/4.0 (Windows XP 5.1) Java/1.6.0_02"
192.168.1.67 - - [28/Jan/1970:16:37:30 +0000] "GET /META-INF/services/
javax.xml.parsers.DocumentBuilderFactory HTTP/1.1" 404 0 "-" "Mozilla/
4.0 (Windows XP 5.1) Java/1.6.0_02"
192.168.1.67 - - [28/Jan/1970:16:37:30 +0000] "GET /META-INF/services/
javax.xml.transform.TransformerFactory HTTP/1.1" 404 0 "-" "Mozilla/
4.0 (Windows XP 5.1) Java/1.6.0_02"
192.168.1.67 - - [28/Jan/1970:16:37:31 +0000] "GET /META-INF/services/
com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager HTTP/1.1"
404 0 "-" "Mozilla/4.0 (Windows XP 5.1) Java/1.6.0_02"
And this goes forever. I've seen that some people creates those empty
files in the web server, but this is not what I want to do because for
performance reasons I don't want those requests in there. I have tried
to add those classes to my JAR file. I created just a file like:
/META-INF/services/javax.xml.transform.TransformerFactory
and I also tried creating it as folders:
/META-INF/services/javax/xml/transform/TransformerFactory
but I always get the requests to the web server. Is there any way to
disable this query or even to force the virtual machine to look at the
xml classes on the local machine?.
The way I read the XML responses is like this:
// Build the XML document to parse the response
DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();
factory.setValidating(false);
Document doc=null;
DocumentBuilder builder;
// Parse the response
builder = factory.newDocumentBuilder();
doc = builder.parse(new InputSource(new StringReader(result)));
maybe I should be creating the factory in a different way?
Thanks,
this applet I do an extensive use of XML and GET,POST communications
with the web server (that is in the embedded device). Everything works
fine, but the problem I'm facing is that everytime I use the standard
java XML classes, the Java virtual machine tryies to get these classes
from my embedded device. Those classes are not in there so after one
try it gets the clases from the locla machine (where the Vitual
Machine is running). This is the access log of my web server:
192.168.1.67 - - [28/Jan/1970:16:37:30 +0000] "GET /META-INF/services/
javax.xml.parsers.DocumentBuilderFactory HTTP/1.1" 404 0 "-" "Mozilla/
4.0 (Windows XP 5.1) Java/1.6.0_02"
192.168.1.67 - - [28/Jan/1970:16:37:30 +0000] "GET /META-INF/services/
javax.xml.transform.TransformerFactory HTTP/1.1" 404 0 "-" "Mozilla/
4.0 (Windows XP 5.1) Java/1.6.0_02"
192.168.1.67 - - [28/Jan/1970:16:37:30 +0000] "GET /META-INF/services/
com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager HTTP/1.1"
404 0 "-" "Mozilla/4.0 (Windows XP 5.1) Java/1.6.0_02"
192.168.1.67 - - [28/Jan/1970:16:37:30 +0000] "GET /META-INF/services/
javax.xml.parsers.DocumentBuilderFactory HTTP/1.1" 404 0 "-" "Mozilla/
4.0 (Windows XP 5.1) Java/1.6.0_02"
192.168.1.67 - - [28/Jan/1970:16:37:30 +0000] "GET /META-INF/services/
javax.xml.transform.TransformerFactory HTTP/1.1" 404 0 "-" "Mozilla/
4.0 (Windows XP 5.1) Java/1.6.0_02"
192.168.1.67 - - [28/Jan/1970:16:37:31 +0000] "GET /META-INF/services/
com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager HTTP/1.1"
404 0 "-" "Mozilla/4.0 (Windows XP 5.1) Java/1.6.0_02"
And this goes forever. I've seen that some people creates those empty
files in the web server, but this is not what I want to do because for
performance reasons I don't want those requests in there. I have tried
to add those classes to my JAR file. I created just a file like:
/META-INF/services/javax.xml.transform.TransformerFactory
and I also tried creating it as folders:
/META-INF/services/javax/xml/transform/TransformerFactory
but I always get the requests to the web server. Is there any way to
disable this query or even to force the virtual machine to look at the
xml classes on the local machine?.
The way I read the XML responses is like this:
// Build the XML document to parse the response
DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();
factory.setValidating(false);
Document doc=null;
DocumentBuilder builder;
// Parse the response
builder = factory.newDocumentBuilder();
doc = builder.parse(new InputSource(new StringReader(result)));
maybe I should be creating the factory in a different way?
Thanks,