what is the right path to refer a jar file in jpa persistence.xml in a web app?

前端 未结 4 1244
南旧
南旧 2020-11-27 18:26

persistence.xml looks like this:


    org.hibernate.ejb.Hiber         


        
4条回答
  •  生来不讨喜
    2020-11-27 19:12

    Not sure this is related to the fact that you are deploying as a WAR, but the path should be simply "app-sevices-1.0.jar" and the jar should be in the lib of the Java EE application. The thing is: I'm not sure if this is available for the simplified "war" Java EE application. I suspect this is available only for the traditional Java EE deployment file (ear). I would test making an EAR, containing a WAR for the webapp, JAR for the PU and your other JAR for app-services, like a traditional Java EE deployment would be.

    Another thing to note is that relative paths are not supported, and usage of this in SE environment is not supported by all vendors.

提交回复
热议问题