Hi there,
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.
at org.eclipse.persistence.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(PersistenceUnitLoadingException.java:121)
at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:133)
at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:67)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)
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.
Many thanks,
Carlos.