• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

problem deploying simple EJB in weblogic

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello i m newbie n facing problem in deploying a simple Session bean in weblogic8.1. I have compiled all the three java files n have bothxml files...got them in a jar file n then deploying to weblogic but getting exception.. searched all the forums.. kindly answer. xml file coding are



--------------ejb-jar.xml----------------
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems,
Inc.//DTD Enterprise JavaBeans 1.1//EN"
"http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd">

<ejb-jar>
<description></description>
<enterprise-beans>
<session>
<display-name>FirstEJB</display-name>
<ejb-name>First</ejb-name>
<home>com.stardeveloper.ejb.session.FirstHome</home>
<remote>com.stardeveloper.ejb.session.First</remote>
<ejb-class>com.stardeveloper.ejb.session.FirstEJB</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>

<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>First</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Supports</trans-attribute>
</container-transaction>

<security-role>
<description>Users</description>
<role-name>users</role-name>
</security-role>
</assembly-descriptor>
</ejb-jar>


----------weblogic-ejb.jar----------------

<?xml version="1.0"?>

<!DOCTYPE weblogic-ejb-jar PUBLIC
'-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB//EN'
'http://www.bea.com/servers/wls810/dtd/weblogic-ejb-jar.dtd'>

<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>First</ejb-name>
<jndi-name>First</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>



-----------exception is--------------


Exception:weblogic.management.ApplicationException: Prepare failed. Task Id = 0 Module: firstEJB Error: [EJB:011025]The XML parser encountered an error in your deployment descriptor. Please ensure that your DOCTYPE is correct. You may wish to compare your deployment descriptors with the WebLogic Server examples to ensure the format is correct. The error was: The public id, "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN", specified in the XML document is invalid. Use one of the following valid public ids: "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN" "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" .

[Deployer:149033]preparing application firstEJB on myserver
[Deployer:149033]failed application firstEJB on myserver
[Deployer:149034]An exception occurred for task [Deployer:149026]Deploy application firstEJB on myserver.: Exception:weblogic.management.ApplicationException: Prepare failed. Task Id = 0 Module: firstEJB Error: [EJB:011025]The XML parser encountered an error in your deployment descriptor. Please ensure that your DOCTYPE is correct. You may wish to compare your deployment descriptors with the WebLogic Server examples to ensure the format is correct. The error was: The public id, "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN", specified in the XML document is invalid. Use one of the following valid public ids: "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN" "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" . .


kindly help.
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try using this in your ejb-jar.xml.

<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
 
sandeep kumar jangra
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanx karen young, I got it corrected, the problem was in the ejb-jar.xml's header. thanx
 
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to BEA/Weblogic forum...
 
Destroy anything that stands in your way. Except this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic