1

Suddenly when trying to add an external library (jar) from disk to my database I get NoClassDefFoundError when running the agent.
This has worked before without any hustle.

[0A04:001B-13BC] 2014-01-21 11:24:57   AMgr: Start executing agent 'areadregis' in 'kunder\lf\emir.nsf'
[0A04:001E-0F38] 2014-01-21 11:24:57   Agent Manager: Agent  error: Exception in thread "AgentThread: readRegis"
[0A04:001F-0F38] 2014-01-21 11:24:57   Agent Manager: Agent  error: java.lang.NoClassDefFoundError: org.apache.commons.i
o.FileUtils

In reference to this thread https://stackoverflow.com/questions/14464827/are-jar-files-in-webcontent-web-inf-lib-available-to-java-design-elements-in-dom I have tried all tips but still failing.

My code gets an error when referencing the library and suggest me to add it to Build Path. The thing is that it is already in my build path.

If I add the jar file to WebContent/WEB-INF/lib/ and the right-click and add to Build Path it moves up to Referenced Libraries.
The Java agent compiles without errors or warnings but when running it stops with an other error:

[19D8:01CB-17D8] 2014-01-21 11:13:25   Agent Manager: Agent  error: Exception in thread "Launcher: readRegis"
[19D8:01CC-17D8] 2014-01-21 11:13:25   Agent Manager: Agent  error: java.lang.Error: Unresolved compilation problems:
The import org.apache.commons.io cannot be resolved     FileUtils cannot be resolved

running Domino 9.0.1 Win/64

Please advice

4

2 に答える 2

2

私の知る限り、WebContent\WEB-INF にある jar ファイルを Java エージェントで使用することはできません。その場所からは、XPages などの Java クラスにのみアクセスできます。

エージェントまたはスクリプト ライブラリに直接追加すると、機能するはずです。

于 2014-01-21T10:50:40.953 に答える
1

私は同じ問題を抱えていました。私の場合、エージェントとライブラリに異なるバージョンの Java コンパイラがあるために発生しました。

于 2015-02-17T13:34:01.633 に答える