Huh! I think I should re-read the spec on this point to see what
one should be able to assume about classloaders.

For what it's worth, I can report that I've had no trouble with jars in
WEB-INF/lib under WebLogic 6.0 and 6.1 when deploying in an .ear file. So if
I put struts.jar in WEB-INF/lib then it's available to the web app, and only
the web app, since in 6.x at least it has a separate classloader which is a
child of the EJB classloader.

Sean


----- Original Message -----
From: "Sobkowski, Andrej" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Friday, December 14, 2001 6:46 PM
Subject: RE: Weblogic problem...


> Sean,
>
> unfortunately, there are issues when packaging an application as an EAR vs
> WAR. I agree that if you only have JSP and Servlets and WEB components in
> general (ie only stuff that goes into a WAR), then you're OK with
> WEB-INF/lib.
>
> BUT if you deploy your Struts app as part of a EAR, that may not work (it
> didn't for me and I wasted a few hours trying to understand why that
> @^%@$#@% app server couldn't find my struts.jar).
>
> Check out
> http://www.onjava.com/pub/a/onjava/2001/06/26/ejb.html
>
> It's the type of thing that can ruin an evening... :)
>
> Andrej
>
> PS. I agree with your sentence "EJB should not care about Struts". The
> problem is that if the app uses a single Class Loader and it's the EJB's,
> then the app must have a link to the "utility JARs".
>
> > -----Original Message-----
> > From: Sean Owen [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, December 14, 2001 12:49 PM
> > To: Struts Users Mailing List
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: Weblogic problem...
> >
> >
> > Adding struts.jar to the WEB-INF/lib directory within your
> > web application
> > is the right way to make it available to your servlets and
> > JSPs, regardless
> > of whether you deploy in an exploded directory format, as a
> > .war, or as an
> > .ear with a web app component.
> >
> > It's not then visible to the EJBs, since the EJB classloader
> > is a parent of
> > the web classloader, but that shouldn't matter - EJBs don't have any
> > business using Struts classes, right?
> >
> > Sean
> >
> >
> > ----- Original Message -----
> > From: "Sobkowski, Andrej" <[EMAIL PROTECTED]>
> > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> > Sent: Friday, December 14, 2001 4:40 PM
> > Subject: RE: Weblogic problem...
> >
> >
> > > Small addition to my previous message (sorry, I responded
> > without reading
> > > with too much attention):
> > > - if yours is a *.war archive only, then adding struts.jar to your
> > > WEB-INF/lib directory should work. My previous suggestions
> > are still valid
> > > but may not solve the problem.
> > > - if yours is a *.ear, then adding JARs to the WEB-INF/lib
> > will not work
> > in
> > > Weblogic as the main ClassLoader is the one used for the
> > EJBs (that have
> > no
> > > visibility on your WEB-INF/lib). You should then use the MANIFEST.MF
> > > "Class-Path" thing.
> > >
> > > Andrej
> > >
> > > > -----Original Message-----
> > > > From: Anna Chen [mailto:[EMAIL PROTECTED]]
> > > > Sent: Friday, December 14, 2001 11:02 AM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: Weblogic problem...
> > > >
> > > >
> > > > Hi, all
> > > >
> > > > Could you tell me why I get this kind of error? I am using
> > > > weblogic 6.1 on
> > > > UNIX and I do have struts.jar in my WEB-INF/lib
> > > >
> > > > <[WebAppServletContext(4667798,brd-admin,/brd-admin)]
> > action: Error
> > > > creating Action instance for path '/login', class name
> > > > 'com.brandsdirect.common.login.LoginAction'
> > > > java.lang.NoClassDefFoundError: org/apache/struts/action/Action
> > > >          at java.lang.ClassLoader.defineClass0(Native Method)
> > > >          at
> > java.lang.ClassLoader.defineClass(ClassLoader.java:486)
> > > >          at
> > > > java.security.SecureClassLoader.defineClass(SecureClassLoader.
> > > > java:111)
> > > >          at
> > > > java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
> > > >          at
> > java.net.URLClassLoader.access$100(URLClassLoader.java:56)
> > > >          at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
> > > >          at
> > java.security.AccessController.doPrivileged(Native Method)
> > > >          at
> > java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> > > >          at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
> > > >          at
> > > > sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
> > > >          at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
> > > >          at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
> > > >          at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
> > > >          at
> > > > java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
> > > >          at java.lang.Class.forName0(Native Method)
> > > >          at java.lang.Class.forName(Class.java:120)
> > > >          at
> > > > org.apache.struts.action.ActionServlet.processActionCreate(Act
> > > > ionServlet.java:1564)
> > > >          at
> > > > org.apache.struts.action.ActionServlet.process(ActionServlet.j
> > > > ava:1510)
> > > >          at
> > > >
> > org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:487)
> > > >          at
> > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> > > >          at
> > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > > >          at
> > > > weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servle
> > > > tStubImpl.java:263)
> > > >          at
> > > > weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servle
> > > > tStubImpl.java:200)
> > > >          at
> > > > weblogic.servlet.internal.WebAppServletContext.invokeServlet(W
> > > > ebAppServletContext.java:2390)
> > > >          at
> > > > weblogic.servlet.internal.ServletRequestImpl.execute(ServletRe
> > > > questImpl.java:1959)
> > > >          at
> > > > weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
> > > >          at
> > weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
> > > >  >
> > > >
> > > > Thanks!!
> > > >
> > > > Anna
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > > <mailto:[EMAIL PROTECTED]>
> > > > For additional commands, e-mail:
> > > > <mailto:[EMAIL PROTECTED]>
> > > >
> > >
> >
>



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to