为了账号安全,请及时绑定邮箱和手机立即绑定

Java 类未从 IIB 中的 javaclassloader 服务加载

Java 类未从 IIB 中的 javaclassloader 服务加载

斯蒂芬大帝 2023-06-14 10:44:09
我在 IIB v10 中构建了一个应用程序,我在其中引用了来自 esql 的 Java 例程。我已经将 java 类创建为独立资源,然后将其导出为 JAR 文件并将其放在C://lib. 有一个现有的 java 类加载器配置服务,它还从C://lib. 然后,我用新的 jar 名称及其路径修改了 Java 类加载器的现有配置服务。此外,重新启动代理并通过mqsireportbroker命令和 webconsole 检查以确认新 jar 已在配置服务中更新。现在,当我将 BAR 文件部署到服务器时,出现以下错误。BIP3202E: (com.xxxx.soa.xx.xxx.createMD5Hash, 1.12) : An error occurred when trying to resolve the Java class or method 'com.xxxx.gen.createMD5.createMD5Hash' which is referred to by the routine 'createMD5Hash'. 生成进一步的消息,更详细地解释错误。Correct the syntax of your Java expression in node 'com.xxxx.soa.xx.xxx.createMD5Hash', around line and column '1.12', then redeploy the message flow. BIP2943E: The Java Method 'com.xxxx.gen.createMD5.createMD5Hash' could not be found as its containing class could not be found in the deployed bar file or in the 'workpath/shared-classes/' directory. The specified Java Method 'com.xxxx.gen.createMD5.createMD5Hash' belongs to a class that could not be found in the deployed bar file or the 'workpath/shared-classes/' directory. Ensure that the fully qualified name of the method is correct and that its containing class or jar file is in the deployed bar file or in the 'workpath/shared-classes/' directory. Examine and correct the SQL program.当我将 jar 文件放在 workpath/shared-classes 目录下时,它的工作。但我希望 jar 文件取自共享类库,即C://lib. 在这种情况下我错过了什么?
查看完整描述

3 回答

?
慕慕森

TA贡献1856条经验 获得超17个赞

.jar 文件的加载路径只有几个。

JAR 文件按以下优先顺序加载:

  1. 放置在集成服务器共享类目录中的 JAR 文件只允许一个定义的集成服务器访问它们。放置在这里的文件首先被加载。

  2. 放置在代理共享类目录中的 JAR 文件只允许一个定义的代理访问它们。放置在此处的文件在放置在集成服务器共享类目录中的任何文件之后加载。

  3. 放置在顶级共享类目录中的 JAR 文件可供所有代理和所有集成服务器使用。放置在此处的文件在放置在代理共享类目录中的任何文件之后加载。


查看完整回答
反对 回复 2023-06-14
?
隔江千里

TA贡献1906条经验 获得超10个赞

我在 Windows 上找到它 C:\ProgramData\IBM\MQSI\config*\shared-classes

使用此命令 mqsireportbroker <my_broker_name>


查看完整回答
反对 回复 2023-06-14
?
大话西游666

TA贡献1817条经验 获得超14个赞

所有你需要做的就是把你的 jar 放在 shared-classes 文件夹中。您可以很容易地在 IBM 文档中找到有关它的所有信息,但这里有一个 Unix 上的示例:

/var/mqsi/config/MY_BROKER/shared-classes

您可以将 .jar 放在那里,它将为每个执行组(也称为集成服务器)加载。如果你知道你只需要一个特定的执行组,那么你可以将它复制到那里:

/var/mqsi/config/MY_BROKER/MY_EG/shared-classes

我强烈建议您使用第二个选项,否则如果您对很多库执行此操作,您可能会遇到性能问题


查看完整回答
反对 回复 2023-06-14
  • 3 回答
  • 0 关注
  • 87 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信