[jdom-interest] JDOM WebSphere and the dreaded classpath

Sean Sullivan sean at seansullivan.com
Thu Jan 22 01:12:50 PST 2009


I was able to use jdom.jar in a web application in Websphere 6.0

@see http://www.jdom.org/pipermail/jdom-interest/2005-May/014856.html

Sean

On Thu, Jan 22, 2009 at 9:41 AM, oxymoron <sam_north at nfumutual.co.uk> wrote:
>
> Hi folks, I would like to use JDOM in a plugin I'm writing for a websphere
> application. We're using WebSphere 6.0.2.7 and the application running on
> top of it is called xPression. xPression (a print/reporting server) can have
> user exits (basically a plugin) written in java a class which can be
> dynamically be loaded and used by the application.
>
> I have written a user exit class that loads up an xml document in JDOM and
> then uses XPath to return specific bits of data from the xml. This is all
> works on the local machine in NetBeans with the jdom and necessary jars
> added to the project library.
>
> When running on the server, I run into the problem where it cannot load the
> default SAXParser as it doesn't implement XMLParser. It appears that in my
> WebSphere classpath another (older) SAXParser is present. I have confirmed
> this by using a bit of code I found on the web which returns the url for a
> class - in this case, SAXParser is being loaded from the
> \java\jre\lib\xml.jar somewhere under the websphere home directory and not
> from the later version I placed on the server. I've added the jdom and its
> necessary lib jars to the end of websphere class path - I don't want to
> contaminate the server with newer versions of code as this will probably
> break xpression.
>
> So... my question is around jars and manifest class path. What I am hoping
> is that I can add a manifest class path to the jdom jar which will override
> the websphere class path, therefore loading the correct version of SAXPath
> and other required jdom libs. This seems to be possible for jar apps but I'm
> not sure about class libraries in websphere?
>
> Or perhaps someone can suggest another way I can override the WS classpath
> just for jdom?
>
> In fact, can anyone suggest a way of being able to use XPath on my WS
> version without using an external java lib at all? Any help would be
> appreciated.
>
> Cheers
>
> Sam
> --
> View this message in context: http://www.nabble.com/JDOM-WebSphere-and-the-dreaded-classpath-tp21589217p21589217.html
> Sent from the JDOM - General mailing list archive at Nabble.com.
>
> _______________________________________________
> To control your jdom-interest membership:
> http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com
>


More information about the jdom-interest mailing list