- This topic has 2 replies, 2 voices, and was last updated 19 years, 1 month ago by kosl.
-
AuthorPosts
-
koslMemberDear all,
I’m writing an application which consists of two parts. EJB and web. I wanted to use the same jar in both of them. But then I get the following error:Caused by: java.lang.LinkageError: Class org/apache/myfaces/custom/tree2/TreeNodeBase violates loader constraints at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1629) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:850) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1299) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2365) at java.lang.Class.getDeclaredMethod(Class.java:1907) at java.io.ObjectStreamClass.getPrivateMethod(ObjectStreamClass.java:1327) at java.io.ObjectStreamClass.access$1600(ObjectStreamClass.java:47) at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:394) at java.security.AccessController.doPrivileged(Native Method) at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:373) at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:268) at java.io.ObjectStreamClass.initProxy(ObjectStreamClass.java:464) at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1502) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1457) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339) at org.jboss.invocation.MarshalledValue.get(MarshalledValue.java:78) at org.jboss.invocation.InvokerInterceptor.invokeMarshalled(InvokerInterceptor.java:203) ... 72 more
In both project’s the jar is exactly the same…
I’ve really tried everything and I’ll be grateful for any suggestions what might be wrong, I’ve spend like 2 weeks trying to figure it out and I don’t really know what do do. Maybe something is wrong with my deploy configuration of myeclipse ?
Thanks in advance for any advice
Karol Oslowski
Riyad KallaMemberKarol,
I don’t have an answer for you but I do have a few tips:1) Have you googled to find out what violation will cause the error message above? For example, is it possible that you are using two classes that have different time stamps, and that simple difference is causing this violation in the class loader?
2) Have you tried posting your question to the SUn forums: http://forums.java.sun.com they can be quite helpful at times.
koslMemberThank you for your tips. I don’t really think that I’m using two classes because I have only one jar (tomahawk) with this class. The only chance is that “org/apache/myfaces/custom/tree2/TreeNodeBase” is in jboss, but as far as I know it’s not the case. The second possibility is that I’m doing something wrong with deploying external jars…
Anyway thank you for your answer
Karol Oslowski
-
AuthorPosts