> -----Original Message-----
> From: Brian Topping [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 08, 2002 2:49 PM
> To: [EMAIL PROTECTED]
> Subject: MessageResources problem under JBoss 3.0
>
>
> Hiyas,
>
> I'm looking at a classloader problem with JBoss 3 and Struts
> 1.1B1. It would
> appear that this is the source of problems in loading
> properties files for
> struts users on JBoss.
>
> If there is anyone out there that is using JBoss 3, can you
> comment on your
> ability to load or not load properties files correctly, for
> instance in
> conjunction with ActionErrors?
>
> My environment:
>
> JBoss 3.0.1RC1_tomcat4.0.4 (same problem with JBoss 3 release)
> W2KSP2
> JDK 1.3.1_02
> Struts 1.1B1
>
> Standard deployment of Struts of course is to have a
> struts.jar in the deploy
> dir, next to the app.war file for the actual application.
> app.war has no
> problem loading classes or resources out of the struts.jar file.
Actually, no. Standard deployment is to have struts.jar *inside* your web
app, in WEB-INF/lib. If you check the examples that come with Struts, you'll
see that each web app has a copy of struts.jar inside it. If you don't do
this, you'll certainly run the likelihood of classloader problems.
--
Martin Cooper
>
> I've dug into MessageResources.getMessage(), and it's getting
> a resource
> stream with
> 'this.getClass().getClassLoader().getResourceAsStream(name)'.
> The caller is a utility method inside struts.jar, not the
> app.jar. Like I
> said, the call works fine for properties files that are in
> the struts.jar,
> but fails for properties that are in the app.war file.
>
> This is a major issue, since properties files that are listed in
> <message-resources/> can't be loaded. I presume that it
> works standalone
> tomcat just fine, otherwise someone else would have noticed ;)
>
> I'm suspecting incompatibility with JBoss Unified Class
> Loader -- I believe
> different jars mean these are different classloaders, so
> 'this.getClassLoader()' gets the wrong classloader. Either
> there is an
> implementation problem with JBoss -- that the UCL isn't
> following the proper
> semantics of getResource(), or Struts is pushing the edge of
> the semantics.
>
> Any thoughts on this?
>
> *any* help appreciated...
>
> best,
>
> -b
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>