?
Solved

XML Error when Importing

Posted on 2011-03-12
5
Medium Priority
?
611 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
A solution for Fortify Path Manipulation.
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 …
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses
Course of the Month12 days, 2 hours left to enroll

752 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