AW: Struts + JBoss

2001-07-25 Thread ecn11


Hi.

 i've had trouble with jboss 2.2.2/tomcat 3.2.2...for this reason i dropped
 back to the 2.2.1/3.2.1 version and everything worked fine...

Ok, I dropped back, too, now - but without success. Are you using Struts 1.0
or a newer version?

 in my experimentation, it seems to be a classloader issue...any classes
you
 want to access from another class must be either on the same level, or
 higher in your classpath...if a .jar file that is located in the
 jboss/lib/ext directory is accessing a struts class or action class that
is
 in your WEB-INF/lib/this.jar file, then it will give you this message...

That's the way I am using the struts.jar now (in jboss/lib/ext). Does it
work at you, when you use 2.2.1/3.2.1 ? Or do you have any suggestions where
to put it otherwise... (I tried ear/war/WEB-INF/lib and the root of the .ear
as Gregor suggested and many other locations - without any success).

 it's been a real pain :-)

 Jon Brisbin
 Lamar, MO

Dominic Battré

- Original Message -
From: ecn11 [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 24, 2001 9:46 AM
Subject: Struts + JBoss


 Hi.

 Has anyone of you managed to make Struts and JBoss working together?

 This is my current situation: I use JBoss-2.2.2 + Tomcat-3.2.2 (by
 run_with_tomcat.bat - so they are running in one VM) and Struts 1.0.


 The problem is briefly: When I deploy a .ear-archive that contains a
 .war-archive with the classes Struts should use (e.g. the form and
 action-classes), it throws an exception:

 javax.servlet.jsp.JspException: Exception creating bean of class
 path/DetailsForm: java.lang.ClassNotFoundException: path/DetailsForm
 at
 org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:568)

 These are the lines of the Struts source-code where the exception is
thrown:
try {
   Class clazz = Class.forName(type);
   bean = clazz.newInstance();
   if (bean instanceof ActionForm)
((ActionForm) bean).setServlet(servlet);
} catch (Exception e) {
   throw new JspException
 (messages.getMessage(formTag.create, type,
  e.toString()));
}


 The reason I blame Struts for that is the following:
 When I try to instanciate DetailsForm manually from the .jsp-page there is
 absolutely no problem. But Struts seems to use another classpath.


 Using the same .jsp-pages/classes/struts-config.xml/web.xml with Tomcat
and
 J2EE-reference implementation works fine. - So I can say for sure that
 struts-config.xml and web.xml okay.


 This is the way the .ear-File looks like:

 .ear
META-INF\
   sun-j2ee-ri.xml, Manifest.mf, application.xml
war-ic.war
 lots of stuff
   WEB-INF\
   web.xml, struts-*.tld, struts-config.xml, global.properties
   classes\
   Resources.properties
   all my classes
ejb-jar-ic.jar
   the beans (they work fine)


 I once tried to add the .class-files manually to the classpath (not the
ones
 that are created by jboss, when I deploy the .ear, but the .class-files,
 that I built before building the .ear-file).

 After that Struts was able to find the classes, but my classpath was
 completely messed up. The global.properties for example (which is
accessible
 via InputStream is = getClass().getResourceAsStream(/global.properties)
 normally) was not found any more.

 Thanks in advance
 Dominic



AW: Struts + JBoss

2001-07-25 Thread ecn11


  Hi.

Hi.

  Has anyone of you managed to make Struts and JBoss working together?
  
  This is my current situation: I use JBoss-2.2.2 + Tomcat-3.2.2 (by
  run_with_tomcat.bat - so they are running in one VM) and Struts 1.0.
 
 Hi, I use struts in jboss+tomcat.
 
 I use 2 configurations:
 
 1st) 
 Separate ejb and war. There are no problems, since I have no EAR file.

Ok, I tried this but the result was the same...

javax.servlet.jsp.JspException: Exception creating bean of class
foo.bar.myclass: java.lang.ClassNotFoundException: foo.bar.myclass
at
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:568)

I copied the .war-file into the jboss/deploy folder. After that my classes
have been copied to
jboss/tmp/deploy/Default/war-ic.war/web1004/WEB-INF/classes - but Struts
doesn't find them anyway...

 --
 gR

Dominic Battré