Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / August 2007

Tip: Looking for answers? Try searching our database.

failed XML classes web requests

Thread view: 
Iñaki Z. I. - 27 Aug 2007 17:56 GMT
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,
Iñaki Z. I. - 27 Aug 2007 18:54 GMT
Never Mind, it was a JAR file creation error, as soon as the files
were created inside the JAR file the problem stopped.

Thanks anyway


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.