PD4ML v4 Forums PD4ML v3 Archived Forums (Read Only) Troubleshooting problems running agent in background with domino 7.0.4 Re: Re: problems running agent in background with domino 7.0.4

#28180

@PD4ML wrote:

> – the server seems to be unable to run in headless mode. It seems that domino 7 runs a 1.4 JVM which doesn’t support headless mode.

JDK introduced the headless mode starting from 1.4. However, as far as I remember, particular IBM’s JDK 1.4 implementations has problems with it. I would recommend to try to manage to run your JDK headless.

Regarding the exception. It looks like the only potential source of it is null returned by the code:

[language=java:35qv5iym]try {
md5 = java.security.MessageDigest.getInstance(“MD5”);
} catch (Exception e) {
return null;
}[/language:35qv5iym]

Could you please create a minimalistic test in your environment and check if it returns an MD5 instance.

You are quite right.

I tried a simple agent with the code:
1. try {
2. md5 = java.security.MessageDigest.getInstance(“MD5”);
3. } catch (Exception e) {
4. return null;
5. }

and it raised an error because:
>This error can occur when a Domino 6 file named ibmjcaprovider.jar still exists on
>the machine, because, for unknown reasons, it was not properly removed during
>the upgrade. In Domino 6, the file ibmjcaprovider.jar was used to provide the class
>listed in the error message. Due to the change in JVM version for Domino 7, a
>new jar file is used, ibmjceprovider.jar.
>
>To correct the problem, delete ibmjcaprovider.jar as it is no longer needed.
(http://www-01.ibm.com/support/docview.wss?uid=swg21243598)

but even if I correct this error using headless I still got an error here:

17/08/2010 03.59.55 PM HTTP JVM: java.lang.NoClassDefFoundError: sun/awt/X11GraphicsEnvironment
17/08/2010 03.59.55 PM HTTP JVM: at java.lang.Class.forName1(Native Method)
17/08/2010 03.59.55 PM HTTP JVM: at java.lang.Class.forName(Class.java:180)
17/08/2010 03.59.55 PM HTTP JVM: at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:91)
17/08/2010 03.59.55 PM HTTP JVM: at java.awt.Font.initializeFont(Font.java:333)
17/08/2010 03.59.55 PM HTTP JVM: at java.awt.Font.(Font.java:368)
17/08/2010 03.59.55 PM HTTP JVM: at org.zefer.pd4ml.PD4PageMark.
(Unknown Source)
17/08/2010 03.59.55 PM HTTP JVM: at PdfAgent.generatePDF(PdfAgent.java:189)
17/08/2010 03.59.55 PM HTTP JVM: at PdfAgent.NotesMain(PdfAgent.java:140)
17/08/2010 03.59.55 PM HTTP JVM: at lotus.domino.AgentBase.runNotes(Unknown Source)
17/08/2010 03.59.55 PM HTTP JVM: at lotus.domino.NotesThread.run(Unknown Source)

looking here seems that some problem with IBM JVM 1.4.2 & headless is present:

http://www.ibm.com/developerworks/forums/message.jspa?messageID=3056901

BUT having deleted ibmjceprovider.jar it is possible to use Xvfb and I managed to produce a PDF (even if not complete, but this will be another post).

thanks a lot

tommaso