JavaAgent" java.lang.NoClassDefFoundError:de.bea.domingo.DNotesFactory [英] JavaAgent" java.lang.NoClassDefFoundError: de.bea.domingo.DNotesFactory

查看:215
本文介绍了JavaAgent" java.lang.NoClassDefFoundError:de.bea.domingo.DNotesFactory的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在多米诺骨牌设计器中调试follownig Java代理

I'm try debuging the follownig java agent in domino designer

  public class JavaAgent extends AgentBase {
     public void NotesMain() {
     DNotesFactory factory = DNotesFactory.getInstance();
        DSession session = factory.getSession();
        DDatabase database;
        try {
            database = session.getDatabase("", "names.nsf");
            DView view = database.getView("($Users)");
            Iterator entries = view.getAllEntries();
            while (entries.hasNext()) {
                DViewEntry entry = (DViewEntry) entries.next();
                System.out.println(entry.getColumnValues().get(0));
            }
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }             
    }
  }

但我收到以下异常

JavaAgent" java.lang.NoClassDefFoundError: de.bea.domingo.DNotesFactory

推荐答案

java.lang.NoClassDefFoundError运行时错误.这意味着domingo-1.5.1.jar在编辑和保存Java代理期间可以在Designer中使用,并且可以编译代码.

java.lang.NoClassDefFoundError is a runtime error. That means, that domingo-1.5.1.jar is available in Designer during editing and saving Java agent and the code could be compiled.

因此,jar文件在运行时不可用.

So, the jar file is not available at runtime.

有三种方法可以存储 Java代理 jar 文件,以便它们在运行时可用:

There are three ways to store jar files for Java agents so that they are available at runtime:

  1. 在目录... \ Lotus \ Notes \ jvm \ lib \ ext
  2. 在代理商的存档部分
  3. 在Java库的存档部分

请注意,Java代理会忽略Code/Jars中的jar文件(它们只能由XPages使用).

Be aware that jar files in Code/Jars are ignored for Java agents (they can only be used by XPages).

jar 文件复制到目录... \ Lotus \ Notes \ jvm \ lib \ ext .重新启动Notes客户端.然后,您的Java代理将在Notes客户端上运行.

Copy the jar file to directory ...\Lotus\Notes\jvm\lib\ext. Restart the Notes client. Your Java agent will run on Notes client then.

将带有导入/存档的 jar 文件添加到Java代理本身:

Add the jar file with Import/Archive to Java agent itself:

如果您有多个使用 jar 文件的代理,则应使用jar文件创建一个Java库,并将该库包含在代理中:

If you have several agents using the jar file then you should create a Java library with the jar file and include the library to the agents:

从其他问题中,我可以看到您正在使用Notes Domino版本9.该项目domingo已过时,并且不支持所有新功能.请改用OpenNTF Domino API org.openntf.domino .您可以找到

From your other questions I can see that you are working with Notes Domino version 9. The project domingo is pretty much out of date and doesn't support all new functionalities. Use OpenNTF Domino API org.openntf.domino instead. A description how to use this API with Java agents you can find here. The places where to store jar files for Java agents are always the same though.

这篇关于JavaAgent" java.lang.NoClassDefFoundError:de.bea.domingo.DNotesFactory的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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