Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Why does my MDB's weblogic-ejb-jar.xml and ejb-jar.xml fail XSD validation?

Posted on 2010-11-16
4
Medium Priority
?
3,322 Views
Last Modified: 2013-12-10
I've created an EJB 3.0 MDB but cannot even get to the point of starting the local WebLogic 10.3.2 server to test because the weblogic-ejb-jar.xml and ejb-jar.xml files fail XSD validation.  

Does anyone have working examples of these two files for an MDB that listens on a queue on WebLogic 10.3.2 server?

Here are the two files as they currently exist in my workspace.  I am surprised they fail validation because in large part I cut/pasted them from another thread in this forum.  The thread was posted about 5 years ago though, so perhaps the format of these files has changed.

ejb-jar.xml

<?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>LabAutoODSInterfaceEJB</display-name>
  <enterprise-beans>
    <message-driven>
      <ejb-name>LabAutoODSInterfaceEJB</ejb-name>
      <ejb-class>ejbs.ODSInterfaceMDB</ejb-class>
      <transaction-type>Container</transaction-type>
      <acknowledge-mode>auto_acknowledge</acknowledge-mode>
      <message-driven-destination>
        <destination-type>javax.jms.Queue</destination-type>
        <subscription-durability>Durable</subscription-durability>
      </message-driven-destination>
    </message-driven>
  </enterprise-beans>
</ejb-jar>

weblogic-ejb-jar.xml

<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-ejb-jar xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-ejb-jar" 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 http://xmlns.oracle.com/weblogic/weblogic-ejb-jar http://xmlns.oracle.com/weblogic/weblogic-ejb-jar/1.0/weblogic-ejb-jar.xsd">
  <!--weblogic-version:10.3.2-->
  <weblogic-enterprise-bean>
    <ejb-name>LabAutoODSInterfaceEJB</ejb-name>
    <message-driven-descriptor>
      <destination-jndi-name>jms/Queue-OdsInterfaceMDB</destination-jndi-name>
    </message-driven-descriptor>
  </weblogic-enterprise-bean>
</wls:weblogic-ejb-jar>

Any and all help is appreciated!
0
Comment
Question by:ZBigBeer
4 Comments
 
LVL 10

Expert Comment

by:ECollin
ID: 34153131
any stack trace ?
0
 
LVL 19

Expert Comment

by:ramazanyich
ID: 34153943
I think you should remove xmlns:ejb attribute from ejb-jar.xml file
0
 
LVL 17

Accepted Solution

by:
sweetfa2 earned 2000 total points
ID: 34233519
<?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>LabAutoODSInterfaceEJB</display-name>
  <enterprise-beans>
    <message-driven>
      <ejb-name>LabAutoODSInterfaceEJB</ejb-name>
      <ejb-class>ejbs.ODSInterfaceMDB</ejb-class>
      <transaction-type>Container</transaction-type>
      <message-destination-type>javax.jms.Queue</message-destination-type>
    </message-driven>
  </enterprise-beans>
</ejb-jar>

Open in new window



<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-ejb-jar xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-ejb-jar" 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 http://xmlns.oracle.com/weblogic/weblogic-ejb-jar http://xmlns.oracle.com/weblogic/weblogic-ejb-jar/1.0/weblogic-ejb-jar.xsd">
  <!--weblogic-version:10.3.2-->
  
  <wls:weblogic-enterprise-bean>
    <wls:ejb-name>LabAutoODSInterfaceEJB</wls:ejb-name>
    <wls:message-driven-descriptor>
      <wls:destination-jndi-name>jms/Queue-OdsInterfaceMDB</wls:destination-jndi-name>
    </wls:message-driven-descriptor>
  </wls:weblogic-enterprise-bean>
</wls:weblogic-ejb-jar>

Open in new window

0
 

Author Closing Comment

by:ZBigBeer
ID: 34234129
Thank you for the solution.  I am sincerely grateful for your help.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most of the developers using Tomcat find it easy to configure the datasource in Server.xml and use the JNDI name in the code to get the connection.  So the default connection pool using DBCP (or any other framework) is made available and the life go…
This article is about some of the basic and important steps to be used to improve the performance in web-sphere commerce application development. 1) Always leverage the Dyna-caching facility provided by the product 2) Remove the unwanted code …
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question