Solved

XML Error when Importing

Posted on 2011-03-12
5
597 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
  • 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 250 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
wordappend challenge 8 85
groovy example issue 10 67
Requested array size exceeds VM limit 3 48
ArrayIndexOutOfBoundException 9 35
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

757 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now