9 Replies Latest reply on Apr 8, 2009 11:33 AM by jaikiran pai

    ClassCastException (JBossEntityBeanMetaData) when deploying

    Carsten Maneg Newbie

      Hi all,

      maybe just a configuration issue but cant find it.
      Getting a ClassCastException when I deploy th ear.
      (on JBoss 4.0.3.SP1 everything is fine)

      StackTrace:

      09:08:08,848 ERROR [AbstractKernelController] Error installing to PostClassLoader: name=vfsfile:/C:/jboss-5.0.1.GA/server/default/deploy/XYZ-EAR.ear/ state=ClassLoader mode=Manual requiredState=PostClassLoader
      org.jboss.deployers.spi.DeploymentException: Error during deploy: vfsfile:/C:/jboss-5.0.1.GA/server/default/deploy/XYZ-EAR.ear/xyz-ejb.jar/
      at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
      at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:177)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
      at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:698)
      at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
      at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
      at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
      at org.jboss.Main.boot(Main.java:209)
      at org.jboss.Main$1.run(Main.java:547)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.ClassCastException: org.jboss.metadata.ejb.jboss.JBossEntityBeanMetaData cannot be cast to org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData
      at org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData.merge(JBossSessionBeanMetaData.java:999)
      at org.jboss.metadata.ejb.jboss.JBossEnterpriseBeansMetaData.merge(JBossEnterpriseBeansMetaData.java:245)
      at org.jboss.metadata.ejb.jboss.JBossMetaData.merge(JBossMetaData.java:952)
      at org.jboss.ejb.deployers.MergedJBossMetaDataDeployer.deploy(MergedJBossMetaDataDeployer.java:94)
      at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
      ... 19 more
      ..........
      ( and finally)
      .....
      DEPLOYMENTS IN ERROR:
      Deployment "vfsfile:/C:/jboss-5.0.1.GA/server/default/deploy/XYZ-EAR.ear/" is in error due to the following reason(s): java.lang.ClassCastException: org.jboss.metadata.ejb.jboss.JBossEntityBeanMetaData cannot be cast to org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData

      Thanks a lot for your help
      Carsten

        • 1. Re: ClassCastException (JBossEntityBeanMetaData) when deploy
          jaikiran pai Master

           

          Caused by: java.lang.ClassCastException: org.jboss.metadata.ejb.jboss.JBossEntityBeanMetaData cannot be cast to org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData



          Can you please provide more details about your application? Is it a EJB3 application or is it EJB2.x? Also can you post the logs that you see on the console? What type of beans does the xyz-ejb.jar contain? If there are any ejb-jar.xml or jboss.xml associated, please post those too.

          While posting logs or xml content or code, please remember to wrap it in a code block by using the Code button in the message editor window. Please use the Preview button to ensure that your post is correctly formatted.

          • 2. Re: ClassCastException (JBossEntityBeanMetaData) when deploy
            Carsten Maneg Newbie

            Maybe jboss.xml and jbosscmp-jdbc.xml have to be changed?
            Any important changes between 4.0.3 and 5.0.1?
            Can't find an example in the docs..

            Its a EJB2.x application only.
            Just stateless session beans and entity beans (cmp).

            jboss.xml:

            <?xml version="1.0" encoding="UTF-8"?>
            <!DOCTYPE jboss PUBLIC
             "-//JBoss//DTD JBOSS 5.0//EN"
             "http://www.jboss.org/j2ee/dtd/jboss_5_0.dtd">
            <jboss>
            
             <enterprise-beans>
            
             <entity>
             <ejb-name>Ereignis_basel</ejb-name>
             <jndi-name>ejb/Ereignis_basel</jndi-name>
             <local-jndi-name>ejb/Ereignis_baselLocal</local-jndi-name>
            
             <method-attributes>
             </method-attributes>
            
             </entity>
            
             <session>
             <ejb-name>BenutzerVerwaltungBean</ejb-name>
             <jndi-name>ejb/BenutzerVerwaltungBean</jndi-name>
             <local-jndi-name>BenutzerVerwaltungBeanLocal</local-jndi-name>
            
             <method-attributes>
             </method-attributes>
             </session>
            
             </enterprise-beans>
            
             <assembly-descriptor>
             </assembly-descriptor>
            </jboss>
            


            ejb-jar.xml:


            <?xml version="1.0"?>
            
             <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
            
             <ejb-jar id="ejb-jar_ID">
            
             <enterprise-beans>
             <session>
             ...
             </session>
            
             <entity >
             ...
             </entity>
            
             </enterprise-beans>
             <assembly-descriptor>
            
            
             <container-transaction>
             ...
             </container-transaction>
            
             </assembly-descriptor>
            
             </ejb-jar>
            


            And the console output:

            14:49:18,607 INFO [ServerImpl] Starting JBoss (Microcontainer)...
            14:49:18,607 INFO [ServerImpl] Release ID: JBoss [Morpheus] 5.0.1.GA (build: SVNTag=JBoss_5_0_1_GA date=200902231221)
            14:49:18,607 INFO [ServerImpl] Bootstrap URL: null
            14:49:18,607 INFO [ServerImpl] Home Dir: C:\jboss-5.0.1.GA
            14:49:18,607 INFO [ServerImpl] Home URL: file:/C:/jboss-5.0.1.GA/
            14:49:18,607 INFO [ServerImpl] Library URL: file:/C:/jboss-5.0.1.GA/lib/
            14:49:18,607 INFO [ServerImpl] Patch URL: null
            14:49:18,607 INFO [ServerImpl] Common Base URL: file:/C:/jboss-5.0.1.GA/common/
            14:49:18,607 INFO [ServerImpl] Common Library URL: file:/C:/jboss-5.0.1.GA/common/lib/
            14:49:18,607 INFO [ServerImpl] Server Name: default
            14:49:18,607 INFO [ServerImpl] Server Base Dir: C:\jboss-5.0.1.GA\server
            14:49:18,607 INFO [ServerImpl] Server Base URL: file:/C:/jboss-5.0.1.GA/server/
            14:49:18,607 INFO [ServerImpl] Server Config URL: file:/C:/jboss-5.0.1.GA/server/default/conf/
            14:49:18,607 INFO [ServerImpl] Server Home Dir: C:\jboss-5.0.1.GA\server\default
            14:49:18,607 INFO [ServerImpl] Server Home URL: file:/C:/jboss-5.0.1.GA/server/default/
            14:49:18,607 INFO [ServerImpl] Server Data Dir: C:\jboss-5.0.1.GA\server\default\data
            14:49:18,607 INFO [ServerImpl] Server Library URL: file:/C:/jboss-5.0.1.GA/server/default/lib/
            14:49:18,607 INFO [ServerImpl] Server Log Dir: C:\jboss-5.0.1.GA\server\default\log
            14:49:18,607 INFO [ServerImpl] Server Native Dir: C:\jboss-5.0.1.GA\server\default\tmp\native
            14:49:18,607 INFO [ServerImpl] Server Temp Dir: C:\jboss-5.0.1.GA\server\default\tmp
            14:49:18,607 INFO [ServerImpl] Server Temp Deploy Dir: C:\jboss-5.0.1.GA\server\default\tmp\deploy
            14:49:19,184 INFO [ServerImpl] Starting Microcontainer, bootstrapURL=file:/C:/jboss-5.0.1.GA/server/default/conf/bootstrap.xml
            14:49:19,731 INFO [VFSCacheFactory] Initializing VFSCache [org.jboss.virtual.plugins.cache.CombinedVFSCache]
            14:49:19,731 INFO [VFSCacheFactory] Using VFSCache [CombinedVFSCache[real-cache: null]]
            14:49:20,027 INFO [CopyMechanism] VFS temp dir: C:\jboss-5.0.1.GA\server\default\tmp
            14:49:20,027 INFO [ZipEntryContext] VFS force nested jars copy-mode is enabled.
            14:49:20,917 INFO [ServerInfo] Java version: 1.6.0_10-beta,Sun Microsystems Inc.
            14:49:20,917 INFO [ServerInfo] Java Runtime: Java(TM) SE Runtime Environment (build 1.6.0_10-beta-b25)
            14:49:20,917 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 11.0-b12,Sun Microsystems Inc.
            14:49:20,917 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
            14:49:20,964 INFO [JMXKernel] Legacy JMX core initialized
            14:49:22,619 INFO [ProfileServiceImpl] Loading profile: default from: org.jboss.system.server.profileservice.repository.SerializableDeploymentRepository@19b746f(root=C:\jboss-5.0.1.GA\server, key=org.jboss.profileservice.spi.ProfileKey@143b82c3[domain=default,server=default,name=default])
            14:49:22,619 INFO [ProfileImpl] Using repository:org.jboss.system.server.profileservice.repository.SerializableDeploymentRepository@19b746f(root=C:\jboss-5.0.1.GA\server, key=org.jboss.profileservice.spi.ProfileKey@143b82c3[domain=default,server=default,name=default])
            14:49:22,619 INFO [ProfileServiceImpl] Loaded profile: ProfileImpl@131f745{key=org.jboss.profileservice.spi.ProfileKey@143b82c3[domain=default,server=default,name=default]}
            14:49:23,993 INFO [WebService] Using RMI server codebase: http://127.0.0.1:8083/
            14:49:30,019 INFO [NativeServerConfig] JBoss Web Services - Stack Native Core
            14:49:30,019 INFO [NativeServerConfig] 3.0.5.GA
            14:50:06,099 ERROR [AbstractKernelController] Error installing to PostClassLoader: name=vfsfile:/C:/jboss-5.0.1.GA/server/default/deploy/XYZ-EAR.ear/ state=ClassLoader mode=Manual requiredState=PostClassLoader
            org.jboss.deployers.spi.DeploymentException: Error during deploy: vfsfile:/C:/jboss-5.0.1.GA/server/default/deploy/XYZ-EAR.ear/XYZ-ejb.jar/
             at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
             at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:177)
             at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
             at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
             at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
             at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
             at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
             at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
             at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
             at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
             at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
             at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
             at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
             at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
             at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:698)
             at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
             at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
             at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
             at org.jboss.Main.boot(Main.java:209)
             at org.jboss.Main$1.run(Main.java:547)
             at java.lang.Thread.run(Thread.java:619)
            Caused by: java.lang.ClassCastException: org.jboss.metadata.ejb.jboss.JBossEntityBeanMetaData cannot be cast to org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData
             at org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData.merge(JBossSessionBeanMetaData.java:999)
             at org.jboss.metadata.ejb.jboss.JBossEnterpriseBeansMetaData.merge(JBossEnterpriseBeansMetaData.java:245)
             at org.jboss.metadata.ejb.jboss.JBossMetaData.merge(JBossMetaData.java:952)
             at org.jboss.ejb.deployers.MergedJBossMetaDataDeployer.deploy(MergedJBossMetaDataDeployer.java:94)
             at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
             ... 19 more
            14:50:08,987 INFO [JMXConnectorServerService] JMX Connector server: service:jmx:rmi://127.0.0.1/jndi/rmi://127.0.0.1:1090/jmxconnector
            14:50:09,237 INFO [MailService] Mail Service bound to java:/Mail
            14:50:11,953 WARN [JBossASSecurityMetadataStore] WARNING! POTENTIAL SECURITY RISK. It has been detected that the MessageSucker component which sucks messages from one node to another has not had its password changed from the installation default. Please see the JBoss Messaging user guide for instructions on how to do this.
            14:50:12,422 WARN [AnnotationCreator] No ClassLoader provided, using TCCL: org.jboss.managed.api.annotation.ManagementComponent
            14:50:12,609 INFO [TransactionManagerService] JBossTS Transaction Service (JTA version) - JBoss Inc.
            14:50:12,609 INFO [TransactionManagerService] Setting up property manager MBean and JMX layer
            14:50:13,062 INFO [TransactionManagerService] Initializing recovery manager
            14:50:13,280 INFO [TransactionManagerService] Recovery manager configured
            14:50:13,280 INFO [TransactionManagerService] Binding TransactionManager JNDI Reference
            14:50:13,312 INFO [TransactionManagerService] Starting transaction recovery manager
            14:50:14,248 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-127.0.0.1-8080
            14:50:14,248 INFO [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-127.0.0.1-8009
            14:50:14,248 INFO [StandardService] Starting service jboss.web
            14:50:14,248 INFO [StandardEngine] Starting Servlet Engine: JBoss Web/2.1.2.GA
            14:50:14,420 INFO [Catalina] Server startup in 272 ms
            14:50:14,451 INFO [TomcatDeployment] deploy, ctxPath=/jbossws
            14:50:15,294 INFO [TomcatDeployment] deploy, ctxPath=/web-console
            14:50:16,309 INFO [TomcatDeployment] deploy, ctxPath=/invoker
            14:50:16,512 INFO [RARDeployment] Required license terms exist, view vfszip:/C:/jboss-5.0.1.GA/server/default/deploy/jboss-local-jdbc.rar/META-INF/ra.xml
            14:50:16,543 INFO [RARDeployment] Required license terms exist, view vfszip:/C:/jboss-5.0.1.GA/server/default/deploy/jboss-xa-jdbc.rar/META-INF/ra.xml
            14:50:16,574 INFO [RARDeployment] Required license terms exist, view vfszip:/C:/jboss-5.0.1.GA/server/default/deploy/jms-ra.rar/META-INF/ra.xml
            14:50:16,590 INFO [RARDeployment] Required license terms exist, view vfszip:/C:/jboss-5.0.1.GA/server/default/deploy/mail-ra.rar/META-INF/ra.xml
            14:50:16,637 INFO [RARDeployment] Required license terms exist, view vfszip:/C:/jboss-5.0.1.GA/server/default/deploy/quartz-ra.rar/META-INF/ra.xml
            14:50:16,762 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: main
            14:50:16,809 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
            14:50:16,809 INFO [RAMJobStore] RAMJobStore initialized.
            14:50:16,809 INFO [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
            14:50:16,809 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
            14:50:16,824 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
            14:50:17,636 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
            14:50:18,182 INFO [ServerPeer] JBoss Messaging 1.4.1.GA server [0] started
            14:50:18,885 INFO [QueueService] Queue[/queue/ExpiryQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000
            14:50:18,994 INFO [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has leasing enabled, lease period 10000 milliseconds
            14:50:18,994 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@1bfc3ca started
            14:50:18,994 INFO [QueueService] Queue[/queue/DLQ] started, fullSize=200000, pageSize=2000, downCacheSize=2000
            14:50:18,994 WARN [ConnectionFactoryJNDIMapper] supportsFailover attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support failover
            14:50:18,994 WARN [ConnectionFactoryJNDIMapper] supportsLoadBalancing attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support load balancing
            14:50:18,994 INFO [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has leasing enabled, lease period 10000 milliseconds
            14:50:18,994 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@dc5259 started
            14:50:18,994 INFO [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has leasing enabled, lease period 10000 milliseconds
            14:50:18,994 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@73e204 started
            14:50:19,213 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
            14:50:19,338 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=XYZDS' to JNDI name 'java:XYZDS'
            14:50:19,353 INFO [TomcatDeployment] deploy, ctxPath=/
            14:50:19,416 INFO [TomcatDeployment] deploy, ctxPath=/jmx-console
            14:50:19,478 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
            
            DEPLOYMENTS IN ERROR:
             Deployment "vfsfile:/C:/jboss-5.0.1.GA/server/default/deploy/XYZ-EAR.ear/" is in error due to the following reason(s): java.lang.ClassCastException: org.jboss.metadata.ejb.jboss.JBossEntityBeanMetaData cannot be cast to org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData
            
            14:50:19,510 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
            14:50:19,541 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
            14:50:19,541 INFO [ServerImpl] JBoss (Microcontainer) [5.0.1.GA (build: SVNTag=JBoss_5_0_1_GA date=200902231221)] Started in 1m:919ms
            




            • 3. Re: ClassCastException (JBossEntityBeanMetaData) when deploy
              jaikiran pai Master

              Are you sure the Ereignis_basel ejb name of the entity bean in jboss.xml matches a entity bean in the ejb-jar.xml? Can you please post the exact contents of that ejb-jar.xml file?

              • 4. Re: ClassCastException (JBossEntityBeanMetaData) when deploy
                Carsten Maneg Newbie

                The names matches.
                Otherwise I would have problems with 4.0.3, or?

                 <entity >
                 <ejb-name>Ereignis_basel</ejb-name>
                 <home>cld.ejb.entity.Ereignis_baselHome</home>
                 <remote>ejb.entity.Ereignis_basel</remote>
                 <local-home>ejb.entity.Ereignis_baselLocalHome</local-home>
                 <local>ejb.entity.Ereignis_baselLocal</local>
                 <ejb-class>ejb.entity.Ereignis_baselBean</ejb-class>
                 <persistence-type>Container</persistence-type>
                 <prim-key-class>ejb.entity.Ereignis_baselPK</prim-key-class>
                 <reentrant>False</reentrant>
                 <cmp-version>2.x</cmp-version>
                 <abstract-schema-name>Ereignis_basel</abstract-schema-name>
                 <cmp-field >
                 <field-name>eba_id</field-name>
                 </cmp-field>
                 <cmp-field >
                 <field-name>eba_man_id</field-name>
                 </cmp-field>
                 <cmp-field >
                 <field-name>eba_nummer</field-name>
                 </cmp-field>
                 <cmp-field >
                 <field-name>eba_era_id</field-name>
                 </cmp-field>
                 <cmp-field >
                 <field-name>eba_par_id</field-name>
                 </cmp-field>
                 <cmp-field >
                 <field-name>eba_kto_id</field-name>
                 </cmp-field>
                 <cmp-field >
                 <field-name>eba_obj_id</field-name>
                 </cmp-field>
                 <cmp-field >
                 <field-name>eba_datum</field-name>
                 </cmp-field>
                 <cmp-field >
                 <field-name>eba_betrag</field-name>
                 </cmp-field>
                 </entity>
                


                • 6. Re: ClassCastException (JBossEntityBeanMetaData) when deploy
                  jaikiran pai Master

                   

                  Its a EJB2.x application only.


                  jboss.xml:


                  <?xml version="1.0" encoding="UTF-8"?>
                  <!DOCTYPE jboss PUBLIC
                   "-//JBoss//DTD JBOSS 5.0//EN"
                   "http://www.jboss.org/j2ee/dtd/jboss_5_0.dtd">
                  <jboss>
                  
                   <enterprise-beans>
                  ...
                  


                  See if changing the dtd to the following, helps:

                  <?xml version="1.0" encoding="UTF-8"?>
                  <!DOCTYPE jboss PUBLIC
                   "-//JBoss//DTD JBOSS 4.0//EN"
                   "http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd">
                  <jboss>
                   <enterprise-beans>
                  ...


                  • 7. Re: ClassCastException (JBossEntityBeanMetaData) when deploy
                    Carsten Maneg Newbie

                    Well, thats the original version (with dtd 4.0).
                    I just tried with dtd 5.0 as well.
                    That doesn't change anything...or at least this exception.

                    • 8. Re: ClassCastException (JBossEntityBeanMetaData) when starti
                      Carsten Maneg Newbie

                      Just to be correct the exception occurs on server startup....of course.

                      • 9. Re: ClassCastException (JBossEntityBeanMetaData) when deploy
                        jaikiran pai Master

                        Carsten,

                        From what you have shown so far, i don't see any obvious reasons why you are running into this problem. Could you try to reproduce this with a smaller application (with one EJB2.x entity bean and one EJB2.x session bean)?