0 Replies Latest reply on Nov 19, 2002 12:35 PM by neil blue

    IllegalAccessError using Castor from EJB

    neil blue Newbie

      Hello,

      I am using JBoss 3.0.0 and Castor 0.9.4.1. I have set up JBoss as described in:

      http://www.jboss.org/developers/projects/jboss/castor.jsp

      and deleted the castor.jar in the server/default/lib directory.

      However I have an IllegalAccessError when I try to get the database.

      Here is my simple code:

      InitialContext ic = new InitialContext();
      DataObjects jdo = ( DataObjects ) ic.lookup( "java:comp/env/jdo/Minimol" );
      Database db = jdo.getDatabase(); // <-- error occurs here

      The error I get is:

      16:45:05,230 ERROR [LogInterceptor] TransactionRolledbackException, causedBy:
      java.lang.IllegalAccessError: try to access method org.exolab.castor.mapping.loader.ClassDescriptorImpl.(Ljava/lang/Class;)V from class org.exolab.castor.mapping.loader.MappingLoader
      at org.exolab.castor.mapping.loader.MappingLoader.(Unknown Source)


      Please could anyone tell me what I am doing wrong here.

      Thank you
      Neil