Solved

XML Error when Importing

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
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…

943 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

11 Experts available now in Live!

Get 1:1 Help Now