-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Using XML Databinder and ReverseXML
PostPosted: Tue Sep 13, 2005 11:05 pm 
Newbie

Joined: Tue Dec 21, 2004 5:36 am
Posts: 2
Location: Manila
Hello, we are using hibernate XML Databinder and ReverseXML to sync up data from different mysql servers. The problem is whenever an xml generated by XML Databinder is read by ReverseXML to load in the database, the error below occurs

org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.

looking at the xml, I dont seem to find any elements or structures with no pairs. There is no code that in our system that opens or manipulates the xml file. Only XMLDatabinder and ReverseXML are touching the xml.

I notice that this error occurs whenever a collection element exist in the xml, meaning the table has some details.

Some code:


List objList = new ArrayList();

String incomingDir = "";

String fileLoc = incomingDir + xmlFile;
try {
File tmp = new File(incomingDir);
if(!tmp.exists()) tmp.mkdir();

SessionFactoryImplementor factory = (SessionFactoryImplementor)
getSessionFactory();

SessionImplementor session = (SessionImplementor) getSession();

FileInputStream file = new FileInputStream(fileLoc);

ReverseXMLDataBinder xmlDataBinder = new ReverseXMLDataBinder
(factory, session);
xmlDataBinder.fromXML(file);

objList = xmlDataBinder.getObjects();
}
catch (Exception e) {
log.debug("Error converting to object : Err is " + e.getMessage());
}

return objList;


Thanks for your answers.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.