I am trying to recycle a persistence unit I created for a web application of type JTA-TRANSACTION and turn it into a RESOURCE_LOCAL. What I am planning to do is to create a desktop application for specific sidetasks with the same database in the end. I am having problems while getting the persistence unit to work in the DesktopApplication project. I am getting the following exception:
Exception [EclipseLink-30005] (Eclipse Persistence Services - 1.1.4.v20100812-r7860): org.eclipse.persistence.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: sun.misc.Launcher$AppClassLoader@28df6ccd
Internal Exception: Exception [EclipseLink-7305] (Eclipse Persistence Services - 1.1.4.v20100812-r7860): org.eclipse.persistence.exceptions.ValidationException
Exception Description: An exception was thrown while processing the mapping file from URL: [file:/C:/Users/Carlos%20Conti/Documents/Proyectos%20CuteBytes/Java/netbeans/SistemaIncidenciasDesktop/src/META-INF/orm.xml].
Internal Exception: Exception [EclipseLink-25004] (Eclipse Persistence Services - 1.1.4.v20100812-r7860): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: An error occurred unmarshalling the document
Internal Exception: Exception [EclipseLink-27101] (Eclipse Persistence Services - 1.1.4.v20100812-r7860): org.eclipse.persistence.platform.xml.XMLPlatformException
Exception Description: An error occurred while parsing the document.
Internal Exception: org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed.
To add some information let me add that "persistence.xml" is located under META-INF in the root package and that the relational mappings are done through an "orm.xml" file. The persistence unit is a newly created version of persistence.xml, but the orm.xml file is exactly the same as the one used for the web application.
I am not sure if there's a configuration issue, or there's really a mistake in the syntax, as the exception description states.
To clarify let me post at least the persistence.xml file. The ORM file is huge, so I won't post it, but on the other hand an identical version is working fine in the web application.
I have added only one entity for the time being, to test if the error was due to the fact of finding no entities to configure in the entityManager.
I appreciate your insights.
posted 8 years ago
I had effectively a markup error. What amazes me is that exactly the same orm file is woking for another persistence unit (the one for the web app)
ONce the problem was solved the error disappeared.
Regards and hope nobody lost time with this topic.
Get off me! Here, read this tiny ad:
how do I do my own kindle-like thing - without amazon