Linkage error: remote class violates classloader constraints

Discussions

EJB programming & troubleshooting: Linkage error: remote class violates classloader constraints

  1. hi all,
       i got remote handle of a session bean.but when i tried to use a remote method,the servlet is throwig exception as follows.please clear it,if u know.
    thanx in advance
    ....

    <ServletContext-General> Servlet failed with Exception
    java.lang.LinkageError: Class com/citibank/ibs/configurator/mlirequest/MLIReques
     violates loader constraints
           at java.lang.ClassLoader.defineClass0(Native Method)
           at java.lang.ClassLoader.defineClass(ClassLoader.java, Compiled Code)
    ...
  2. just check in ur class path. if there exist 2 copies of the same class in diff directories in the classpath then this error may be thrown by the JVM.
  3. what is your container ?
    check for multiple copies of the class file.
    This should normally be in the jar file, you could have another individual copy depending on how you compiled.
  4. Thanx friends,
      had an extra copy in the classpath..ok now!