1 Reply Latest reply on Mar 30, 2002 11:03 AM by jessica hekman

    DeploymentException with CMP2.0

    jessica hekman Newbie

      I am migrating from JBoss 2.4 to 3.0 in order to use CMP2.0, and having some problems. I'm using the AutoNumber in org.jboss.varia.autonumer (I built the jar file myself as it does not seem to be built in the general build for JBoss 3.0); had no problems with JAWS, but under CMP2.0 I am getting the following exception:

      10:30:02,070 ERROR [ServiceController] JMException thrown during ServiceProxy operation create on mbcomplete errean jboss.j2ee:service=EJB,jndiName=JBossUtilAutoNumber
      org.jboss.deployment.DeploymentException: No abstract accessors for field named 'id' found in entity class.

      There are indeed no such accessors, but why is CMP looking for them? I didn't mention them in ejb-jar.xml or in jbosscmp-jdbc.xml.

      The relevant part of ejb-jar.xml:


      jbosscmp-jdbc.xml in its entirety:

      <?xml version="1.0" encoding="UTF-8"?>

      <!DOCTYPE jbosscmp-jdbc PUBLIC "-//JBoss//DTD JBOSSCMP-JDBC 3.0//EN"


      <datasource-mapping>Hypersonic SQ</datasource-mapping>




      I suspect that the jbosscmp-jdbc.xml file is not actually being processed, because I have tried introducing well-formedness errors into it, and I do not see any exceptions thrown in response to that.


        • 1. Re: DeploymentException with CMP2.0
          jessica hekman Newbie

          All right, it's working now. I changed various things, but I believe what made the difference was ensuring that I was actually setting the primary key in the ejbCreate method of the bean (AutoNumberEJB2) class. I got into this fix originally by messing with JBoss util code which (I believe) isn't really supported any more and trying to make it work. In case anyone in charge browses this thread, I would like to say that (assuming that is in fact what fixed this) the original error message was misleading, so it'd be great to see that change at some point. I'd imagine that's low-priority, though.