Bugs item #780914, was opened at 2003-07-31 20:48 Message generated for change (Comment added) made by srivatsanp You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=780914&group_id=22866
Category: JBossMX Group: None >Status: Open Resolution: Works For Me Priority: 5 Submitted By: Srivatsan (srivatsanp) Assigned to: Scott M Stark (starksm) Summary: Class Loader issue Initial Comment: Hi, In JBoss 3.2.1, if any of the compressed deployment archive contains any resource present in a directory(say dtd/), then when some other archive has some resource in the same "dtd/" directory, it is not accessible. For e.g., Consider the following packaging structure: Test.sar --dtd/Test.dtd Application1.ear --dtd/Test1.dtd Application2.ear --Test.sar (This service is not able to access the Test1.dtd present in Application1.ear). The dtd is accessed using this.getClass().getClassLoader().getResource("dtd/Test1.dtd"); If Test.sar is deployed as an unpacked archive, the Test1.dtd is accessible. This is due to a bug in indexing in ClassLoaderUtils.java If the deployment unit is unpacked, it indexes the package names of the class file only. If the deployment unit is a compressed archive, it indexes all the entries present in the archive. This results in indexing of the dtd directory present in Test.sar. So when getResource("dtd/Test1.dtd") is performed, the dtd is searched only in Test.sar. ---------------------------------------------------------------------- >Comment By: Srivatsan (srivatsanp) Date: 2003-08-04 11:02 Message: Logged In: YES user_id=687037 Please find the attached zip which contains four ears: ear1.ear -- compressed archive ear2.ear, ear3.ear, ear4.ear -- unpacked deployments The ear4.ear contains a service which gets the Resources using, this.getClass().getClassLoader().getResource("conf/testing.xml") this.getClass().getClassLoader().getResource("conf/test.xml") this.getClass().getClassLoader().getResource("conf/aatesting.xml") The source for the service is also attached. Deploy the ears in the order: ear1.ear, ear2.ear, ear3.ear, ear4.ear. ---------------------------------------------------------------------- Comment By: Scott M Stark (starksm) Date: 2003-08-02 01:33 Message: Logged In: YES user_id=175228 I have updated the resource loading unit test to include exactly the configuration you indicate and I have no problem loading the dtd resource with 3.2.1. Reopen with a testcase that demonstrates the issue and look at the org.jboss.test.classloader.test.UnifiedLoaderUnitTestCase.testUnpackedResources case. ---------------------------------------------------------------------- Comment By: Srivatsan (srivatsanp) Date: 2003-08-01 13:31 Message: Logged In: YES user_id=687037 Is there any workaround for this? Is there a configuration for ignoring the indexing mechanism? ---------------------------------------------------------------------- Comment By: Srivatsan (srivatsanp) Date: 2003-08-01 10:59 Message: Logged In: YES user_id=687037 Forgot to mention that Application1.ear and Application2.ear are unpaccked deployments. Application1.ear/ dtd/Test1.dtd Application2.ear/ Test.sar ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=780914&group_id=22866 ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development