1 Reply Latest reply on Mar 27, 2006 1:31 AM by sony3002

    EJB3 [org.jboss.deployment.DeploymentException: ejb-jar.xml

    sony3002

      hello all

      when i deploy my ejbmodule.jar in jboss-4.0.3SP1 with EJB3 i get the following error
      org.jboss.deployment.DeploymentException: ejb-jar.xml must either obey the right xml schema or define a valid DOCTYPE!

      first i will tell you my env.
      i am using jboss-4.0.3SP1 with EJB3
      J2SDK1.5 update 6
      netbeans IDE Enterprise Pack 5.5 Preview
      --------------------------------------------------
      i configured jboss-4.0.3SP1 with EJB3 as my application server in netbeans
      then i created an EJBModule project
      created a stateless session bean named UserLoginBean
      here is the code

      package test.ejb.user;
      
      import java.util.Vector;
      import javax.ejb.Remote;
      
      
      /**
       * This is the business interface for UserLogin enterprise bean.
       */
      
      
      public interface UserLoginRemote
      {
       public boolean doLogin(String userId,String memberId,String password)throws Exception;
      
       public Vector getUserRights(String userId)throws Exception;
      }
      


      package test.ejb.user;
      
      import java.util.Vector;
      import javax.ejb.*;
      
      /**
       * This is the bean class for the UserLoginBean enterprise bean.
       * Created Mar 26, 2006 8:56:08 PM
       * @author Administrator
       */
      @Stateless()
      public class UserLoginBean implements com.amlaki.cbmega.ejb.user.UserLoginRemote
      {
       public boolean doLogin(String userId,String memberId,String password)throws Exception
       {
       System.out.println("User Id Received from Remot Server is :"+userId);
       System.out.println("Member Id Received from Remot Server is :"+memberId);
       System.out.println("Password Received from Remot Server is :"+password);
       System.out.println("Returning true to the called programme.....");
       return true;
       }
      
       public Vector getUserRights(String userId)throws Exception
       {
       System.out.println("Called getUserRights() method of Jboss");
       return new Vector();
       }
      
      }
      

      jboss.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <jboss/>
      


      ejb-jar.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <ejb-jar version="3.0" 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">
      </ejb-jar>
      


      i build the ejb module and deployed the EJBModule.jar in

      D:\jboss-4.0.3SP1\server\default\deploy directory

      and then i get the error
      00:15:54,046 ERROR [MainDeployer] Could not create deployment: file:/D:/jboss-4.
      0.3SP1/server/default/deploy/EJBModule.jar
      org.jboss.deployment.DeploymentException: ejb-jar.xml must either obey the right xml schema or define a valid DOCTYPE!
       at org.jboss.metadata.ApplicationMetaData.importEjbJarXml(ApplicationMetaData.java:300)
       at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:151)
       ...........................
       ..........................



      00:15:54,359 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
      
      --- Incompletely deployed packages ---
      org.jboss.deployment.DeploymentInfo@dcfaf84d { url=file:/D:/jboss-4.0.3SP1/server/default/deploy/EJBModule.jar }
       deployer: MBeanProxyExt[jboss.ejb:service=EJBDeployer]
       status: Deployment FAILED reason: ejb-jar.xml must either obey the right xml schema or define a valid DOCTYPE!
       state: FAILED
       watch: file:/D:/jboss-4.0.3SP1/server/default/deploy/EJBModule.jar
       altDD: null
       lastDeployed: 1143398754046
       lastModified: 1143398754031
       mbeans:
      


      what is the problem ????

      please do help
      thanks

      Sony