• Post Reply Bookmark Topic Watch Topic
  • New Topic

ejb-jar xml error  RSS feed

 
Tom Griffith
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello. If somebody has a minute, I keep getting this xml parsing error on deployment...

2005-05-06 13:38:23,440 DEBUG [org.jboss.ejb.EJBDeployer] init, cn.jar
2005-05-06 13:38:23,550 ERROR [org.jboss.metadata.XmlFileLoader] Content is not allowed in prolog.:40:1
org.xml.sax.SAXParseException: Content is not allowed in prolog.

I've checked all the xml files and they appear to be well-formed. Here is the prolog, or what I think the prolog is...

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
"http://java.sun.com/dtd/ejb-jar_2_0.dtd">

Does anybody see something wrong with it or what could be possibly casujing this error if it isn't syntax related? I've been tinkering with it for hours and the error keeps occuring. Thank you very much for reading this and for your time.
[ May 06, 2005: Message edited by: Tom Griffith ]
 
James Carman
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've had that error before. It had to do with how I was saving the file when I was editing it. If I edited the file in UltraEdit, I got the error. But, if I edited the file in IntelliJ IDEA, it was fine.
 
Tom Griffith
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yeah, I think it has to do with how certain text editors handle the encoding. I changed the utf-8 to utf-16 and the xml parser seems to be getting over it's problem with the prolog...i have now moved on to the next set of tagging errors but at least they are within the xml body.

I found it here at the sun site...the last post is what I think is relevant to the phenomena...

http://forum.java.sun.com/thread.jspa?threadID=567285&tstart=1
[ May 06, 2005: Message edited by: Tom Griffith ]
 
Sreenivasa Majji
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is one of the reason i stopped editing ejb-jar.xml files and started using Xdoclet for all my projects.

It's a wonderful tool and never had a problem in generating any configurations file such as web.xml, ejb-jar.xml.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!