Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

NoClassDefFoundError: weblogic/apache/xerces/framework/XMLParser

Posted on 2006-04-04
19
Medium Priority
?
576 Views
Last Modified: 2013-11-23
Hey experts,

 The error in the title above is occuring at runtime at the 2nd line of the following:

DOMParser parser = new DOMParser();
parser.parse(xmlFiles[i].getAbsolutePath());

I opened the jar file of the correpsonding package, it does not contain the framework folder; I downloaded the org.apache.xerces package (2.6.2) from the internet, and it also did not contain the framework folder...any idea from where this framework class is coming?? (I didn't look at newer version of the xerces package)
0
Comment
Question by:mte01
  • 6
  • 5
  • 5
  • +1
19 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 16369212
That looks like a weblogic class - are you working with W?
0
 
LVL 3

Author Comment

by:mte01
ID: 16369226
>>are you working with WL?

Yes, what do I try to search for??
0
 
LVL 92

Expert Comment

by:objects
ID: 16369243
do a search thru your web logic jars as a strat
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Author Comment

by:mte01
ID: 16369275
>>objects

All occurences of xercesImpl.jar (that contains the apache.xerces classes) in WL's directory do not contain the framework folder

I am doing right now a deep search (using an external tool that does internal search into any file) of the text "apache.xerces.framework" in WL's directory
0
 
LVL 92

Expert Comment

by:objects
ID: 16369324
> All occurences of xercesImpl.jar (that contains the apache.xerces classes) in WL's directory do not contain the framework folder

i was referring to the web logic jars.
if you're not using web logic classes at all then the problem may be in your parser configuration ie. its set to use the wrong implementation (in this case weblogics)
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16369431
But do any of the xerces classes start with

/weblogic

?
0
 
LVL 3

Author Comment

by:mte01
ID: 16369629
>>But do any of the xerces classes start with /weblogic

No..and this is weird since other java files (that are in this project, and which I haven't worked with) are using this kind of import: import weblogic.apache.xerces.utils.URI; successfully without any problems at compile-time or at run-time

>>i was referring to the web logic jars.

How should the hierarchy of the classes be in these jars??
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16369642
They must be on the classpath somewhere. See my previous in your other one about printing the classpath. One of those probably contains the Weblogic packages
0
 
LVL 92

Expert Comment

by:objects
ID: 16369648
> No..and this is weird since other java files (that are in this project, and which I haven't worked with) are using this
> kind of import: import weblogic.apache.xerces.utils.URI; successfully without any problems at compile-time or at run-time

then there must be wl classes somewhere :)

And mixing of parsers may be wjhats causing your problems.
0
 
LVL 30

Assisted Solution

by:Mayank S
Mayank S earned 120 total points
ID: 16369864
>> using this kind of import: import weblogic.apache.xerces.utils.URI; successfully

BTW, using that kind of code ensures your code is not portable from one application-server to another.
0
 
LVL 3

Author Comment

by:mte01
ID: 16369988
>>BTW, using that kind of code ensures your code is not portable from one application-server to another.

This is not only my project....I am only modifying & adding some files to it, and I got stuck on this (all these jars were configured a long time ago)...

>>CEHJ, objects

Now I lately discovered that this XMLParser class is found, but in the parsers folder (and not in the framework folder), and according to someone who has worked with previous WL versions, this used to be under framework directory in WL6 & 7, but it isn't in WL8 (which is the one I am using right now)....I don't why it's referencing it when I am calling the parse method of class DOMParser...

And regarding the WL jars....I really don't know why they aren't there..but I suppose that they are referenced by "weblogic." while they are actually under their normal hierarchy (org.apache.xerces.etc..) in the jar files in the WL corresponding direcotry
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 16370060
>> This is not only my project....I am only modifying & adding some files to it

Yeah, that is understood. But as a general practice - this is not a recommended approach. If your other team members worked on some code which uses those classes, though - ask them where the required JARs are ;-) I guess somebody would know.
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 690 total points
ID: 16370061
Try setting the System property

org.xml.sax.driver

to the fq name of the parser you want
0
 
LVL 92

Assisted Solution

by:objects
objects earned 525 total points
ID: 16370066
Have a look at the stack trace, it should give you better idea why/whats calling it
0
 
LVL 3

Author Comment

by:mte01
ID: 16370118
>>If your other team members worked on some code which uses those classes, though - ask them where the required JARs are ;-)

Of the team members here in Lebanon, no one has worked on such a thing..this was probably done by someone the US team. If this problem cannot be resolved, we should contact them of course. Moreover, around 90 developers in the world are working on this project :), so it is really difficult to do this kind of direct communication. On the other hand, I am sure that they did that for a certain reason, and this software is used only with WL.

>>Try setting the System property

I'll be trying that now
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 16370687
I understand why it is difficult to change it but nevertheless it is a point to be kept in mind in the future :) all app-server specific class-names should be maintained in properties or configuration-files.
0
 
LVL 3

Author Comment

by:mte01
ID: 16382381
It worked on a friend's PC who has got the same project configuration....so I guess it's some problem from my PC..
thanks for your help guys!!
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16382427
OK. Glad it's running
0
 
LVL 92

Expert Comment

by:objects
ID: 16386709
no worries :)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses
Course of the Month20 days, 21 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question