Agent Error "NoClassDefFoundError: sun/awt/X11Graphics Environment"

Hi:

I try to run an Agent to convert my WEB Lotus Form to PDF.

The problem with the agent is this error:

java.lang.NoClassDefFoundError: sun/awt/X11GraphicsEnvironment

java.lang.Class.forName1(Native Method)

java.lang.Class.forName(Class.java:142)

java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:72)

java.awt.Font.initializeFont(Font.java:285)

java.awt.Font.(Font.java:319)

My Server is AIX and i add in the notes.ini the graphics.jar path where is the Jar that contains the X11GraphicsEnvironment Class but the error appears again.

Also i include this line in the code “System.setProperty(“java.awt.headless”,“true”);” but appears a Security Error

java.security.AccessControlException: access denied (java.util.PropertyPermission java.awt.headless write)

java.security.AccessControlContext.checkPermission(AccessControlContext.java:286)

java.security.AccessController.checkPermission(AccessController.java:413)

java.lang.SecurityManager.checkPermission(SecurityManager.java:565)

java.lang.System.setProperty(System.java:682)

I dont know what i have to do to resolve this problem. Please Help me!!

Thanks

Elkin

Subject: Agent Error “NoClassDefFoundError: sun/awt/X11Graphics Environment”

The first error is telling you that the code cannot find the sun.awt.X11GraphicsEnvironment class so there is evidently either a problem with the path to the jar file or you need to restart the server.

The second error is telling you that this line:

System.setProperty(“java.awt.headless”,“true”);

is trying to set a property for which access has not been granted.

You can allow it by changing the java.policy file for the jvm to include a line like this:

grant {

permission java.util.PropertyPermission “java.awt.headless”, “write”;

};

There should already be a section that grants individual permissions - just add the single line above to that section. You will more than likely need to restart the server after doing so.

dgg