Bugs item #641155, was opened at 2002-11-20 03:14
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=641155&group_id=22866

Category: None
>Group: v3.0 Rabbit Hole
Status: Open
Resolution: None
Priority: 5
Submitted By: Giles Paterson (gpaterson)
>Assigned to: Scott M Stark (starksm)
Summary: EAR file class scoping problem

Initial Comment:
JBoss: 3.0.4
OS: Windows 2000 Server
Java Version: 
java version "1.3.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build
1.3.1_01)
Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode)


This bug report has been created at the request of
Scott M Stark in response to my posting to the
jboss-user mailing list

Here is the content of the email I sent to the mailing
list:
---
For the full details, take a look at the following
forum thread:

http://www.jboss.org/forums/thread.jsp?forum=47&thread=24806

Basically, I have an EAR file that is structured like this:

main.ear:
  some_ejbs.jar
  some_more_ejbs.jar
  a_web_app.war
  lib/
    third_party_libs.jar
    common_code.jar
  META-INF/
    application.xml

This jar was working perfectly under Weblogic 6.1, but
just doesn't want to play when ported to JBoss 3.0.4
(Yes, JBoss
specific deployment descriptors have been added to the
various EJB jars).

It is worth noting that the MANIFEST.MF files for the
EJB Jars and the War file reference various third party
and common jars
in the Class-Path element.

Initially I was encountering all sorts of
IllegalAccessErrors and NoClassDefFoundErrors, and
adding a jboss-app.xml file to
the Ear to scope the classes didn't help at all. I was
making some progress by manually adding various jars to
the JBoss
start-up classpath but that wasn't a great solution.

Finally I tried unpacking the EAR file into a
subdirectory of the deploy directory and the
application suddenly started
working (with no additional jars in the JBoss start-up
classpath). However, if I removed the jboss-app.xml
file from the
expanded directory, the application would stop working
and give me IllegalAccessErrors again. This suggests to
me that Class
scoping doesn't always work in 3.0.4 if the application
is packaged in an EAR file, but it does work if the EAR
file is
expanded out into a directory.

After some further trawling of the mailing list
archives, I believe this may be related to the fact
that my EJB jars,
reference the same common and third party jars in their
MANIFEST.MF Class-Path entries (There was a thread
concerning this
back in August/September
http://www.mail-archive.com/[email protected]/msg20584.html
), and possibly to bug
#602828

Currently, I am satisfied with deploy my app as an
expanded EAR directory, but I would prefer to use an
EAR as it simplifies
the deployment process. Does anyone have any comments
or suggestions concerning this? I haven't had a chance
to delve into the
JBoss code yet, but I'm intrigued as to why the Class
loading works differently for Ear files as compared to
expanded
directories.

---

I have been unable, so far, to create a simple test ear
that recreates the problem, so I have instead attached
a UCL log file.

I will attempt to create an example EAR file and upload
that when I get a chance.



----------------------------------------------------------------------

>Comment By: Scott M Stark (starksm)
Date: 2002-11-23 18:30

Message:
Logged In: YES 
user_id=175228

The trace log shows no NoClassDefFoundErrors and will not 
show any IllegalAccessErrors so what are the corresponding 
stack traces seen in the server log so I know what classes 
are involved.

----------------------------------------------------------------------

Comment By: Giles Paterson (gpaterson)
Date: 2002-11-20 03:21

Message:
Logged In: YES 
user_id=124102

Well, the zipped UCL log was too large to attach here, so
I've emailed it to Scott Stark instead.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=641155&group_id=22866


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to