jpa - Separate jar for EJB3 Entity classes -


when separate ejb3 entities (annotated @entity) ejb module , put them in separate jar file, should persistence.xml file go, in ejb module or in entities.jar? , how should deploy entities.jar file? it's not ejb module since doesn't have ejbs, jpa entities.

i'm using glassfish , did was, put entities.jar in /lib/applibs directory , when deploying ejb module, declared uses library.

but deployment fails with:

internal exception: java.lang.classnotfoundexception: com.pedra.role javax.persistence.persistenceexception: exception [toplink-28018] (oracle toplink essentials - 2.1 (build b31g-fcs (10/19/2009))): oracle.toplink.essentials.exceptions.entitymanagersetupexception exception description: predeploy persistenceunit [signonpu] failed. internal exception: exception [toplink-30007] (oracle toplink essentials - 2.1 (build b31g-fcs (10/19/2009))): oracle.toplink.essentials.exceptions.persistenceunitloadingexception exception description: exception thrown while loading class: com.pedra.role check whether implements @entity, @embeddable, or @mappedsuperclass. internal exception: java.lang.classnotfoundexception: com.pedra.role 

so why can't class found when in entities.jar library?

it looks should working.

i'd say:

  • check entity.jar in lib/applibs;
  • check when deploy ejb module specify entity.jar correctly;
  • rebuild jars;
  • as funny may sound, undeploy ejb module via admin console , restart glassfish, , deploy module again;

Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -