From: Joerg K. W. <we...@in...> - 2002-07-19 05:30:58
|
Hello Egon, > > To all: this is about a JOELib <-> CDK class convertor. A start has been > > added to CVS which contains a limited convertor for the Atom classes. I > > will add Molecule and Bond later this week. > > I've added the procedures for JOEMol and JOEBond too now... but the test which > I commited (org.openscience.cdk.libio.joelib.LibIOTest) does not work because > of: > > runLibIOTest: > [java] log4j:ERROR No appenders could be found for category > (joelib.molecule.JOEMol). > [java] log4j:ERROR Please initialize the log4j system properly. > [java] Exception in thread "main" java.lang.NullPointerException > [java] at > org.openscience.cdk.libio.joelib.Convertor.convert(Convertor.java:66) > [java] at > org.openscience.cdk.libio.joelib.Convertor.convert(Convertor.java:164) > [java] at > org.openscience.cdk.libio.joelib.LibIOTest.main(LibIOTest.java:54) > [java] Java Result: 1 > > JOEMol does not configure itself, and it is unclear to me how this is done in > JOELib... Ofcourse, the error is caused by the fact that CDK uses Log4J too > (see LoggingTool) and has a log4j.properties file as well... I've tried to add > lines similar too the once found in JOELib prop file, but all with no > success.. > > Joerg, could you have a look at it and give some insight on how Log4J is > configured in JOELib? There are two problems: 1. There is a log4j.properties file needed in the cdk base directory, you can simply use the one from joelib/src/log4j.properties. This file is also included in the joelib.jar file, but log4j doesn't load it correctly. Possibly they have a wrong resource loader for jar files (just an assumption)? For my needs the resource loader in joelib loads all other text files without any problems. 2. The null pointer exception occurs, because the index numbers in CDK are different with the index numbers in JOELib: Atoms: CDK0-(N-1), JOELib 1-N Bonds: CDK0-(N-1), JOELib 0-(N-1) Sorry, for this inconsistence, but that's the numbering scheme that was taken from the OELib library. Changing this scheme would not be very recommendable. > Egon For the next 3 weeks i'm on holiday, so don't mind if i can't answer your mails !;-) Regards, Joerg -- Dipl. Chem. Joerg K. Wegner Univ. Tuebingen, Computer Architecture, Sand 1, D-72076 Tuebingen, Germany Tel. (+49/0) 7071 29 78970, Fax (+49/0) 7071 29 5091 E-Mail: mailto:we...@in... WWW: http://www-ra.informatik.uni-tuebingen.de |