• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EclipseLink 1.1.4 - EXCEPTION_SEARCHING_FOR_PERSISTENCE_RESOURCES

 
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Carlos Conti
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Solved!
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.

Carlos.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic