• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

error in ejb-jar file

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I get the following error when I try to deploy a simple Stateless Sesseion EJB.
Exception:weblogic.management.ApplicationException: Prepare failed. Task Id = 7 Module: HelloWorld Error: [EJB:011024]The XML parser encountered an error in your deployment descriptor. Please ensure that your deployment descriptor corresponds to the format in the DTD. The error was: Error parsing file 'META-INF/ejb-jar.xml' at line: 8 column: 22. The content of element type "enterprise-beans" is incomplete, it must match "(session|entity|message-driven)+"..

ejb-jar file is:
<?xml version="1.0"?>

<!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>
<enterprise-beans>
<session>
<ejb-name>Hello</ejb-name>
<home>examples.ejb20.example1.HelloHome</home>
<remote>examples.ejb20.example1.Hello</remote>
<local-home>examples.ejb20.example1.HelloLocalHome</local-home>
<local>examples.ejb20.example1.HelloLocal</local>
<ejb-class>examples.ejb20.example1.HelloBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>

</session>
</enterprise-beans>

</ejb-jar>

Can anybody please tell me what is wrong?
Thanks
 
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
since you have the transaction-type as container, i would go ahead and add the container-transaction and see if this gets rid of the exception

<container-transaction>
<ejb-name>Hello</ejb-name>
<method-intf>Remote</method-intf>
<method-name>*</method-name>
<trans-attribute>Supports</trans-attribute>
</container-transaction>
 
reply
    Bookmark Topic Watch Topic
  • New Topic