Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Classloader issues with ejbdeploy

2 views
Skip to first unread message

aaron....@logiclibrary.com

unread,
Aug 1, 2007, 3:17:27 PM8/1/07
to
Our application uses JDOM 1.0 Final and WebSphere apparently doesn't. Is there a way to get WebSphere to use our jars when running ejbdeploy? I've tried to specify the -cp option to ejbdeploy, but that still doesn't work.

Here is the output from ejbdeploy with -rmic -verbose. You'll notice that there is a mismatch of where the JDOM classes are coming from:

[loaded /opt/WebSphere/AppServer/lib/jdom.jar(org/jdom/Namespace.class) in 1 ms]
[loaded /opt/WebSphere/AppServer/lib/jdom.jar(org/jdom/Attribute.class) in 15 ms]
[loaded /opt/WebSphere/AppServer/lib/jdom.jar(org/jdom/DataConversionException.class) in 0 ms]
[loaded /opt/WebSphere/AppServer/lib/jdom.jar(org/jdom/JDOMException.class) in 0 ms]
[loaded /opt/WebSphere/AppServer/lib/jdom.jar(org/jdom/Document.class) in 1 ms]
[loaded /opt/WebSphere/AppServer/lib/jdom.jar(org/jdom/DocType.class) in 0 ms]
[loaded /opt/WebSphere/AppServer/lib/jdom.jar(org/jdom/Comment.class) in 10 ms]
[loaded /opt/WebSphere/AppServer/lib/jdom.jar(org/jdom/ProcessingInstruction.class) in 1 ms]
[loaded /opt/WebSphere/AppServer/lib/jdom.jar(org/jdom/CDATA.class) in 1 ms]
[loaded /opt/WebSphere/AppServer/lib/jdom.jar(org/jdom/EntityRef.class) in 1 ms]
..
[loaded /tmp/ear/jdom.jar(org/jdom/Content.class) in 1 ms]
[loaded /tmp/ear/jdom.jar(org/jdom/Parent.class) in 0 ms]
[loaded /tmp/ear/jdom.jar(org/jdom/filter/Filter.class) in 0 ms]

Brian S Paskin

unread,
Aug 1, 2007, 4:13:52 PM8/1/07
to
Hi,

The ejbdeploy tool is used to create the necessary generated code, including the stub and ties, for EJBs to work within WebSphere.

Why would you want to override the creation of the necessary code? You can override the jar within the container by specifying PARENT LAST.

Brian

aaron....@logiclibrary.com

unread,
Aug 2, 2007, 11:06:23 AM8/2/07
to
I probably didn't describe my problem well enough. We are using PARENT_LAST in the container to avoid picking up the WebSphere's jars first, but there seems to be no way to do the same thing when generating the deployment code.

When the ejbdeploy picks up classes from different versions of jdom.jar we see this error (com.logiclibrary.common.metadata.Element is subclassing org.jdom.Element):

!MESSAGE java.lang.VerifyError: (class: com/logiclibrary/common/metadata/Element, method: removeChildAt signature: (I)V) Incompatible argument to method
at java.lang.ClassLoader.resolveClass0(Native Method)
at java.lang.ClassLoader.resolveClass(ClassLoader.java:971)
at com.ibm.tools.rmic.iiop.DirectoryLoader.loadClass(DirectoryLoader.java:128)
at com.ibm.tools.rmic.iiop.CompoundType.loadClass(CompoundType.java:351)
at com.ibm.tools.rmic.iiop.Type.initClass(Type.java:1007)
at com.ibm.tools.rmic.iiop.Type.setRepositoryID(Type.java:1024)
at com.ibm.tools.rmic.iiop.CompoundType.initialize(CompoundType.java:759)
..

Brian S Paskin

unread,
Aug 2, 2007, 4:35:40 PM8/2/07
to
Hi,

You can modify the <WAS_HOME>/deploytool/itp/ejbdeploy.sh script.


modify the
-Dws.ext.dirs="<YOUR_DIR_CODE>:$WAS_EXT_DIRS" (unix)
-Dws.ext.dirs="<YOUR_DIR_CODE>;%WAS_EXT_DIRS%" (windows)

This is not supported by IBM, but it will help you modify you run the ejbdeploy tool. I am not sure if the newer version will break anything, but it is worth a try.

Brian

0 new messages