jpa - eclipselink PersistenceUnitLoadingEception in executable JAR -
i developing stand-alone java application uses eclipselink. fine when execute app eclipse ide. i've exported executable jar file, , since can not make eclipselink work. have found similar issue in eclipse community forum here, yet not handy:
please help,
my exception following:
01 dec. 2010 22:47:31,199 info configuration:97 - iniciate database exception in thread "main" java.lang.reflect.invocationtargetexception @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(unknown source) @ sun.reflect.delegatingmethodaccessorimpl.invoke(unknown source) @ java.lang.reflect.method.invoke(unknown source) @ org.eclipse.jdt.internal.jarinjarloader.jarrsrcloader.main(jarrsrcloa der.java:56) caused by: exception [eclipselink-30005] (eclipse persistence services - 2.0.2.v 20100323-r6872): org.eclipse.persistence.exceptions.persistenceunitloadingexcept ion exception description: exception thrown while searching persistence rchives classloader: java.net.urlclassloader@61de33 internal exception: exception [eclipselink-30004] (eclipse persistence services - 2.0.2.v20100323-r6872): org.eclipse.persistence.exceptions.persistenceunitload ingexceptionexception description: exception thrown while processing persistence.xml url: rsrc:../ internal exception: java.net.malformedurlexception @ org.eclipse.persistence.exceptions.persistenceunitloadingexception.ex ceptionsearchingforpersistenceresources(persistenceunitloadingexception.java:126 ) @ org.eclipse.persistence.jpa.persistenceprovider.createentitymanagerfa ctory(persistenceprovider.java:133) @ org.eclipse.persistence.jpa.persistenceprovider.createentitymanagerfa ctory(persistenceprovider.java:65) @ javax.persistence.persistence.createentitymanagerfactory(persistence. java:51) @ javax.persistence.persistence.createentitymanagerfactory(persistence. java:33) @ eu.agilelabs.pillagent.db.dam.datamanagerimpljpa.(datamanagerim pljpa.java:36) @ eu.agilelabs.pillagent.db.dam.datamanagerimpljpa.getinstance(datamana gerimpljpa.java:47) @ eu.agilelabs.configuration.configuration.(configuration.java:98 ) @ eu.agilelabs.configuration.configuration.getinstance(configuration.ja va:119) @ eu.agilelabs.pillagent.core.main.main(main.java:15) ... 5 more caused by: exception [eclipselink-30004] (eclipse persistence services - 2.0.2.v 20100323-r6872): org.eclipse.persistence.exceptions.persistenceunitloadingexcept ion exception description: exception thrown while processing persistence.xml url: rsrc:../ internal exception: java.net.malformedurlexception @ org.eclipse.persistence.exceptions.persistenceunitloadingexception.ex ceptionprocessingpersistencexml(persistenceunitloadingexception.java:117) @ org.eclipse.persistence.internal.jpa.deployment.persistenceunitproces sor.processpersistencexml(persistenceunitprocessor.java:444) @ org.eclipse.persistence.internal.jpa.deployment.persistenceunitproces sor.processpersistencearchive(persistenceunitprocessor.java:401) @ org.eclipse.persistence.internal.jpa.deployment.persistenceunitproces sor.getpersistenceunits(persistenceunitprocessor.java:310) @ org.eclipse.persistence.internal.jpa.deployment.jpainitializer.findpe rsistenceunitinfoinarchive(jpainitializer.java:149) @ org.eclipse.persistence.internal.jpa.deployment.jpainitializer.findpe rsistenceunitinfoinarchives(jpainitializer.java:136) @ org.eclipse.persistence.internal.jpa.deployment.jpainitializer.findpe rsistenceunitinfo(jpainitializer.java:125) @ org.eclipse.persistence.jpa.persistenceprovider.createentitymanagerfa ctory(persistenceprovider.java:98) ... 13 more caused by: java.net.malformedurlexception @ java.net.url.(unknown source) @ java.net.url.(unknown source) @ java.net.url.(unknown source) @ com.sun.org.apache.xerces.internal.impl.xmlentitymanager.setupcurrent entity(unknown source) @ com.sun.org.apache.xerces.internal.impl.xmlversiondetector.determined ocversion(unknown source) @ com.sun.org.apache.xerces.internal.parsers.xml11configuration.parse(u nknown source) @ com.sun.org.apache.xerces.internal.parsers.xml11configuration.parse(u nknown source) @ com.sun.org.apache.xerces.internal.parsers.xmlparser.parse(unknown urce) @ com.sun.org.apache.xerces.internal.parsers.abstractsaxparser.parse(un known source) @ com.sun.org.apache.xerces.internal.jaxp.saxparserimpl$jaxpsaxparser.p arse(unknown source) @ org.eclipse.persistence.internal.jpa.deployment.persistenceunitproces sor.processpersistencexml(persistenceunitprocessor.java:442) ... 19 more
i think line must key:
internal exception: exception [eclipselink-30004] (eclipse persistence services - 2.0.2.v20100323-r6872): org.eclipse.persistence.exceptions.persistenceunitload ingexceptionexception description: exception thrown while processing persistence.xml url: rsrc:../
i have managed solve it. changed way eclipse exports jar file. if extracts required libraries jar works great. thank anyway!
Comments
Post a Comment