Deployment Of Entity Beans using WebLogic 5.1 Version


EJB design: Deployment Of Entity Beans using WebLogic 5.1 Version

  1. When I try to build the xml files using ejbc utility (entity beans using the downloads available in I get the following error:
    C:\demoejb\sampc>java -classpath \java\lib\;\weblogic\classes;\weblog
    ic\lib\weblogicaux.jar;\weblogic\myserver\clientclasses -Dweblogic.home=\weblogi
    c weblogic.ejbc -compiler javac build\std_ejb_basic_containerManaged.jar \weblog
    org.xml.sax.SAXParseException: XML declaration may only begin entities.
            at com.sun.xml.parser.Parser.fatal(
            at com.sun.xml.parser.Parser.fatal(
            at com.sun.xml.parser.Parser.maybePI(
            at com.sun.xml.parser.Parser.maybeMisc(
            at com.sun.xml.parser.Parser.parseInternal(
            at com.sun.xml.parser.Parser.parse(
            at weblogic.xml.dom.SunDOMParser.getDocument(
            at weblogic.xml.dom.DOMParser.getDocument(
            at weblogic.ejb.deployment.dd.DescriptorLoader.<init>(DescriptorLoader.j
            at weblogic.ejbc.runBody(
            at weblogic.ejbc.main(

    If anybody know the reason for this kind of error.Please post ur answer for this.
  2. This is a problem with one of the XML file (deployment descriptors). Probably one of them is not well-formed.
  3. I would like to paste the XML file which I am using.Please let me know if there is any mistake in the XML files
    Here is the ejb-jar.xml file
    <?xml version="1.0" ?>
      <!DOCTYPE ejb-jar (View Source for full doctype...)>
    - <ejb-jar>
    - <enterprise-beans>
    - <entity>
    - <resource-ref>
    - <assembly-descriptor>
    - <container-transaction>
    - <method>

    Here is the XML file for weblogic-jar.xml
    <?xml version="1.0" ?>
      <!DOCTYPE weblogic-ejb-jar (View Source for full doctype...)>
    - <weblogic-ejb-jar>
    - <weblogic-enterprise-bean>
    - <caching-descriptor>
    - <reference-descriptor>
    - <resource-description>
    I downloaded both these files from the samples present in weblogic site.I am unable to find out the reason why it is not working
  4. I'm guessing your XML file doesn't literally say:
    "(View Source for full doctype...)"

    Also, are you using a service pack w/ 5.1?

  5. 1. You've pasted it from Internet Explorer. Could you use Notepad to copy the XML into the forum?
    2. Can you post your classpath here?