wood burning stoves 2.0*
The moose likes BEA/Weblogic and the fly likes ejb deployment on weblogic 6.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "ejb deployment on weblogic 6.0" Watch "ejb deployment on weblogic 6.0" New topic
Author

ejb deployment on weblogic 6.0

Lalbahadur Bandaru
Greenhorn

Joined: Jun 01, 2002
Posts: 4
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
Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
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

Joined: Jun 01, 2002
Posts: 4
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
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
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

Joined: Jun 01, 2002
Posts: 4
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
Aaron Mulder
Author
Ranch Hand

Joined: Feb 25, 2003
Posts: 65
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)


<a href="http://www.javaranch.com/bookpromo.jsp" target="_blank" rel="nofollow">WebLogic Book Giveaway</a> 2/25-2/27
Lalbahadur Bandaru
Greenhorn

Joined: Jun 01, 2002
Posts: 4
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
Ranch Hand

Joined: Feb 25, 2003
Posts: 65
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.
 
 
subject: ejb deployment on weblogic 6.0
 
Similar Threads
Null pointer exception with ejbc while deploying a simple entity bean
Problem in Deploying EJB through V cafe 4.1
Weblogic 6.1 - EJB compilation problem
Getting exceptions while trying to run weblogic.ejbc
weblogic.ejbc command problem