Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-1151

When using a MappedSuperclass then application is not deployable

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • AS 4.2.2.GA
    • EJB3 Extensions
    • None

      I have tagged a class with the stereotype <<MappedSuperClass>> which holds some general attributes.

      As described in the EJB3 specification i didn't have a DAO implementation class, because they are not necessary.

      But when i try to deploy my application with JBoss 4.2.2.GA i got the following error:

      2007-12-04 15:03:51,328 DEBUG [org.jboss.ejb3.Ejb3Module] Initialization failed jboss.j2ee:service=EJB3,module=ejb3xfire-core-1.0-SNAPSHOT.jar
      java.lang.ClassNotFoundException: No ClassLoaders found for: com.company.samples.ejb3xfire.GeneralEntityDaoImpl
      at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:306)
      at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:521)
      at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
      at org.jboss.ejb3.Ejb3DescriptorHandler.getContainers(Ejb3DescriptorHandler.java:303)
      at org.jboss.ejb3.Ejb3Deployment.deployBeansFromLib(Ejb3Deployment.java:465)
      .......

      The whole stack trace can be found in the JBoss forum.

      When i'm using JBoss 4.0.5.GA with the EJB3 RC9 Patch 1 then my application is startable.

      Edit @ 10th December 2007:
      I found a solution to solve this problem.
      I removed the following entry from the jboss.xml
      <session>
      <ejb-name>GeneralEntityDao</ejb-name>
      </session>

      and removed the following entry from the ejb-jar.xml
      <session>
      <description>
      <![CDATA[

      ]]>
      </description>
      <ejb-name>GeneralEntityDao</ejb-name>
      <local>com.trinitec.samples.ejb3xfire.GeneralEntityDao</local>
      <ejb-class>com.trinitec.samples.ejb3xfire.GeneralEntityDaoImpl</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>
      </session>

      After this two changes, i can start up JBoss with my application and everything is working fine for the moment.

      Can i remove this two entries, or will this produce another problem somewhere else?
      And why is this running on JBoss 4.0.5.GA + EJB3 RC9 Patch 1?
      Some checks are missing in JBoss 4.2.2.GA?

              rhn-engineering-cdewolf Carlo de Wolf
              Darquerus Roland Burgermann (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: