RE: Library placement

2001-10-23 Thread Doug Graesser

Perry

I had problems until I upgaded to jakarta-struts-1.0-b3.

I put the struts.jar file in WEB-INF/lib as you have stated.
I also have all of the servlet classes in  WEB-INF/classes,
and no reference to these in the orion/lib paths.

Doug Graesser



-Original Message-
From: Perry Hoekstra [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 19, 2001 12:06 PM
To: Orion-Interest
Subject: Library placement


What is the correct placement of supporting libraries for an application 
  within Orion?  We are running into continual class loader issues no 
matter where we place them.

We have tried:

- The approved J2EE blueprints location which is WEB-INF/lib.  This 
works fine in Tomcat, however, I get a ClassNotFound exception a Struts 
class (the Struts ActionHome class).

- Orion directed path which is a lib directory at the base of the .ear 
file.  This I tried based on messages from the Orion mailing list and 
the Elephantwalker support site.  My libraries were document in the 
orion-application.xml configuration file in the library tag.  This 
causes intermittant class loader issues.  The first form which is 
derived from a Struts ActionForm comes up fine but the next form throws 
a ClassNotFound exception.  In addition, Struts tags (ie. the ErrorTag) 
is not found when the page that has that tag is accessed.

- Placing libraries on the classpath for Orion server startup.  Again, 
problems with ClassNotFound exceptions.

I grant you, all of this issues seem to resolve around the Struts 
framework.  Is anyone aware of a problem revolving around Struts and 
Orion specially dealing with classloader issues?  On the Struts site, 
the only issues it documents have to deal with an old version of Orion 
(1.0.3) I think.

BTW, I have these problems using 1.5.2 and 1.5.3 on Solaris 2.8, Linux 
RH 7.1, Windows NT 4.0sp6, and Windows 2000.  So I know that it is not 
an OS-specific problem.

At this point, I am at a loss... Thoughts, ideas???

-- 
Perry Hoekstra
E-Commerce Architect
Talent Software Services
[EMAIL PROTECTED]





Re: Library placement

2001-10-22 Thread Perry Hoekstra

Peter den Haan wrote:


 
 My apologies. The combination of a very Dutch-sounding name and the
 dutchman mail alias made for some unwarranted assumptions on my part :^)


My great-grandparents emigrated just before the turn of the century.  I 
am told I used to be able so speak some Dutch that my great-grandmother 
taught me when I was young but it did not stick.


 
 I'm using Struts 1.0 on Orion 1.5.2 with the jar in WEB-INF/lib - no
 problems whatsoever.
 
 Putting the jar in the CLASSPATH won't help - the orion.jar has its own
 classpath specified in the manifest file. For the same reason, putting it in
 the Orion directory won't help either. However, Orion will see any jar you
 put in orion/lib.
 
 However, WEB-INF/lib is where it really should be. Have you confirmed that
 the offending class is actually in the jar? It's a long shot, but...
 
 Regards,
 
  - Peter


I have the struts.jar file in the WEB-INF/lib directory.  I even 
downloaded the Struts source so I could trace the problem to the exact 
statement.

The following is from the ActionServlet.processActionCreate:

// Go ahead and create the new Action instance
// ASSERT:  This will never ever happen more than once
//  for a particular action class name
try {
   if (debug = 1) {
 log(  Creating new Action instance);
   }

   ClassLoader loader = Thread.currentThread().getContextClassLoader();
   System.out.println(ActionServlet.processActionCreate, our loader 
looks like this: [ + loader + ]);
   Class clazz = Class.forName(actionClass, true, loader);
   actionInstance = (Action) clazz.newInstance();
   actionInstance.setServlet(this);
   actions.put(actionClass, actionInstance);
} catch (Throwable t) {
   System.out.println(ActionServlet.processActionCreate, Throwable 
caught: [ + t.toString() + ]);
   log(Error creating Action instance for path ' +
 mapping.getPath() + ', class name ' +
 actionClass + ', t);
   return (null);
}

The output from this section looks like this:

ActionServlet.processActionCreate, our loader looks like this: 
[[ThreadContextLoader, current context: [ClassLoader: 
[[/opt/prod/application-deployments/subrotrack/subrotrack/subrotrack-web/WEB-INF/lib/httpunit.jar],
 
[/opt/prod/application-deployments/subrotrack/subrotrack/subrotrack-web/WEB-INF/lib/httpclient.jar],
 
[/opt/prod/application-deployments/subrotrack/subrotrack/subrotrack-web/WEB-INF/lib/cactus.jar],
 
[/opt/prod/application-deployments/subrotrack/subrotrack/subrotrack-web/WEB-INF/lib/log.jar],
 
[/opt/prod/application-deployments/subrotrack/subrotrack/subrotrack-web/WEB-INF/lib/commons-collections.jar],
 
[/opt/prod/application-deployments/subrotrack/subrotrack/subrotrack-web/WEB-INF/lib/struts.jar],
 
[/opt/prod/application-deployments/subrotrack/subrotrack/subrotrack-web/WEB-INF/lib/application.jar],
 
[/opt/prod/application-deployments/subrotrack/subrotrack/subrotrack-web/WEB-INF/lib/commons-digester.jar],
 
[/opt/prod/application-deployments/subrotrack/subrotrack/subrotrack-web/WEB-INF/lib/commons-beanutils.jar],
 
[/opt/prod/application-deployments/subrotrack/subrotrack/subrotrack-web/WEB-INF/lib/junit.jar],
 
[/opt/prod/application-deployments/subrotrack/subrotrack/subrotrack-web/WEB-INF/classes]
ActionServlet.processActionCreate, Throwable caught: 
[java.lang.NoClassDefFoundError: org/apache/struts/action/Action]

What is really weird is that it displays an ActionForm before this process is 
executed.  So it can find org/apache/struts/action/ActionForm

but not Action.


Thoughts?


-- 
Perry Hoekstra
E-Commerce Architect
Talent Software Services
[EMAIL PROTECTED]





Library placement

2001-10-19 Thread Perry Hoekstra

What is the correct placement of supporting libraries for an application 
  within Orion?  We are running into continual class loader issues no 
matter where we place them.

We have tried:

- The approved J2EE blueprints location which is WEB-INF/lib.  This 
works fine in Tomcat, however, I get a ClassNotFound exception a Struts 
class (the Struts ActionHome class).

- Orion directed path which is a lib directory at the base of the .ear 
file.  This I tried based on messages from the Orion mailing list and 
the Elephantwalker support site.  My libraries were document in the 
orion-application.xml configuration file in the library tag.  This 
causes intermittant class loader issues.  The first form which is 
derived from a Struts ActionForm comes up fine but the next form throws 
a ClassNotFound exception.  In addition, Struts tags (ie. the ErrorTag) 
is not found when the page that has that tag is accessed.

- Placing libraries on the classpath for Orion server startup.  Again, 
problems with ClassNotFound exceptions.

I grant you, all of this issues seem to resolve around the Struts 
framework.  Is anyone aware of a problem revolving around Struts and 
Orion specially dealing with classloader issues?  On the Struts site, 
the only issues it documents have to deal with an old version of Orion 
(1.0.3) I think.

BTW, I have these problems using 1.5.2 and 1.5.3 on Solaris 2.8, Linux 
RH 7.1, Windows NT 4.0sp6, and Windows 2000.  So I know that it is not 
an OS-specific problem.

At this point, I am at a loss... Thoughts, ideas???

-- 
Perry Hoekstra
E-Commerce Architect
Talent Software Services
[EMAIL PROTECTED]





Re: Library placement

2001-10-19 Thread Hani Suleiman

It sounds like Struts (like many projects from jakarta) has broken
classloading. You can print out the current classloader in Orion from any
class to see what paths are included. These consist of:

paths specified in orion-application.xml via library path=lib /
jar/zip files in orion/lib
jar/zip files in mywebapp/WEB-INF/lib

or if your app is packed into a .ear, Class-Path entries in MANIFEST.MF


On Fri, 19 Oct 2001, Perry Hoekstra wrote:

 What is the correct placement of supporting libraries for an application 
   within Orion?  We are running into continual class loader issues no 
 matter where we place them.
 
 We have tried:
 
 - The approved J2EE blueprints location which is WEB-INF/lib.  This 
 works fine in Tomcat, however, I get a ClassNotFound exception a Struts 
 class (the Struts ActionHome class).
 
 - Orion directed path which is a lib directory at the base of the .ear 
 file.  This I tried based on messages from the Orion mailing list and 
 the Elephantwalker support site.  My libraries were document in the 
 orion-application.xml configuration file in the library tag.  This 
 causes intermittant class loader issues.  The first form which is 
 derived from a Struts ActionForm comes up fine but the next form throws 
 a ClassNotFound exception.  In addition, Struts tags (ie. the ErrorTag) 
 is not found when the page that has that tag is accessed.
 
 - Placing libraries on the classpath for Orion server startup.  Again, 
 problems with ClassNotFound exceptions.
 
 I grant you, all of this issues seem to resolve around the Struts 
 framework.  Is anyone aware of a problem revolving around Struts and 
 Orion specially dealing with classloader issues?  On the Struts site, 
 the only issues it documents have to deal with an old version of Orion 
 (1.0.3) I think.
 
 BTW, I have these problems using 1.5.2 and 1.5.3 on Solaris 2.8, Linux 
 RH 7.1, Windows NT 4.0sp6, and Windows 2000.  So I know that it is not 
 an OS-specific problem.
 
 At this point, I am at a loss... Thoughts, ideas???