You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Jason Rizer <ja...@yahoo.com> on 2001/04/12 02:33:21 UTC

Slightly O/T - Loading parser files

Hello,

First of all, I apologize because I realize that this
post is slightly off topic, but I'm pulling my hair
out and I figured it couldn't hurt too much :)  I've
recently modified our application to work with the
com.sun xml parser implementation as well as the
xerces implementation.  I read a property file at
runtime to determine which of the two to use.  The
problem I'm having is that the Sun VM is behaving as
if parser.jar is always on my classpath even when its
not.  This is killing me with respect to using the
xerces implementation because it loads the Document
interface from parser.jar everytime.  The version of
Document in parser.jar is only Dom Level 1 compliant
so I get runtime errors when I try to use certain
methods, eg, importNode( ).  I've removed any
reference to parser.jar from my classpath as well as
renaming both copies on my system to parser.jarjar. 
I've restarted my PC about 6 times, but still the
stuff is loaded when I run my program.  This only
happens when I use the java vm, everything works fine
if I use the MS VM.  Anyone have any thoughts about
where these classes could be coming from?  Thanks in
advance!

-Jason

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


RE: Slightly O/T - Loading parser files

Posted by jtao <jt...@cysive.com>.
Hi,

You may try the -verbose option when you run java. This option will
tell you which method is loaded from which jar.

$ java -verbose SalesReport
[Opened /usr/local/java/jdk1.2/solaris/jre/lib/rt.jar 
        in 498 ms]
[Opened /usr/local/java/jdk1.2/solaris/jre/lib/i18n.jar 
        in 60 ms]
[Loaded java.lang.NoClassDefFoundError from 
	/usr/local/java/jdk1.2/solaris/jre/lib/rt.jar]
[Loaded java.lang.Class from 
	/usr/local/java/jdk1.2/solaris/jre/lib/rt.jar]
[Loaded java.lang.Object from 
	/usr/local/java/jdk1.2/solaris/jre/lib/rt.jar]
 

James,

-----Original Message-----
From: Jason Rizer [mailto:jasonriz@yahoo.com]
Sent: Thursday, April 12, 2001 1:33 AM
To: xerces-j-user@xml.apache.org
Subject: Slightly O/T - Loading parser files


Hello,

First of all, I apologize because I realize that this
post is slightly off topic, but I'm pulling my hair
out and I figured it couldn't hurt too much :)  I've
recently modified our application to work with the
com.sun xml parser implementation as well as the
xerces implementation.  I read a property file at
runtime to determine which of the two to use.  The
problem I'm having is that the Sun VM is behaving as
if parser.jar is always on my classpath even when its
not.  This is killing me with respect to using the
xerces implementation because it loads the Document
interface from parser.jar everytime.  The version of
Document in parser.jar is only Dom Level 1 compliant
so I get runtime errors when I try to use certain
methods, eg, importNode( ).  I've removed any
reference to parser.jar from my classpath as well as
renaming both copies on my system to parser.jarjar. 
I've restarted my PC about 6 times, but still the
stuff is loaded when I run my program.  This only
happens when I use the java vm, everything works fine
if I use the MS VM.  Anyone have any thoughts about
where these classes could be coming from?  Thanks in
advance!

-Jason

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org