This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Problem with iBatis 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 » Databases » Object Relational Mapping
Bookmark "Problem with iBatis" Watch "Problem with iBatis" New topic
Author

Problem with iBatis

Harshada Deshmukh
Greenhorn

Joined: Mar 25, 2007
Posts: 12
Hi every one!
I am facing problem with iBatis configration.I am encountering a strange error. It seems that the parser is unble to parse the sql-map-config.xml file. Any help would be greatly appreciated. Thanks. I am getting stack of error as

java.lang.RuntimeException: Error occurred. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:89)
at com.ibatis.sqlmap.client.SqlMapClientBuilder.buildSqlMapClient(SqlMapClientBuilder.java:63)
at pack1.MyAppSqlConfig.<clinit>(MyAppSqlConfig.java:12)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:187)
at pack1.ClientApp.main(ClientApp.java:11)
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:53)
at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:86)
... 5 more
Caused by: org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.scanPIData(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanPIData(Unknown Source)
at org.apache.xerces.impl.XMLScanner.scanPI(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at com.ibatis.common.xml.NodeletParser.createDocument(NodeletParser.java:157)
at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:50)
... 6 more
Exception in thread "main" java.lang.ExceptionInInitializerError
at java.lang.J9VMInternals.initialize(J9VMInternals.java:205)
at pack1.ClientApp.main(ClientApp.java:11)
Caused by: java.lang.RuntimeException: Error initializing MyAppSqlConfig class. Cause:java.lang.RuntimeException: Error occurred. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
at pack1.MyAppSqlConfig.<clinit>(MyAppSqlConfig.java:19)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:187)
... 1 more
Dhananjay Patkar
Greenhorn

Joined: Aug 12, 2008
Posts: 8
Hi,
When Ibatis loads sql-map-config.xml it not only parses sql-map-config, but along with it ,It also parses all mapping files listed in sqlmapconfig.xml
So scan through all possible files ,If any of them is malformed xml you will get parsing error...

Cheers,
Dhananjay
Yves Zoundi
Ranch Hand

Joined: Aug 31, 2008
Posts: 47
Try editing your Ibatis configuration files with an XML editor and validate them if there's a DTD to avoid such annoyances.


Author of VFSJFileChooser and XPontus XML Editor
 
Don't get me started about those stupid light bulbs.
 
subject: Problem with iBatis
 
Similar Threads
Axis2 1.4 Problem in generating code
i am getting error in hibernate
Server problem in struts
HELP with Digester RSVP
Passing Files in Web Services