Discussions

EJB programming & troubleshooting: Deployment Descriptor Problem

  1. Deployment Descriptor Problem (1 messages)

    Dear friends i am trying to host a simple helloword stateless session bean but when i try to deploy it on Jboss 3.2.1 the following exception through every time.

    !/META-INF/ejb-jar.xml process fatal error. Line: 4. Error message: The processi
    ng instruction target matching "[xX][mM][lL]" is not allowed.

    my deployment descriptor is as following.


    <!DOCTYPE ejb-jar PUBLIC
    "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
     "http://java.sun.com/dtd/ejb-jar_2_0.dtd">

    <?xml version="1.0" encoding="UTF-8"?>
    <ejb-jar>
    <description>JBoss Hello world</description>
    <display-name>Hello World EJB</display-name>
    <enterprise-beans>
         <session>
              <ejb-name>HelloWorld</ejb-name>
    <home>com.sample.HelloHome</home>
    <remote>com.sample.HelloWorld</remote>
    <ejb-class>com.sample.HelloWorldBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Bean</transaction-type>
        </session>
    </enterprise-beans>
    </ejb-jar>

    Thanks in advance...
  2. Deployment Descriptor Problem[ Go to top ]

    The XML declaration must be at the beginning of an XML file:

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

    <!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>
      ...
    </ejb-jar>