Lotus Notes 中的外部 jar
我通过将外部 Java 代码放置在 Java 代理中来测试它们。现在,我尝试将 jar 文件放入服务器文件系统的 jvm/lib/ext 目录中。尚未在notes.ini 中创建条目... 问题是,jar 文件存在于两个地方(在代理中以及在服务器的文件系统中)... 这会导致notesExceptions吗? 我的代理失败并出现代理错误:java.lang.VerifyError: 有谁知道问题是什么?
仅供参考:我们最终将从代理中删除 jars...这只是为了测试...
I was testing external java code by placing them in the Java agents. Now, am trying to place jar files in our server's file system in the jvm/lib/ext directory. An entry hasnt been made in the notes.ini yet...
The question is, the jar files are existing in 2 places (in the agent and also in servers' file system)...
Will this result in notesExceptions?
My agent fails with Agent error: java.lang.VerifyError:
Does any one know what the issue is?
FYI: We will eventually be removing jars from the agent... this is just for testing...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当您针对与运行时使用的库不同的库进行编译时,可能会发生 java.lang.VerifyError 。
我怀疑外部 jar 的编译字节码使用的 jre 版本与 domino jre 版本不兼容。尽管语法上是正确的,但 jvm domino 使用的语义更改无法接受。如果您有权访问源代码,请检查其编译的 jre 版本。
java.lang.VerifyError can occur when you have compiled against a different library than you are using at runtime.
I suspect that the jre version the compiled byte code of the external jars uses is not compatible with domino jre version. Although syntactically correct there are semantic changes that the jvm domino uses cannot accept. If you have access to the source, check the jre version it was compiled for.
您的 Domino JRE 比用于编译这些 JAR 文件的 JRE/JDK 版本旧。这是验证错误的原因。这些 JAR 文件的字节码无法通过 JRE 验证阶段,因为服务器 JRE 无法理解该代码。
在大多数情况下,没有必要将 jar 文件放置到服务器 jvm/lib/ext 文件夹中。
将这些 jar 嵌入到脚本库/Java 代理中就足够了。
但也有例外,例如 DB2 jdbc 驱动程序,它必须位于服务器 jvm/lib/ext 文件夹中,才能让 java 代理使用 DB2 连接。
Your Domino JRE is older than JRE/JDK version used to compile these JAR files. It is the reason of verification error. Byte code of these JAR files cannot pass JRE verification stage, because this code cannot be understood by server JRE.
In most cases there is no necessity to place jar files to server jvm/lib/ext folder.
It is enough to embed these jars to Script Library/Java Agent.
But there are exceptions, for instance for DB2 jdbc driver, that must be located at server jvm/lib/ext folder to let java agents work with DB2 connections.