Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

deployment problem

 
alec stewart stewart
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is wrong with my ejb-jar.xml file i am using weblogic 8.1
while deploying following error is faced:
Exception:weblogic.management.ApplicationException: Prepare failed. Task Id = 0 Module: hello 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: 12 column: 11. The content of element type "entity" is incomplete, it must match "(description?,display-name?,small-icon?,large-icon?,ejb-name,home,remote,ejb-class,persistence-type,prim-key-class,reentrant,cmp-field*,primkey-field?,env-entry*,ejb-ref*,security-role-ref*,resource-ref*)"..
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
<ejb-jar>
<description>this bean prints hello</description>
<enterprise-beans>
<entity>
<description>this is a test bean</description>
<ejb-name>HelloBean</ejb-name>
<home>foo.HelloHome</home>
<remote>foo.Hello</remote>
<ejb-class>foo.HelloBean</ejb-class>
</entity>
</enterprise-beans>
</ejb-jar>
can anyone give me a listing of a corrected file please............
 
prasad Chandrasekaran Iyer
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
your public id doesn't match with the xml validator you are using check out the Doctype
it is 1.1 and the dtd is 2.0
regards
prasad chandrasekaran
 
alec stewart stewart
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have made the change:
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
as suggested by you then to the problem persists
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are missing a number of required fields like: persistence-type,prim-key-class,reentrant, etc. (Look for all the ones that don't have a question mark or star after them).
You've not added basic things like is this a CMP or a BMP (persistence type) what primary key class to use (prim-key-class), etc. You need to go back and start with a basic text like Richard Monson-Haefel's or Ed Roman's and look at their examples.
Kyle
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic