Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

error in ejb-jar file

 
Soniya
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • 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
 
Vicky Mohan
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • 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>
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!