0 Replies Latest reply on Oct 6, 2010 4:59 AM by Emjay Khan

    EJB migration from JBoss 4.2.2 to 5.1.0

    Emjay Khan Newbie

      Hello.

       

      Migrating EJBs from JBoss 4.2.2 GA to JBoss 5.1.0 GA,
      I've run into this:

       

      Error installing to Parse: name=vfszip:/.../my-ejb.jar/ state=Not Installed mode=Manual requiredState=Parse
      org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfszip:/.../my-ejb.jar/
      ...
      DEPLOYMENTS IN ERROR:
        Deployment "vfszip:/.../my-ejb.jar/" is in error due to the following reason(s): org.jboss.xb.binding.JBossXBRuntimeException: Element {http://java.sun.com/xml/ns/javaee}jboss is not bound as a global element.

       

      The EJBs are written with EJB3.
      And its ejb-jar.xml is as follows:

       

      <?xml version="1.0" encoding="UTF-8"?>
      <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
                                  http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
               version="3.0">

      <description><![CDATA[My EJB components]]></description>
      <display-name><![CDATA[My EJBs]]></display-name>

      <enterprise-beans>
      <session>
        <ejb-name>MyManager</ejb-name>
        <remote>my.ejb_package.MyManager$Remote</remote>
        <local>my.ejb_package.MyManager$Local</local>
        <ejb-class>my.ejb_package.MyManagerBean</ejb-class>
        <session-type>Stateless</session-type>
        <transaction-type>Bean</transaction-type>
      </session>

      <message-driven>
        <ejb-name>MyMessageReceiver</ejb-name>
        <ejb-class>my.ejb_package.MyMessageReceiver</ejb-class>
        <transaction-type>Bean</transaction-type>
        <activation-config>  
         <activation-config-property>
          <activation-config-property-name>destinationType</activation-config-property-name>
          <activation-config-property-value>javax.jms.Queue</activation-config-property-value>
         </activation-config-property>
         <activation-config-property>
          <activation-config-property-name>acknowledgeMode</activation-config-property-name>
          <activation-config-property-value>AUTO_ACKNOWLEDGE</activation-config-property-value>
         </activation-config-property>
        </activation-config>
      </message-driven>
      </enterprise-beans>

      <assembly-descriptor>
      </assembly-descriptor>

      </ejb-jar>

       

      And jboss.xml looks like this:

       

      <?xml version="1.0" encoding="UTF-8"?>
      <jboss xmlns="http://java.sun.com/xml/ns/javaee"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
                  http://www.jboss.org/j2ee/schema/jboss_5_0.xsd"
          version="3.0">

      <enterprise-beans>
      <session>
        <ejb-name>MyManager</ejb-name>
        <jndi-name>my.ejb_package.MyManager/remote</jndi-name>
        <local-jndi-name>my.ejb_package.MyManager/local</local-jndi-name>
        <clustered>false</clustered>
        <cluster-config>
         <partition-name>${jboss.partition.name:DefaultPartition}</partition-name>
         <load-balance-policy>org.jboss.ha.framework.interfaces.FirstAvailable</load-balance-policy>
        </cluster-config>
      </session>

      <message-driven>
        <ejb-name>MyMessageReceiver</ejb-name> 
        <destination-jndi-name>queue/my-queue</destination-jndi-name>
        <mdb-user>guest</mdb-user>
        <mdb-passwd>guest</mdb-passwd>
      </message-driven>
      </enterprise-beans>

      <resource-managers>
      </resource-managers>

      </jboss>

       

      Does anyone know why this happens?
      And it'd be great if you can let me know how I can deploy the EJBs properly on JBoss 5.1.0.

       

      Thanks in advance.