Here is what my ejb-jar.xml file looks like


<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns="http://java.sun.com/xml/ns/javaee"; 
xmlns:ejb="http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"; 
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"; version="3.0">
  <display-name>
Secondenterprise </display-name>
  <ejb-client-jar>SecondenterpriseClient.jar</ejb-client-jar>
  <enterprise-beans>
      <session>
            <ejb-name>ThirdObject</ejb-name>
            <ejb-class>com.ent.third.ThirdObject</ejb-class>
            <remote>ThirdObjectRemote</remote>
      </session>
  </enterprise-beans>
</ejb-jar>


From: Kevan Miller [mailto:[email protected]]
Sent: Tuesday, March 10, 2009 8:32 AM
To: [email protected]
Subject: Re: jar.xml files


On Mar 10, 2009, at 12:12 AM, Russell Collins wrote:


I am having an issue with the ejb-jar.xml and openejb-jar.xml files.  When I 
don't add anything to these files, they have no errors.  However, when I add an 
element (in this case <enterprise-beans>) I get the following errors:

[severity=ERROR,message=unexpected element (uri:"", local:"enterprise-beans"). 
Expected elements are 
<{http://openejb.apache.org/xml/ns/openejb-jar-2.2}ejb-ql-compiler-factory>,<{http://geronimo.apache.org/xml/ns/deployment-1.2}service>,<{http://geronimo.apache.org/xml/ns/naming-1.2}message-destination>,<{http://openejb.apache.org/xml/ns/openejb-jar-2.2}db-syntax-factory>,<{http://geronimo.apache.org/xml/ns/security-2.0}security>,<{http://geronimo.apache.org/xml/ns/deployment-1.2}environment>,<{http://java.sun.com/xml/ns/persistence}persistence>,<{http://geronimo.apache.org/xml/ns/naming-1.2}cmp-connection-factory>,<{http://openejb.apache.org/xml/ns/openejb-jar-2.2}relationships>,<{http://geronimo.apache.org/xml/ns/deployment-1.2}gbean>,<{http://openejb.apache.org/xml/ns/openejb-jar-2.2}enterprise-beans>,<{http://openejb.apache.org/xml/ns/openejb-jar-2.2}enforce-foreign-key-constraints>,<{http://geronimo.apache.org/xml/ns/j2ee/application-1.2}security>,locator=[node=null,object=null,url=null,line=11,col=24,offset=-1]]

Looks like your enterprise-beans element is in the wrong xml namespace. What 
does your plan look like?

--kevan

Reply via email to