还是我必须提供自己的?我想按照文档 here 提供加载时 JPA 实体增强功能:
java -javaagent:path/to/openjpa.jar com.xyz.Main
我想找到路径/。我走在正确的轨道上吗?这就是为什么my entities are not enhancing ?
更新:
我想我可能遇到过这个文件:C:/<websphere-install>/plugins/com.ibm.ws.jpa.jar
但是当我尝试使用 -javaagent:"C:\Program Files (x86)\IBM\WebSphere\AppServer\plugins\com.ibm.ws.jpa.jar"
启动 websphere 时在设置中,服务器无法启动:
Error opening zip file or JAR manifest missing : "C:\Program
JVMJ9VM015W Initialization error for library j9jvmti26(-3): JVMJ9VM009E J9VMDllMain failed
由于某种原因它无法识别空格。 I have read那个
These values [jvm args] must be encoded, which requires that any spaces in the file paths should be replaced with %20. For example, C:\Program Files would become C:\Program%20Files. If the JVM argument values are entered incorrectly, the WebSphere Application Server will not start.
但是应用此更改只会给我一条错误消息,路径中包含 %20s:
Error opening zip file or JAR manifest missing : "C:/Program%20Files%20(x86)/IBM/WebSphere/AppServer/plugins/com.ibm.ws.jpa.jar"
JVMJ9VM015W Initialization error for library j9jvmti26(-3): JVMJ9VM009E J9VMDllMain failed
最佳答案
您不需要在 WebSphere 中使用 -javaagent。 WebSphere 提供了 OpenJPA 的 Hook ,以便无需代理即可进行增强。
您需要弄清楚的真正问题是您的 Spring + WAS + OpenJPA 问题。
关于java - 用作 websphere 8 应用程序的 -javaagent 的 openjpa jar 位于哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25417784/