• 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:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

ejb deployment on weblogic 6.0

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I am trying to deploy session EJBs on weblogic server with service pack 2 and getting the following error,
Please help me find solution to this error...
[java] org.xml.sax.SAXParseException: The markup in the document preceding
the root element must be well-formed.
[java] at weblogic.apache.xerces.framework.XMLParser.reportError(XMLPar
ser.java:1008)
[java] at weblogic.apache.xerces.framework.XMLDocumentScanner.reportFat
alXMLError(XMLDocumentScanner.java:625)
[java] at weblogic.apache.xerces.framework.XMLDocumentScanner$XMLDeclDi
spatcher.dispatch(XMLDocumentScanner.java:804)
[java] at weblogic.apache.xerces.framework.XMLDocumentScanner.parseSome
(XMLDocumentScanner.java:380)
[java] at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.ja
va:900)
[java] at weblogic.xml.process.ProcessorDriver.process(ProcessorDriver.
java:128)
[java] at weblogic.ejb20.dd.xml.EjbJarLoader_EJB11.process(EjbJarLoader
_EJB11.java:527)
[java] at weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtil
s.java:74)
[java] at weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtil
s.java:47)
[java] at weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtil
s.java:38)
[java] at weblogic.ejbc20.runBody(ejbc20.java:665)
[java] at weblogic.utils.compiler.Tool.run(Tool.java:81)
[java] at weblogic.ejbc.main(ejbc.java:20)
[java] --------------- nested within: ------------------
[java] weblogic.xml.process.XMLParsingException: The markup in the document
preceding the root element must be well-formed. - with nested exception:
[java] [org.xml.sax.SAXParseException: The markup in the document preceding
the root element must be well-formed.] Line: 1 Column: 1
[java] at weblogic.xml.process.ProcessorDriver.process(ProcessorDriver.
java:132)
[java] at weblogic.ejb20.dd.xml.EjbJarLoader_EJB11.process(EjbJarLoader
_EJB11.java:527)
[java] at weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtil
s.java:74)
[java] at weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtil
s.java:47)
[java] at weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtil
s.java:38)
[java] at weblogic.ejbc20.runBody(ejbc20.java:665)
[java] at weblogic.utils.compiler.Tool.run(Tool.java:81)
[java] at weblogic.ejbc.main(ejbc.java:20)
[java] ERROR: weblogic.xml.process.XMLParsingException: The markup in the d
ocument preceding the root element must be well-formed. - with nested exception:
[java] [org.xml.sax.SAXParseException: The markup in the document preceding
the root element must be well-formed.] Line: 1 Column: 1
BUILD FAILED
 
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I�ve seen this kind o error when I miss the xml element on the beginin of the dd files.
Chec if you have the tag:
<?xml version="1.0" encoding="UTF-8"?>
in all your dd�s also check if you have some missing tag.
Another point to consider is if you have edited the .xml files with some editor that corrupts the file, in last case try to build the .xml files again, this should help.
regards,
Marcos Maia.
 
Lalbahadur Bandaru
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I checked my ejb-jar and weblogic-ejb-jar files for missing tags. Every thing looks Ok, except, weblogic_sp.jar file in the lib directory is missing. Could this be the problem.
Thanks
Lal
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Lalbahadur Bandaru:
Every thing looks Ok, except, weblogic_sp.jar file in the lib directory is missing. Could this be the problem.


The weblogic_sp.jar file will only be present if you have applied an incremental Service Pack to your WebLogic install. It is not the problem.
Post your deployment descriptor here and we might be able to help find the problem.
 
Lalbahadur Bandaru
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The following are the dds I am using
ejb-jar.xml...
<?xml version="1.0"? encoding="UTF-8"?>
<!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>
<enterprise-beans>
<session>
<ejb-name>HelloBean</ejb-name>
<home>sbn.ejb.HelloSessionHome</home>
<remote>sbn.ejb.HelloSessionBean</remote>
<ejb-class>sbn.ejb.HelloSession</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<env-entry>
<env-entry-name>tradeLimit</env-entry-name>
<env-entry-type>java.lang.Integer </env-entry-type>
<env-entry-value>500</env-entry-value>
</env-entry>

</session>

</enterprise-beans>

<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>HelloBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
weblogic-ejb-jar.xml...
<?xml version="1.0"? encoding="UTF-8"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN' 'http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd'>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>HelloBean</ejb-name>
<jndi-name>hello.HelloBean</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
Thanks
Lal
 
Author
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looks like there an extra ? in the headers. You have:

<?xml version="1.0"? encoding="UTF-8"?>


Instead of:

<?xml version="1.0" encoding="UTF-8"?>


(Note the ? in the middle of your line!)
I think I've also seen errors like this if you have an XML comment which contains two dashes before the end of the comment:
<!-- -- --> (bad)
<!-- - - --> (good)
 
Lalbahadur Bandaru
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have made the changes Aaron has mentioned, to the dds, still I am getting the same error. There are no comments in my dds
 
Aaron Mulder
Author
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, as a last resort for voodoo errors, you can try shutting down WebLogic, deleting all the temp files (there's a directory called tmp_... in your tree which you can delete, as well as any directories under .wlnotdelete named for you web apps), make 100% sure a version of the EAR or application content with the updated files is deployed, ensure WebLogic is running in development mode (there's an env veriable in the startup script), and then restart the server. That will make sure it's not just an old version of the DDs kicking around somewhere.
 
I've got no option but to sell you all for scientific experiments. Or a tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic