-
1. Re: Classloader get wrong class between two diferent ear
jfht Feb 16, 2004 7:52 AM (in response to jfht)I'm not getting any answer in this topic! Am I in the wrong Forum? If yes which should I Post?
Thanks for any help! -
2. Re: Classloader get wrong class between two diferent ear
triathlon98 Feb 16, 2004 8:11 AM (in response to jfht)The classes which clash, are these classes the same?
In that case it would be best that the shared library is separate library jar which is deployed before the two ears.
If the classes have clashing class names, then you really should put them in different packages.
Is there interaction bewteen the two ears? If there is, then they better have the same classloader repository as this will make your app faster. If not then defining the classloader repository should work. I assume you used two different names (this is not clear in your post). If it still does not work, check that your xml conforms to the dtd and whether there are any warnings/errors in the logs.
Joachim -
3. Re: Classloader get wrong class between two diferent ear
jfht Feb 16, 2004 9:53 AM (in response to jfht)Both classes are diferente versions of one older.
So both classes are not the same.
There is no interaction or integration between both EARs.
Boths classes has the same package, they have the same function.
Ok, you will say that I should put them in an common jar inside the configuration lib dir. Is the objective, but now I need them as they are. This a work o two separeted dev teams... :(
I'm not clear that I defined well the classloaders. Even in the documentation I couldn't find a good explanation how to do it. I looke at google and merging both fonts I write the following two files:
------EAR1.ear/META-INF/jboss-app.xml---------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss-app
PUBLIC "-//JBoss//DTD J2EE Application 1.3//EN"
"http://www.jboss.org/j2ee/dtd/jboss-app_3_2.dtd">
<jboss-app>
<loader-repository>pt.isp.iol:loader=GCF</loader-repository>
</jboss-app>
-----------------------------------------------------------
------EAR2.ear/META-INF/jboss-app.xml---------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss-app
PUBLIC "-//JBoss//DTD J2EE Application 1.3//EN"
"http://www.jboss.org/j2ee/dtd/jboss-app_3_2.dtd">
<jboss-app>
<loader-repository>pt.isp.iol:loader=BO-ISP</loader-repository>
</jboss-app>
-----------------------------------------------------------
I don't get see any relevant warning besides clustering that I don't use.
Am I doing anything wrong in this xmls?
Do you know where I find better explanations to define classloaders?
Tnx -
4. Re: Classloader get wrong class between two diferent ear
formenti Feb 16, 2004 10:12 AM (in response to jfht)I don't know if it can work but try with:
<loader-repository>pt.isp.iol1:loader=GCF</loader-repository>
and
<loader-repository>pt.isp.iol2:loader=GCF</loader-repository>
(change the string before ":loader=")
Gio -
5. Re: Classloader get wrong class between two diferent ear
jfht Feb 16, 2004 10:45 AM (in response to jfht)I tried and didn't work.
For example in the doco we can read that this xml give the possibility to have diferent versions of the same code... That was the reason I used those files... -
6. Re: Classloader get wrong class between two diferent ear
raja05 Feb 16, 2004 11:54 PM (in response to jfht)Check your jmx-console to see if you have two different classloaders created ? For e.g.
the default domains look like jboss.j2ee: and then a list of items underneath. Check if ur
pt.isp..... is also listed as a separate domain? -
7. Re: Classloader get wrong class between two diferent ear
jfht Feb 17, 2004 5:37 AM (in response to jfht)No! I don't have it!
What am I doing wrong so?
Thanks! -
8. Re: Classloader get wrong class between two diferent ear
jfht Feb 17, 2004 5:37 AM (in response to jfht)Actullay I don't have any of them!
-
9. Re: Classloader get wrong class between two diferent ear
jfht Feb 17, 2004 9:41 AM (in response to jfht)What should I do to have those class loaders recognized by Jboss? Any one can help?
Thanks! -
10. Re: Classloader get wrong class between two diferent ear
jfht Feb 17, 2004 10:58 AM (in response to jfht)I'm searching, and I have found http://www.jboss.org/index.html?module=bb&op=viewtopic&t=29584
But the problem stills.
Any help?