[jdom-interest] JDOM & WebSphere???

Guy Nirpaz guyn at tantian.com
Sun Jan 28 06:47:07 PST 2001


Mike,

Enclosed a draft of FAQ I sent earlier today to Jason, please try that and
report and problems.
Sorry if it is frustrating to you, but If you follow the described procedure
there is no problem
running JDOM together with Xerces and inside both VAJ and WAS

Guy

-----Original Message-----
From: jdom-interest-admin at jdom.org
[mailto:jdom-interest-admin at jdom.org]On Behalf Of Michael Herrick
Sent: Sun, January 28, 2001 4:12 PM
To: guyn at tantian.com; jdom-interest at jdom.org
Subject: RE: [jdom-interest] JDOM & WebSphere???


Guy,

Thanks again for your time.

Here is a better explanation of where we are at.  I wrote this up on Friday.

Mike


*Explanation*
We are trying to install JDOM and Xerces in VAJ 3.5.2.

Try 1
-----

1.We create a project for Xerces and import the Xerces source and let
VAJ take care of the compiling.

2.During this process we hava a problem with the org.w3.dom,
javax.xml.sax, javax.xml.sax.helpers since IBM XML4J already has these
classes.  The version of the XML4J is 2.0.1.5.  so, we go ahead and
create a 'version' for these three packages.  And then, we are fine
loading Xerces.

3.Next, we load the JDOM source code into a JDOM project and let VAJ do
all the compiling.  No problems here.

4.When we go run WTE, we find that JDOM does not work properly while the
same source code works fine using JBuilder test environment.

5. The JDOM code is executed within a session ejb.

5.When we return a org.jdom.Document object from the session ejb, we
notice that nothing is in the object and a java.lang.InternalError
exception gets thrown.

Try 2
-----

1.We delete the packages org.w3.dom, javax.xml.sax,
javax.xml.sax.helpers and 'version' them.  Then we load the source code
for Xerces into the IBM XML project.  This works fine.

2. We follow steps 3,4,5 from above and have the same results.

Questions
---------
1.  Can we use Xerces with WebSphere?
2.  Can we use JDOM with WebSphere?
3.  Could this be a bug with the WTE only?
4.  What are the recommended XML parsing API's for WebSphere?  Which ones
are supported?




>From: "Guy Nirpaz" <guyn at tantian.com>
>To: "Michael Herrick" <mherrick66 at hotmail.com>, <jdom-interest at jdom.org>
>Subject: RE: [jdom-interest] JDOM & WebSphere???
>Date: Sun, 28 Jan 2001 15:40:23 +0200
>MIME-Version: 1.0
>Received: from [207.155.252.72] by hotmail.com (3.2) with ESMTP id
>MHotMailBC3D6C0200A8D821EED0CF9BFC4883D20; Sun Jan 28 05:39:14 2001
>Received: from guypc ([212.25.117.162])by thunderer.cnchost.comid IAA19798;
>Sun, 28 Jan 2001 08:39:05 -0500 (EST)[ConcentricHost SMTP Relay 1.10]
>From guyn at tantian.com Sun Jan 28 05:39:49 2001
>Errors-To: <guyn at tantian.com>
>Message-ID: <HLEFLBPHEIEFCACEIIIJIEOPCFAA.guyn at tantian.com>
>X-Priority: 3 (Normal)
>X-MSMail-Priority: Normal
>X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
>Importance: Normal
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
>In-reply-to: <F176sBjukJ1zkc6g9wH00000ea1 at hotmail.com>
>
>Hi Mike,
>
>JDOM and WTE including EJB's works just fine. If you give me a complete
>explanation of what you are trying to do maybe I will be more helpful.
>
>From my experience with JDOM (since April) and VAJ and WAS (more than two
>years) they both work well together.
>
>Guy
>
>-----Original Message-----
>From: Michael Herrick [mailto:mherrick66 at hotmail.com]
>Sent: Sun, January 28, 2001 3:30 PM
>To: guyn at tantian.com; jdom-interest at jdom.org
>Subject: RE: [jdom-interest] JDOM & WebSphere???
>
>
>Guy,
>
>Thanks for the response.
>
>My friend and I burned 2 days last week working on this.
>
>We did what you suggested on the 2nd day and were able to compile.
>
>The next problem occurred in the WTE (WebSphere Test Environment).  When we
>try to put JDOM code in a Stateless Session Bean, WTE barfs on it.
>
>We use IBM's EJB debugger and walk through the code and when it hits JDOM
>code bizzaro things happen ... the code will run, but not correctly.  For
>example, any XML string we try to parse comes back with random errors.  We
>debugged this by creating trivial XML fragments and trying to parse them.
>All to no avail.
>
>Our plan is to try to skip the WTE and just see if WebSphere will run it.
>
>Any thoughts?
>
>Thanks again guys!
>
>Mike
>
>
> >From: "Guy Nirpaz" <guyn at tantian.com>
> >To: "Michael Herrick" <mherrick66 at hotmail.com>, <jdom-interest at jdom.org>
> >Subject: RE: [jdom-interest] JDOM & WebSphere???
> >Date: Sun, 28 Jan 2001 09:57:41 +0200
> >MIME-Version: 1.0
> >Received: from [207.155.252.47] by hotmail.com (3.2) with ESMTP id
> >MHotMailBC3D1BAD004A4004319ACF9BFC2F82A90; Sat Jan 27 23:56:29 2001
> >Received: from guypc ([212.25.117.162])by goliath.cnchost.comid CAA06174;
> >Sun, 28 Jan 2001 02:56:21 -0500 (EST)[ConcentricHost SMTP Relay 1.10]
> >From guyn at tantian.com Sat Jan 27 23:56:58 2001
> >Errors-To: <guyn at tantian.com>
> >Message-ID: <HLEFLBPHEIEFCACEIIIJGEOKCFAA.guyn at tantian.com>
> >X-Priority: 3 (Normal)
> >X-MSMail-Priority: Normal
> >X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
> >X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
> >Importance: Normal
> >In-Reply-To: <F168xDEA2VqFnW0kKIB00000d2a at hotmail.com>
> >
> >Hello Mike,
> >
> >JDOM works very well in both WebSphere and in the VAJ IDE.
> >
> >The conflicts that you encounter are because both WebSphere and VAJ comes
> >with XML4j v2.0.16 which is DOM level I.
> >All you need to do is get rid of the org.w3c.* DOM level I interfaces and
> >use DOM level II (in Xerces for instance)
> >
> >BTW - I do think that we should include in the FAQ IDE/AppServer specific
> >instructions of using JDOM.
> >
> >Guy
> >
> >-----Original Message-----
> >From: jdom-interest-admin at jdom.org
> >[mailto:jdom-interest-admin at jdom.org]On Behalf Of Michael Herrick
> >Sent: Sun, January 28, 2001 3:06 AM
> >To: jdom-interest at jdom.org
> >Subject: [jdom-interest] JDOM & WebSphere???
> >
> >
> >Has anyone used JDOM successfully with IBM WebSphere?
> >
> >I implemented some code with JDOM that worked great in JBuilder, but it
> >doesn't work at all with the WebSphere test environment.  I got conflicts
> >with XML4J within Visual Age.
> >
> >Has anyone successfully worked with JDOM on WebSphere?
> >
> >Thanks!
> >
> >Mike
> >mherrick66 at hotmail.com
> >_________________________________________________________________
> >Get your FREE download of MSN Explorer at http://explorer.msn.com
> >
> >_______________________________________________
> >To control your jdom-interest membership:
>
>http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourho
>s
> >t.com
> >
>
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

_______________________________________________
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
t.com
-------------- next part --------------
Date: 28/01/2001
Author: Guy Nirpaz <guyn at tantian.com>


JDOM and VAJ
-------------

versions 
--------
JDOM all versions
VAJ 3.02,3.5.x (and back to 2.0 as far as I remember)


Description:

When the WTE feature is added to the workspace, the project 'IBM XML Parser for Java' is added as well.
This project contains old DOM level one 'org.w3c.*' interfaces.
The default parser implementation that JDOM works with is Xerces that supports DOM level two, and
therefore conficts with this project.

To solve this problem use the following procedure:

1. Change workspace owner to Administrator
2. Create open edition of the project 'IBM XML Parser for Java'
3. Delete all the packages that contain org.w3c.* interfaces
4. Version the project.
5. Create a new Project for DOM level two parser such as Xerces
6. Import all Xerces classes including org.w3c.* interfaces (you can use a completly different project  
   for those interfaces if you want to work with other parsers)
7. Version the Xerces project
8. Create a JDOM project and import jdom classes into it. Version the project

This is the simplest approach for solving the interfaces mix.




JDOM and WebSphere
-------------------

versions
--------
JDOM all versions
WAS 3.x - tested on 'Advanced versions' only

Description:

As described in the above VAJ answer. We need to make sure that DOM level two interfaces will appear before
DOM level one interfaces.

We can do one of the following:

1. Put path to xerces.jar (or other DOM level II interfaces) 
   in the variable 'com.ibm.ejs.sm.adminserver.classpath' in the file admin.config
   resides in $WAS_ROOT$/bin before all other variables.

   This solution is ok for most cases

2. If you run WAS via $WAS_ROOT/bin/debug/adminserver.{bat|sh} add a line 
   'set WAS_CP=xerces.jar (or other DOM level II interfaces)' before other set WAS_CP commands

   This is an alternate solution to option 1

3. Add JDOM to the application server CLASSPATH, using the admin.cfg, or the administration console
   



More information about the jdom-interest mailing list