0 Replies Latest reply on Sep 22, 2001 3:44 PM by Gerard

    NoClassDefinitionFoundError on EJB deploy

    Gerard Newbie

      Not sure if this is a bug or not but I want to relay my experience in case any one runs into the same problem.

      Created an EJB with BMP and a custom primary key I call IntegerString which is basically just that. The key was in a separate package and I tried putting it in the classpath for the EJB before I realized per the spec that it should reside in the same jar file as the EJB I was deploying. So I moved things around including the primary key and packaged it with the EJB but I kept getting the NCDFError. JBoss kept claiming that I was referencing the primary key from its old package and so I checked the Home, Remote and EJB class several times to make sure there was no reference to the old primary key. Recompiled and repackaged and checked the primary key reference in the ejb-jar.xml. Everything looked fine but kept receiving the error.

      After serveral days of trying to deploy the EJB, stopping and restarting JBoss, removing the tmp/deploy dir, etc I decided to try something different. I renamed the beans Home, Remote and EJB. Updated the ejb-jar and the error went away. Just to be sure I wasn't going crazy, I renamed them back to the original name and the error reappeared. Now I don't know where JBoss is holding on to this info but if you run into this very disturbing situation just try renaming your beans.

      Happy Coding,
      Gerard