java.lang.UnsatisfiedLinkError: C:Program Files (x86)IBMLotusNotes lsxbe.dll: 无法在 AMD 64 位平台上加载 IA 32 位 .dll [英] java.lang.UnsatisfiedLinkError: C:Program Files (x86)IBMLotusNotes lsxbe.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform

查看:47
本文介绍了java.lang.UnsatisfiedLinkError: C:Program Files (x86)IBMLotusNotes lsxbe.dll: 无法在 AMD 64 位平台上加载 IA 32 位 .dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从使用 eclipse(indigo、jdk1.7)的 java web 应用程序连接 Lotus Notes Domino (8.5.1) 对象.这就是我所做的:1.在eclipse中的Java Build Path的Librairies中添加notes.jar,2. 将C:Program Files (x86)IBMLotusNotes"的路径变量添加到我本地计算机的环境变量路径中.然后我在 eclipse 中创建了这个简单的 java 代码,如下所示:

I am trying to connect Lotus Notes Domino (8.5.1) objects from a java web application which uses eclipse (indigo, jdk1.7). this is what I did: 1. add notes.jar to Librairies of Java Build Path in eclipse, 2. add path variable of "C:Program Files (x86)IBMLotusNotes" to path of Envrionment variable of my local computer. then I created this simple java codes in eclipse as below:

 import lotus.domino.*;
 public class platform3
{
     public static void main(String argv[])
    {
       try
         {
        NotesThread.sinitThread();
        Session s = NotesFactory.createSession();
        String p = s.getPlatform();
        System.out.println("Platform = " + p);
        }
       catch(Exception e)
       {
        e.printStackTrace();
       }
         finally
       {
      NotesThread.stermThread();
      }
   }
  }

上面的代码编译没有任何问题,但是当我运行它时,我得到了这个错误:线程main"中的异常 java.lang.UnsatisfiedLinkError: C:Program Files (x86)IBMLotusNotes lsxbe.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform我在网上查了一下,好像Lotus Domino 8.5.1是32位的,我的java项目(jdk1.7)是64位的,所以不兼容.但我无法将我的 java (eclipse) 更改为 32 位,因为我需要它来开发 64 位 Web 项目.有人知道如何在不将我的 java 从 64 位更改为 32 位的情况下使其工作吗?

The above codes are compiled without any problem, but when I run it, I got this error: Exception in thread "main" java.lang.UnsatisfiedLinkError: C:Program Files (x86)IBMLotusNotes lsxbe.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform I searched from the internet, it seems the Lotus Domino 8.5.1 is 32 bit, and my java project (jdk1.7) is 64bits, so they are not compatible. but I can not change my java (eclipse) to 32bit since I need it to develop 64 bit web projects. Does anybody know how to make it work without changing my java from 64bits to 32bits?

推荐答案

正如@maksimov 在评论中指出的那样,64 位 JVM 无法加载 32 位 Notes DLL.但是,有 64 位版本的 DLL,但您必须在您的机器上安装和配置 Lotus Domino 服务器(64 位 Windows 版本) - 以及运行 Web 应用程序的任何机器.您只需在每台机器上运行 Domino 服务器一次即可对其进行完全配置.它不必一直运行才能让您的代码访问 DLL,但您必须保持安装状态.但是,在以这种方式安装 Domino 服务器代码之前,您必须与管理您的 IBM 关系的任何人(可能还与 IBM)核对,以确定是否存在任何许可和成本影响.(进一步注意:为了在机器上干净地安装 64 位 Domino 服务器代码并确保特定版本的 nlsxbe.dll 是您的代码加载的版本,最好卸载并彻底清理现有的 32 位 Notes 客户端安装.通过清理,我将删除 lotus.ini 文件,以及卸载后可能遗留的任何 notes.ini 文件和与 Notes 相关的注册表项.)

As @maksimov noted in the comments, a 64 bit JVM cannot load the 32 bit Notes DLLs. There is, howver, a 64 bit version of the DLLs, but you will have to install and configure the Lotus Domino Server (64 bit Windows version) on your machine - and on any machine(s) where the web application will run. You will only have to run the Domino server once per machine in order to get it fully configured. It will not have to be running all the time in order for your code to access the DLLs, but you will have to leave it installed. You will have to, however, check with whomever manages your IBM relationship, and possibly with IBM, in order to determine whether there are any licensing and cost implications before installing the Domino server code this way. (One further note: in order to get the 64 bit Domino Server code cleanly installed on the machine and insure that that particular version of nlsxbe.dll is the one that your code loads, you will be best off if you uninstall and completely clean the existing 32 bit Notes client installation. And by cleaning, I'd get rid of the lotus.ini file, and any notes.ini files and Notes-related registry entries that might be left over after the uninstallation.)

还有另一种选择.您的代码使用的是 notes.jar 中 Notes Java API 的本地"版本.还有一个 CORBA/IIOP 版本的 API,它不使用任何 Notes 或 Dominbo DLL.事实上,它不需要安装任何 Lotus 代码,也没有许可问题.为此,您只需将 NCSO.jar 的副本添加到您的项目中即可.您确实需要注意 API 的 NCSO.jar 版本的功能与本地版本略有不同,设置会话的代码略有不同,身份验证不依赖于 Notes ID 文件,并且 Domino 服务器您连接到的必须运行 IIOP 任务 - 默认情况下不会出现这种情况,因此您可能必须与管理这些服务器的人员协商.

There is also another option. Your code is using the "local" version of the Notes Java API in notes.jar. There is also a CORBA/IIOP version of the API, which does not use any Notes or Dominbo DLLs. In fact, it doesn't require any installation of any Lotus code, and it has no licensing implications either. All you need for this is a copy of the NCSO.jar added to your project. You do need to be aware that the capabilities of the NCSO.jar version of the API are slightly different from the local version, code to set up a session is slightly different, authentication does not rely on Notes ID files, and the Domino servers that you connect to must be running the IIOP task - which will not be the case by default, so you may have to negotiate that with the people who manage those servers.

注意 - 删除了建议使用 OpenNTF API 作为替代方案的更新.那是暂时的混乱.它没有帮助.

Note - Removed an update that was suggesting the OpenNTF API as an alternative. That was a bit of temporary confusion. It could not have helped.

这篇关于java.lang.UnsatisfiedLinkError: C:Program Files (x86)IBMLotusNotes lsxbe.dll: 无法在 AMD 64 位平台上加载 IA 32 位 .dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆