Solved

XML Error when Importing

Posted on 2011-03-12
5
605 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 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

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

Suggested Solutions

Title # Comments Views Activity
ejb entity bean example 2 38
how to debug htl and js pages 8 58
java example issue 5 46
jmeter usage 4 38
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
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 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…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

726 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