User 6d24b35814
26-04-2012 10:38:23
Hi
I'm using the java api in a script to flag up any potential issues in a set of smiles, specifically I'm using the valence checker.
StructureChecker checker = new ValenceErrorChecker();
My script runs fine on the commandline when executed in a terminal window, but I need to set this to run on a cronjob (obviously no terminal window). When I try this I get:-
Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY v
ariable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.access$100(X11GraphicsEnvironment.java:52)
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:155)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:131)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:89)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at java.awt.Toolkit$2.run(Toolkit.java:836)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:828)
at javax.swing.ImageIcon.<init>(ImageIcon.java:119)
at javax.swing.ImageIcon.<init>(ImageIcon.java:138)
at chemaxon.checkers.StructureCheckerDescriptor.createIconFromPath(StructureCheckerDescriptor.java:647)
at chemaxon.checkers.StructureCheckerDescriptor.getIcon(StructureCheckerDescriptor.java:632)
at chemaxon.checkers.AbstractStructureChecker.getIcon(AbstractStructureChecker.java:172)
at chemaxon.checkers.AtomChecker.createResult(AtomChecker.java:62)
at chemaxon.checkers.ComponentChecker.check1(ComponentChecker.java:71)
at chemaxon.checkers.AbstractStructureChecker.check(AbstractStructureChecker.java:194)
at prefilter_db.main(prefilter_db.java:125)
Is there a way of changing the behaviour of the code (options) so that it doesn't need a display? or is there an alternative non-graphical way of checking valency?
Many thanks
Ceara