java - How to load persistence unit from other jars? -
thanks all...
i've 3 jars, 1 dao logic, other persistence archive (mappings, persistence.xml , orm files) , other application project. i'm using intellij idea 13 , gradle develop application in application project, when try run obtains next error:
exception [eclipselink-30009] (eclipse persistence services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.persistenceunitloadingexception exception description: exception thrown while trying load persistence unit @ url: file:/f:/ideaprojects/com.reyma.db/out/artifacts/com_reyma_db/com.reyma.db.jar internal exception: java.lang.nullpointerexception @ org.eclipse.persistence.exceptions.persistenceunitloadingexception.exceptionloadingfromurl(persistenceunitloadingexception.java:100) @ org.eclipse.persistence.internal.jpa.deployment.persistenceunitprocessor.processpersistencearchive(persistenceunitprocessor.java:597) @ org.eclipse.persistence.internal.jpa.deployment.persistenceunitprocessor.getpersistenceunits(persistenceunitprocessor.java:481) @ org.eclipse.persistence.internal.jpa.deployment.jpainitializer.findpersistenceunitinfoinarchive(jpainitializer.java:172) @ org.eclipse.persistence.internal.jpa.deployment.jpainitializer.findpersistenceunitinfoinarchives(jpainitializer.java:154) @ org.eclipse.persistence.internal.jpa.deployment.jpainitializer.findpersistenceunitinfo(jpainitializer.java:135) @ org.eclipse.persistence.jpa.persistenceprovider.createentitymanagerfactory(persistenceprovider.java:177) @ javax.persistence.persistence.createentitymanagerfactory(persistence.java:79) @ javax.persistence.persistence$createentitymanagerfactory.call(unknown source) @ org.codehaus.groovy.runtime.callsite.callsitearray.defaultcall(callsitearray.java:45) @ org.codehaus.groovy.runtime.callsite.abstractcallsite.call(abstractcallsite.java:108) @ org.codehaus.groovy.runtime.callsite.abstractcallsite.call(abstractcallsite.java:120) @ com.srs.jpa.entitymanagerproviderimpl.initializeentitymanager(entitymanagerproviderimpl.groovy:59) @ com.srs.jpa.interfaces.ientitymanagerprovider$initializeentitymanager.call(unknown source) @ org.codehaus.groovy.runtime.callsite.callsitearray.defaultcall(callsitearray.java:45) @ org.codehaus.groovy.runtime.callsite.abstractcallsite.call(abstractcallsite.java:108) @ org.codehaus.groovy.runtime.callsite.abstractcallsite.call(abstractcallsite.java:120) @ com.reyma.main.initializeentitymanager.initialize(initializeentitymanager.groovy:43) @ com.reyma.main.initializeentitymanager$initialize.call(unknown source) @ org.codehaus.groovy.runtime.callsite.callsitearray.defaultcall(callsitearray.java:45) @ org.codehaus.groovy.runtime.callsite.abstractcallsite.call(abstractcallsite.java:108) @ org.codehaus.groovy.runtime.callsite.abstractcallsite.call(abstractcallsite.java:112) @ com.reyma.main.main.start(main.groovy:62) @ com.sun.javafx.application.launcherimpl$8.run(launcherimpl.java:837) @ com.sun.javafx.application.platformimpl$7.run(platformimpl.java:335) @ com.sun.javafx.application.platformimpl$6$1.run(platformimpl.java:301) @ com.sun.javafx.application.platformimpl$6$1.run(platformimpl.java:298) @ java.security.accesscontroller.doprivileged(native method) @ com.sun.javafx.application.platformimpl$6.run(platformimpl.java:298) @ com.sun.glass.ui.invokelaterdispatcher$future.run(invokelaterdispatcher.java:95) @ com.sun.glass.ui.win.winapplication._runloop(native method) @ com.sun.glass.ui.win.winapplication.access$300(winapplication.java:39) @ com.sun.glass.ui.win.winapplication$4$1.run(winapplication.java:112) @ java.lang.thread.run(thread.java:745) caused by: java.lang.nullpointerexception @ org.eclipse.persistence.internal.jpa.deployment.xml.parser.persistencecontenthandler.endelement(persistencecontenthandler.java:143)
i think problem have dao , persistence parts there separated but, how can solve this?
Comments
Post a Comment