Bugs item #609902, was opened at 2002-09-16 05:47 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=609902&group_id=22866
Category: JBossServer Group: v3.2 >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Alexei Yudichev (sflexus) Assigned to: Scott M Stark (starksm) Summary: java.lang.LinkageError: loader ... Initial Comment: Assume some application (client) deployed into jboss uses EJBs deployed in another application (server). If client's interfaces declared as throwing some custom exception (in this case this exception has to be present in both client and server jars/wars/ears) a java.lang.LinkageError may occur when trying to invoke inside client methods of server's interface those throwing that custom exception: java.lang.LinkageError: loader constraints violated when linking xxx/xxx/Clazz class In my case the exception occurs after I re-deploy the client application. Only by restarting jboss it is possible to restore the normal functionality once the error is occured. I suppose this is because the custom exception class isn't loaded by a common classloader as all interface classes, return type classes etc. are. This problem doesn't appear in jboss 2.4.x. EJB spec allows custom exceptions so I think this is a bug, not a feature. ---------------------------------------------------------------------- >Comment By: Scott M Stark (starksm) Date: 2002-12-07 21:48 Message: Logged In: YES user_id=175228 Duplicate classes within a loader repository are no longer loaded by more than one class loader so this issue should be resolved. ---------------------------------------------------------------------- Comment By: Scott M Stark (starksm) Date: 2002-09-28 13:08 Message: Logged In: YES user_id=175228 In 3.0 this is just a packaging issue. 2.4 would automatically downgrade communcation to marshall call between incompatible class loading contexts. 3.0 does not do this so you simply need to place the shared classes into a common jar and drop it in the lib directory. 3.2 will try to resolve these conflicts and create scoped class loading contexts as neccessary. ---------------------------------------------------------------------- Comment By: Alexei Yudichev (sflexus) Date: 2002-09-17 06:55 Message: Logged In: YES user_id=345880 Allright I found that this is a feature of a classloaders architecture which counts on there're no duplicate classes across deployed applications. But could the error be handled somehow? ---------------------------------------------------------------------- Comment By: Alexei Yudichev (sflexus) Date: 2002-09-16 09:28 Message: Logged In: YES user_id=345880 I have changed my custom exception to JavaMail's AddressException and the problem still persists. Then I've removed application exceptions entirely and at last everything started to work well. So the problem doesn't depend on whether declared in bean interface exceptions are packaged with application or they are standard exceptions loaded from jbosshome/server/<name>/lib jars. ---------------------------------------------------------------------- Comment By: Alexei Yudichev (sflexus) Date: 2002-09-16 08:52 Message: Logged In: YES user_id=345880 I have changed my custom exception to JavaMail's AddressException and the problem still persists. Then I've removed application exceptions entirely and at last everything started to work well. So the problem doesn't depend on whether declared in bean interface exceptions are packaged with application or they are standard exceptions loaded from jbosshome/server/<name>/lib jars. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=609902&group_id=22866 ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
