[opencms-dev] OpenCMS & JDOM (2) HELP!

M Butcher mbutcher at grcomputing.net
Wed Aug 6 19:54:02 CEST 2003


While it is possible, it is unlikely that OpenCMS has any inherent
problems with JDOM.

The error you pointed out is unfortunately a little vague, and can be
caused by many different factors, including things like
NullPointerExceptions thrown from your code -- in other words, it does
not always indicate a problem with the class you are trying to include.

While you did put the jar in a place where it could find it, the
preferred way of adding a jar is to add it to the /lib directory (in the
VFS) of the module you are working on. I doubt that is the source of
your problem, though, as it basically copies the jar into the
WEB-INF/libs directory on the real FS.

Anyway, a few questions that might help you debug:

1) Can you load any other classes from the jar?
2) Can you write a very simple script that just instantiates the class
(I have no idea what your existing code looks like)
3) Did you check the tomcat logs to see if there is any more detail?
Sometimes errors get logged there and don't show up in the browser.
4) Can you wrap the relevant portion of code in a try/catch block and
catch the exception before OpenCMS. Sometimes you get more info that
way.
5) If you think it's JDOM, can you load another jar by going through the
same steps you've taken?

Hope that helps.

Matt

On Wed, 2003-08-06 at 09:32, ambiesense at gmx.de wrote:
> Hi,
> 
> it seems OpenCMS has problems with JDOM. Does anybody know about this issue?
> I have the following sourcecode running (triggered from a Java Bean). 
> 
> I have integrated the jdom jars in the CLASSPATH Windows Enviroronment
> variable and I also copied it into <TOMCAT_PATH>/webapps/opencms/WEB-INF/lib
> 
> Every jar in this lib should automatically be integrated into the OpenCMS
> environment. I should be able to use all class files after that. However it
> looks like either (or both)
> 
> 1) OpenCMS does not find the XPATH class of one of the jars
> 2) OpenCMS has serious problems with JDOM since because i.e. it interferes
> with other DOM classes
> 
> The exception stacktrace is (displayed in the webpage):
> 
> javax.servlet.ServletException: Resource loader error in file
> '/Test/testjavaserverpagefile'
> 
> Root cause:
> org.apache.jasper.JasperException: org/jdom/xpath/XPath
> 	at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
> 	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
> 	at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241).....(and so on)
> 
> What does this exception actually mean?
> What is the reasion of this exception in relation with the XPath class?
> Do I need to provide the path to that package in a different way?
> Any other ideas?
> 
> Any help would be highly appreciated,
> Ralf
-- 
M Butcher <mbutcher at grcomputing.net>



More information about the opencms-dev mailing list