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

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

问题描述

我正在尝试从使用eclipse(indigo,jdk1.7)的Java Web应用程序连接Lotus Notes Domino(8.5.1)对象.这就是我所做的: 1.在eclipse中将notes.jar添加到Java Build Path的Librairies中, 2.将"C:\ Program Files(x86)\ IBM \ Lotus \ Notes"的路径变量添加到本地计算机的Envrionment变量的路径. 然后我在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)\IBM\Lotus\Notes" 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();
      }
   }
  }

上面的代码编译没有问题,但是当我运行它时,出现了这个错误: 线程主"中的异常java.lang.UnsatisfiedLinkError:C:\ Program Files(x86)\ IBM \ Lotus \ Notes \ nlsxbe.dll:无法在AMD 64位平台上加载IA 32位.dll 我从互联网上搜索,看来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)\IBM\Lotus\Notes\nlsxbe.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.但是,有DLL的64位版本,但是您将必须在计算机上以及运行Web应用程序的任何计算机上安装和配置Lotus Domino服务器(64位Windows版本).您只需在每台机器上运行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的本地"版本.还有API的CORBA/IIOP版本,它不使用任何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)\ IBM \ Lotus \ Notes \ nlsxbe.dll:无法在AMD 64位平台上加载IA 32位.dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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