working with xml,java & linux error Factory.newInstance() (Unknown Source)

Hi,

I am working with linux,xml,java.I am trying to parse xml document.But I am getting follwing run time exception.I have set classpath to xerces.jar & xercesImpl.jar,jaxp.jar...Plz help me.

Exception in thread "main" java.lang.AbstractMethodError

at _Jv_MakeVTable(java.lang.Class) (/usr/lib/libgcj.so.5.0.0)

at _Jv_PrepareClass(java.lang.Class) (/usr/lib/libgcj.so.5.0.0)

at _Jv_WaitForState(java.lang.Class, int) (/usr/lib/libgcj.so.5.0.0)

at java.lang.VMClassLoader.linkClass0(java.lang.Class) (/usr/lib/libgcj.so.5.

0.0)

at java.lang.VMClassLoader.resolveClass(java.lang.Class) (/usr/lib/libgcj.so.

5.0.0)

at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.5.0.0)

at java.lang.Class.newInstance() (/usr/lib/libgcj.so.5.0.0)

at javax.xml.parsers.FactoryFinder.newInstance(java.lang.String, java.lang.Cl

assLoader, boolean) (Unknown Source)

at javax.xml.parsers.FactoryFinder.findJarServiceProvider(java.lang.String) (

Unknown Source)

at javax.xml.parsers.FactoryFinder.find(java.lang.String, java.lang.String) (

Unknown Source)

at javax.xml.parsers.DocumentBuilderFactory.newInstance() (Unknown Source)

at rprocessor.main(java.lang.String[]) (Unknown Source)

Thanks & Regards,

Shilpa

[1335 byte] By [shilpaba] at [2007-11-27 7:59:53]
# 1
Sounds like you're trying to use an outdated version of xerces.
quittea at 2007-7-12 19:41:47 > top of Java-index,Java Essentials,Java Programming...
# 2
I am working in linux.will the xerces.jar be different for linux & windows?Thanks & Regards,Shilpa
shilpaba at 2007-7-12 19:41:47 > top of Java-index,Java Essentials,Java Programming...
# 3
> I am working in linux.will the xerces.jar be> different for linux & windows?No!
sabre150a at 2007-7-12 19:41:47 > top of Java-index,Java Essentials,Java Programming...
# 4
Some Linux systems get shipped with a (not complete) GNU-version of Java. The programs might lurk around on PATH...So check the versions.
BIJ001a at 2007-7-12 19:41:47 > top of Java-index,Java Essentials,Java Programming...
# 5
Does this yield the expected output?java -version
BIJ001a at 2007-7-12 19:41:47 > top of Java-index,Java Essentials,Java Programming...
# 6

java -version

shows:

java version 1.4.2

gcj (GCC) 3.4.4 20050721 (Red Hat 3.4.4-2)

Copyright (C) 2004 Free Software Foundation, Inc.

This is free software; see the source for copying conditions. There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

shilpaba at 2007-7-12 19:41:47 > top of Java-index,Java Essentials,Java Programming...
# 7
Did you expect this or rather the Sun one? gcj (GCC) 3.4.4 20050721 (Red Hat 3.4.4-2)Copyright (C) 2004 Free Software Foundation, Inc.
BIJ001a at 2007-7-12 19:41:47 > top of Java-index,Java Essentials,Java Programming...
# 8
Which version of xerces do you use?
quittea at 2007-7-12 19:41:47 > top of Java-index,Java Essentials,Java Programming...
# 9
Hi,Xerces version ....xerces-1_4_4but still i m getting same error.Thanks & Regards,Shilpa
shilpaba at 2007-7-12 19:41:47 > top of Java-index,Java Essentials,Java Programming...
# 10
Hi,I got the solution.Problem was with version.I was using jdk1.4 on linux & by mistake i was using javax package of jdk1.5For more details visit the site.... http://www.jroller.com/page/njain?catname=%2FJava
shilpaba at 2007-7-12 19:41:47 > top of Java-index,Java Essentials,Java Programming...