[ 
http://jira.jboss.com/jira/browse/JBAS-1551?page=comments#action_12316222 ]
     
Bruno Melloni commented on JBAS-1551:
-------------------------------------

Isolation of logging is better in 4.0.2RC1, but not perfect.  Using 
EAR-specific log4j.jar,  commons-logging.jar and application-specific log4j.xml 
no longer causes exceptions.  But instead of just logging the application 
messages it hijacks all messages, including the server log messages (like 
"started...", "deploying...", etc).

Also, other isolation problems popped up in 4.0.2RC1 that did not exist in 
prior versions.  For example, an application that uses Hibernate will throw 
java.lang.NoClassDefFoundError: org/apache/commons/collections/SequencedHashMap 
even though that class is present in the application's 
WEB-INF/lib/commons-collections.jar.  This problem did not exist in prior 
versions.

As a reminder, this happens with applications packaged as EARs, and with both 
the application and server configured for J2EE 1.4 compliance, where supposedly 
the EAR should not see any JARs from the server or other EARs.

I will attach a new coA.ear and supporting files that clearly shows these 2 
issues.

> Classloader bug (version > 3.2.3)
> ---------------------------------
>
>          Key: JBAS-1551
>          URL: http://jira.jboss.com/jira/browse/JBAS-1551
>      Project: JBoss Application Server
>         Type: Bug
>     Versions: JBossAS-4.0.1 Final,  JBossAS-3.2.7 Final
>  Environment: All O/S.  Tested on WinXP and Linux
>     Reporter: Bruno Melloni
>     Assignee: Scott M Stark
>      Fix For:  JBossAS-4.0.2RC1
>  Attachments: TestServlet.java, coA.ear, coB.ear
>
>
> Bug did not exist in version 3.2.3.  It is present in (at least) 3.2.6 and 
> 4.0.1.  Bug may be a simple "documentation bug" caused by not updating 
> published configuration instructions after making a server change.
> Bug: It is no longer possible to run an application in its own classloader 
> instead of the unified classloader, even when configured in an EAR according 
> to published jBoss instructions for private classloaders.
> The following test application was confirmed to work with 3.2.3 but have .jar 
> conflicts with jBoss 3.2.6 and 4.0.1 (commons-logging.jar to be specific) at 
> deployment time.  The conflicts would not occur if there classloader 
> isolation worked correctly.
> coA.ear:
> - coA.war:
> --- index.jsp
> --- META-INF/Manifest.mf
> --- WEB-INF/web.xml
> --- WEB-INF/classes/coLog4j.xml (not used at this point)
> --- WEB-INF/classes/TestServlet.class
> --- WEB-INF/lib/commons-logging.jar
> --- WEB-INF/lib/log4j-1.2.9.jar
> - META-INF/application.xml
> - META-INF/jboss-app.xml
> - META-INF/Manifest.mf
> - Manifest.mf (both are default ant manifests with no manual content)
> - application.xml:
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 
> 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd";>
> <application id="Application_ID">
>   <display-name>Test A</display-name>
>   <module>
>     <web>
>       <web-uri>coA.war</web-uri>
>       <context-root>coA</context-root>
>     </web>
>   </module>
> </application>
> - jboss-app.xml:
> <?xml version="1.0"?>
> <jboss-app>
>   <loader-repository> 
>     coa.akuratus.com:loader=coA.ear
>     <loader-repository-config> 
>       java2ParentDelegation=false 
>     </loader-repository-config> 
>   </loader-repository> 
> </jboss-app>
> - web.xml:
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 
> 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd";>
> <web-app id="WebApp">
>     <display-name>coA</display-name>  
>       <servlet>
>               <servlet-name>log4jTest</servlet-name>
>               <servlet-class>TestServlet</servlet-class>
>               <load-on-startup>1</load-on-startup>
>       </servlet>
> <welcome-file-list>
>     <welcome-file>index.jsp</welcome-file>
> </welcome-file-list>
> </web-app>
> - TestServlet.java:
> import javax.servlet.http.HttpServlet;
> import org.apache.log4j.Logger;
> public class TestServlet extends HttpServlet {
>     public static String hello = "HELLO 1";
>     public void init() {
>       System.out.println("\n\n"+hello+"\n\n");
>     }
> }
> An identical setup was made for coB.ear, but with "HELLO 2" as the 
> string for the servlet.  In 3.2.3 both ears can be loaded and unloaded
> with no exceptions, and the proper strings displaying at load time.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.jboss.com/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-Development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to