You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by "Mitchell, Steven C" <St...@umb.com> on 2005/06/22 17:39:18 UTC

Content is not allowed in prolog

We recently starting developing with iBatis (I have used it before at
other sites).  It runs fine on a WebSphere 5.1 under Rational
Application Developer 6.0 on Windows XP; however, when we try to deploy
to WebSphere 5.1 on AIX iBatis will not load and we get the following
error:

Error 500: Error while configuring DaoManager. Cause:
com.iBatis.common.exception.NestedRuntimeException: Error occurred.
Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause:
org.xml.sax.SAXParseException: Content is not allowed in prolog. Caused
by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.
Cause: org.xml.sax.SAXParseException: Content is not allowed in prolog.
Caused by: org.xml.sax.SAXParseException: Content is not allowed in
prolog.

One of my team members found this link about a bug in RAD 6.0 where it
writes a bad Byte Offset Mark (BOM) in XML files (
<http://forum.java.sun.com/thread.jspa?threadID=567285&tstart=90>
http://forum.java.sun.com/thread.jspa?threadID=567285&tstart=90), so we
implemented the recommended circumvention on all the iBatis XML files
and switched from UTF-8 to ISO-8859-1 encoding. We still get the error.
 
Has anybody else had this problem?  Any suggestions?

Re: Content is not allowed in prolog

Posted by Brice Ruth <bd...@gmail.com>.
It probably is an encoding problem. Most likely having to do with the
platform default encoding. It is possible that Java/AIX is reading it
using a different default platform encoding than RAD on XP.

It can be tricky to resolve this, but as others have mentioned, it
isn't really an iBATIS issue. I would suggest creating a PMR with IBM
and having them help you figure out why WS running on Java/AIX is
throwing this error.

Brice

On 6/22/05, Mitchell, Steven C <St...@umb.com> wrote:
> We recently starting developing with iBatis (I have used it before at other
> sites).  It runs fine on a WebSphere 5.1 under Rational Application
> Developer 6.0 on Windows XP; however, when we try to deploy to WebSphere 5.1
> on AIX iBatis will not load and we get the following error:
> 
> 
> Error 500: Error while configuring DaoManager. Cause:
> com.iBatis.common.exception.NestedRuntimeException: Error
> occurred. Cause: com.ibatis.common.xml.NodeletException:
> Error parsing XML. Cause: org.xml.sax.SAXParseException: Content is not
> allowed in prolog. Caused by: org.xml.sax.SAXParseException: Content is not
> allowed in prolog. Caused by:
> com.ibatis.common.xml.NodeletException: Error parsing XML.
> Cause: org.xml.sax.SAXParseException: Content is not allowed in prolog.
> Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
> One of my team members found this link about a bug in RAD 6.0 where it
> writes a bad Byte Offset Mark (BOM) in XML files
> (http://forum.java.sun.com/thread.jspa?threadID=567285&tstart=90),
> so we implemented the recommended circumvention on all the iBatis XML files
> and switched from UTF-8 to ISO-8859-1 encoding. We still get the error.
>  
> Has anybody else had this problem?  Any suggestions?


-- 
Brice Ruth
Software Engineer, Madison WI

Re: Content is not allowed in prolog

Posted by Larry Meadors <la...@gmail.com>.
This really is not an iBATIS issue, but I suspect you must need to
somehow edit the XML in a plain text editor, and make sure there are
no unicode charaters in it, and that the very first line begins with
<?xml - on the first line with no spaces before it.

On 6/22/05, Mitchell, Steven C <St...@umb.com> wrote:
>  
> We recently starting developing with iBatis (I have used it before at other
> sites).  It runs fine on a WebSphere 5.1 under Rational Application
> Developer 6.0 on Windows XP; however, when we try to deploy to WebSphere 5.1
> on AIX iBatis will not load and we get the following error: 
>  
> 
> Error 500: Error while configuring DaoManager. Cause:
> com.iBatis.common.exception.NestedRuntimeException: Error
> occurred. Cause: com.ibatis.common.xml.NodeletException:
> Error parsing XML. Cause: org.xml.sax.SAXParseException: Content is not
> allowed in prolog. Caused by: org.xml.sax.SAXParseException: Content is not
> allowed in prolog. Caused by:
> com.ibatis.common.xml.NodeletException: Error parsing XML.
> Cause: org.xml.sax.SAXParseException: Content is not allowed in prolog.
> Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog. 
> One of my team members found this link about a bug in RAD 6.0 where it
> writes a bad Byte Offset Mark (BOM) in XML files
> (http://forum.java.sun.com/thread.jspa?threadID=567285&tstart=90),
> so we implemented the recommended circumvention on all the iBatis XML files
> and switched from UTF-8 to ISO-8859-1 encoding. We still get the error. 
>   
> Has anybody else had this problem?  Any suggestions?