java - 用作 websphere 8 应用程序的 -javaagent 的 openjpa jar 位于哪里?

标签 java websphere jpa-2.0 openjpa load-time-weaving

还是我必须提供自己的?我想按照文档 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/

相关文章:

java - JPA 的类型转换取决于同一实体中的另一个属性

hibernate - javax.persistence.PersistenceException - JPA+ hibernate

java - JAX-WS、Websphere AS 8.5 和 XML 数字签名

java - 我们如何将两个java对象合并到一个xml文件中?

特定模式的 Java 正则表达式

java - 使用字符串引用数组列表的自定义类成员

ssl - 为 IBM Websphere - HTTPServer 安装 SSL 证书

java - 插入 XML 列时如何解决 "Illegal Conversion"异常?

hibernate - 连接字段上的 JPA 查询过滤器

java - 为什么在 Server.xml 而不是 web.xml 中需要 Realm 设置