Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

XML Error when Importing

Posted on 2011-03-12
5
Medium Priority
?
613 Views
Last Modified: 2012-08-14
Hi Expert

I have 2 xml called (Pona.xml and today.xml). These 2 xml are identical but the today.xml imports fine but Pona.xml failed. I generated this Pona.xml from a tool called stylesstudio.

The today.xml I extracted from our system just to have a look how the style should be. I can't understand why the Pona.xml is faily.

The Error that I am getting is

Caused by: com.calypso.apps.common.adapter.AdapterException: Failed to marshall inputStream
      at com.calypso.apps.datamigration.adapter.EnhancedImporterAdapter.importUsingSAX(EnhancedImporterAdapter.java:172)
      at com.calypso.apps.datamigration.adapter.EnhancedImporterAdapter.importFrom(EnhancedImporterAdapter.java:114)
      at com.calypso.apps.datamigration.adapter.EnhancedImporterAdapter.importFrom(EnhancedImporterAdapter.java:99)
      at com.calypso.apps.datamigration.adapter.EnhancedImporterAdapter.importFrom(EnhancedImporterAdapter.java:83)
Caused by: javax.xml.bind.UnmarshalException
 - with linked exception:
[org.xml.sax.SAXParseException: Reference is not allowed in prolog.]
      at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:315)
      at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:506)
      at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:215)
      at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:184)
      at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:120)
      at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:103)
      at com.calypso.apps.datamigration.adapter.EnhancedImporterAdapter.importUsingSAX(EnhancedImporterAdapter.java:165)

I will attach the 2 xml files Pona.xml
today.xml
0
Comment
Question by:abooysen2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 92

Expert Comment

by:objects
ID: 35118412
check there aren't any hidden characters in the front of the xml (eg. a BOM marker)
0
 
LVL 47

Expert Comment

by:for_yan
ID: 35125831
One of this files is Unix, anoter PC
0
 
LVL 47

Accepted Solution

by:
for_yan earned 1000 total points
ID: 35126004
today.xml  has Unix style end of lines
pona.xml has is a PC file
0
 

Author Comment

by:abooysen2
ID: 35155538
Hi
I tested this and for from reason it did not like my xml tag on top. I removed it and it worked. I could be the reason comments by  ID: 35126004. but it works. Thanks
0
 

Author Closing Comment

by:abooysen2
ID: 35155541
Hi
I tested this and for from reason it did not like my xml tag on top. I removed it and it worked. I could be the reason comments by  ID: 35126004. but it works. Thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Suggested Courses

596 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question