4 Replies Latest reply on Sep 3, 2013 9:39 AM by wdfink

    jboss 7.2 and ejb2+xdoclet

    qtm

      Hi,

      I've got a legacy app that uses ejb2 and xdoclet

      The entities have the Xdoclet comment

      /*

      * @jboss.entity-command

      *   name = "sybase-fetch-key"

      *   class = "org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCSybaseCreateCommand"

      */

      public class CustomEntity.

       

      At deployment I get :

      Caused by: java.lang.RuntimeException: JBAS010732: Couldn't create entity command

          at org.jboss.as.cmp.jdbc.JDBCCommandFactory.createCreateEntityCommand(JDBCCommandFactory.java:132)

          at org.jboss.as.cmp.jdbc.JDBCStoreManager.startStoreManager(JDBCStoreManager.java:216)

          at org.jboss.as.cmp.jdbc.JdbcStoreManagerStartService.start(JdbcStoreManagerStartService.java:44)

          ... 5 more

      Caused by: java.lang.ClassCastException: org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCSybaseCreateCommand cannot be cast to org.jboss.as.cmp.jdbc.JDBCCreateCommand

          at org.jboss.as.cmp.jdbc.JDBCCommandFactory.createCreateEntityCommand(JDBCCommandFactory.java:129)

          ... 7 more

       

      The jar for JDBCSybaseCreateCommand is added in the classpath, but it seems the JdbcStoreManagerStartService can't work with it. It requires an implementation of JDBCCreateCommand interface.

       

      I am doing something wrong or the only option is to upgrade the old code?

       

       

      Thanks

        • 1. Re: jboss 7.2 and ejb2+xdoclet
          wdfink

          The handling of ejb cmp has changed a lot. I.e. the jboss.xml descriptor will be ignored in AS7.

          Could you attach the ejb-jar and jboss DD, also the configuration (standlone or domain profile) you use?

          1 of 1 people found this helpful
          • 2. Re: jboss 7.2 and ejb2+xdoclet
            qtm

            Hi,

            I have all the beans declared in META-INF/jboss.xml files in the ejb-jars... . I can't attach the app (it's a prod app, not a test app), is there anything is particular I should look for?

             

            the structure is

            ear:

              lib - dependent jars

              ejbfirst.jar

              ejbsecond.jar

            • 3. Re: jboss 7.2 and ejb2+xdoclet
              arun168403

              Replace the entity command as "org.jboss.as.cmp.jdbc.keygen.JDBCSybaseCreateCommand". The commands are moved to different package in the Jboss7.

              1 of 1 people found this helpful
              • 4. Re: jboss 7.2 and ejb2+xdoclet
                wdfink

                Do you find the solution with the current answers? If yes you should mark the thread accordingly.

                From the Exception I suppose that you pack some old libraries in your application as you have a ClassCastException and not a ClassNotFound, that might be a force other problems.