:Hello all,

In our web application we use an old version of xerces. We deploy the 
application with xerces.jar in the
WEB-INF/lib directory.
However, when the application is started we get the error:

java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser
       at 
org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:118)
       at 
com.fredhopper.frob.question.QuestionManager.loadQuestions(QuestionManager.java:163)
       at 
com.fredhopper.frob.question.QuestionManager.loadQuestions(QuestionManager.java:78)
       at com.fredhopper.frob.FredEngine.init(FredEngine.java:373)
       at com.fredhopper.frob.FredEngine.startingUp(FredEngine.java:138)
       at 
com.fredhopper.jsp.Bridge$EngineInServletContainer.fredhopper(Bridge.java:837)
       at 
com.fredhopper.jsp.Bridge$EngineInServletContainer.run(Bridge.java:779)

A bit cryptic, because SAXParser is in fact available twice (once in our 
application and once in the
'global' orion space).

A solution is:
1) Move the following jars:
   crimson.jar
   jaxp.jar
   parser.jar
   xalan.jar
2) Move our own xerces.jar in orion home directory
2) Start orion as follows:
java -Xbootclasspath/a:xerces.jar -jar orion.jar

This is not a real solution, because we also had to remove the encoding 
attribute out of the application.xml and web.xml. And this should then 
be done for every application you deploy on the application server.

Shouldn't it be that when the application server looks for a class, it 
first looks in the classes directory of that web application, then in 
the lib directory of the web application and if it still can't resolve 
the class it looks in the global space (not a good idea, since this 
depends on which application server you use, but trade of to save memory 
usage)?
So is this a bug in orion, or are we doing something wrong here?

Mark

-- 
--o-o----------
Mark Kettner
http://www.fredhopper.com
Amsterdam, The Netherlands
Phone:  +31 20 3206203 Mobile: +31 620 609 817
fax:    +31 20 8848747
E-mail: [EMAIL PROTECTED], [EMAIL PROTECTED]


Reply via email to