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

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #26440

    I am unable to produce PDF in background with a Domino 7.0.4 server.

    The scenario is

    Domino 7.0.4 on RHES3 (or on CentOS 5)
    pd4ml.prof.361b1

    The domino agent is triggered by a button in a notes document accessed with a web browser.

    There is a Lotus Script agent that calls a java agent, so the java agent runs in background.

    What I get is

    – 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.

    – I tried with a virtual frame buffer, Xvfb, and goes better, but the agent gives an error at pd4ml.render(new StringReader(inputHTML), fos, new URL(“file:.”), “utf-8”);:

    12/08/2010 06.32.04 PM HTTP JVM: java.lang.NullPointerException
    12/08/2010 06.32.04 PM HTTP JVM: at org.zefer.pd4ml.pdf.g.Õ00000(Unknown Source)
    12/08/2010 06.32.04 PM HTTP JVM: at org.zefer.pd4ml.pdf.c.ö00000(Unknown Source)
    12/08/2010 06.32.04 PM HTTP JVM: at org.zefer.pd4ml.pdf.c.close(Unknown Source)
    12/08/2010 06.32.04 PM HTTP JVM: at org.zefer.pd4ml.pdf.PD4Device.dispose(Unknown Source)
    12/08/2010 06.32.04 PM HTTP JVM: at org.zefer.pd4ml.PD4ML.super(Unknown Source)
    12/08/2010 06.32.04 PM HTTP JVM: at org.zefer.pd4ml.PD4ML.render(Unknown Source)
    12/08/2010 06.32.04 PM HTTP JVM: at org.zefer.pd4ml.PD4ML.render(Unknown Source)
    12/08/2010 06.32.04 PM HTTP JVM: at org.zefer.pd4ml.PD4ML.render(Unknown Source)
    12/08/2010 06.32.04 PM HTTP JVM: at PdfAgent.generatePDF(PdfAgent.java:196)
    12/08/2010 06.32.04 PM HTTP JVM: at PdfAgent.NotesMain(PdfAgent.java:136)
    12/08/2010 06.32.04 PM HTTP JVM: at lotus.domino.AgentBase.runNotes(Unknown Source)
    12/08/2010 06.32.04 PM HTTP JVM: at lotus.domino.NotesThread.run(Unknown Source)

    =====

    I havethe same behaviour scheduling the agent given in the example (PDFConverterExampleR7)

    by adding in NotesMain the lines:
    Database db = agentContext.getCurrentDatabase();
    View view = db.getView(“main”);
    System.setProperty(“java.awt.headless”, “true”);
    Document doc = view.getFirstDocument();

    and commenting the line:
    // Document doc = dc.getFirstDocument();

    i got the output:

    12/08/2010 07.40.07 PM JVM: Java Virtual Machine initialized.
    12/08/2010 07.40.08 PM AMgr: Agent (‘CreatePDFbg’ in ‘temp/PDFConverterExampleR7.nsf’) printing: AGENT start.
    12/08/2010 07.40.09 PM AMgr: Agent (‘CreatePDFbg’ in ‘temp/PDFConverterExampleR7.nsf’) printing: TRANS: org.apache.xalan.transformer.TransformerImpl@15cfffe7
    12/08/2010 07.40.11 PM AMgr: Agent (‘CreatePDFbg’ in ‘temp/PDFConverterExampleR7.nsf’) error message: java.lang.NullPointerException
    12/08/2010 07.40.11 PM AMgr: Agent (‘CreatePDFbg’ in ‘temp/PDFConverterExampleR7.nsf’) error message: at org.zefer.pd4ml.pdf.e.Õ00000(Unknown Source)
    12/08/2010 07.40.11 PM AMgr: Agent (‘CreatePDFbg’ in ‘temp/PDFConverterExampleR7.nsf’) error message: at org.zefer.pd4ml.pdf.f.õ00000(Unknown Source)
    12/08/2010 07.40.11 PM AMgr: Agent (‘CreatePDFbg’ in ‘temp/PDFConverterExampleR7.nsf’) error message: at org.zefer.pd4ml.pdf.f.close(Unknown Source)
    12/08/2010 07.40.11 PM AMgr: Agent (‘CreatePDFbg’ in ‘temp/PDFConverterExampleR7.nsf’) error message: at org.zefer.pd4ml.pdf.PD4Device.dispose(Unknown Source)
    12/08/2010 07.40.11 PM AMgr: Agent (‘CreatePDFbg’ in ‘temp/PDFConverterExampleR7.nsf’) error message: at org.zefer.pd4ml.PD4ML.o00000(Unknown Source)
    12/08/2010 07.40.11 PM AMgr: Agent (‘CreatePDFbg’ in ‘temp/PDFConverterExampleR7.nsf’) error message: at org.zefer.pd4ml.PD4ML.render(Unknown Source)
    12/08/2010 07.40.11 PM AMgr: Agent (‘CreatePDFbg’ in ‘temp/PDFConverterExampleR7.nsf’) error message: at org.zefer.pd4ml.PD4ML.render(Unknown Source)
    12/08/2010 07.40.11 PM AMgr: Agent (‘CreatePDFbg’ in ‘temp/PDFConverterExampleR7.nsf’) error message: at org.zefer.pd4ml.PD4ML.render(Unknown Source)
    12/08/2010 07.40.11 PM AMgr: Agent (‘CreatePDFbg’ in ‘temp/PDFConverterExampleR7.nsf’) error message: at PdfAgent.generatePDF(PdfAgent.java:170)
    12/08/2010 07.40.11 PM AMgr: Agent (‘CreatePDFbg’ in ‘temp/PDFConverterExampleR7.nsf’) error message: at PdfAgent.NotesMain(PdfAgent.java:110)
    12/08/2010 07.40.11 PM AMgr: Agent (‘CreatePDFbg’ in ‘temp/PDFConverterExampleR7.nsf’) error message: at lotus.domino.AgentBase.runNotes(Unknown Source)
    12/08/2010 07.40.11 PM AMgr: Agent (‘CreatePDFbg’ in ‘temp/PDFConverterExampleR7.nsf’) error message: at lotus.domino.NotesThread.run(Unknown Source)

    any help or suggestion will be very appreciated

    thanks in advance

    tommaso

    #28179

    > – 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:1t714atl]try {
    md5 = java.security.MessageDigest.getInstance(“MD5”);
    } catch (Exception e) {
    return null;
    }[/language:1t714atl]

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

    #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

    #28181

    Glad you resolved the problem!

    And thank you for sharing the workaround!

Viewing 4 posts - 1 through 4 (of 4 total)

The forum ‘Troubleshooting’ is closed to new topics and replies.