Hi,

this is my second try getting cdk-taverna to run.

After getting a bit more into Java and CDK (I was a complete starter about 4 weeks ago), I got the code from CVS and tried to follow the instructions in the readme file.

Here I had the following problems which I hope I solved correctly:

After importing the cdk-taverna project into eclipse:
1. Since I have no CDK project in my eclipse I removed the cdk project from the required projects (given that I have the cdk.jar  included I thought this to be sensible)
2. Since I am working with Taverna 1.3 I changed the required taverna-1.3.1.jar to my taverna-1.3.jar
3. The following files showed problems:

        applications directory:

                CDKTavernaTests.java => the boolean values in lines 48 and 49 are Boolean objects but are later used as standard boolean type ... chenged to simple boolean
                TavernaTestData.java => in lines 190,191,194, and 199 the hashCode() function for the String is used. Since this returns an int but the HashMap.put() functions expects an object, I changed this to the String only
                DetectHueckelAromaticityTest.java => in line 61, I changed the return value from expectedDefaultReults[i] (which is boolean) to Boolean object (with new Boolean(expectedDefaultReults[i]) )
       
        cdk directory:

                DetectHueckelAromaticity.java => in lines 76 and 81, I changed the true and false values in the isAromaticBooleanList.add() functions to Boolean object by new Boolean()
                writeCMLChemFileToFile.java => in line 48, did the same in matchedList.add()

After that, building of the project worked perfectly.

I then generated the jar (via ant clean jar) and copied it as well as the cdk.jar into  the lib directory and subsequently generated the apiconsumer.xml as described

I also checked that all classes are in the taverna-cdk and they are.

When I now start taverna eveything looks ok. I have cheminformatics things as local widgets as well as additional functions such as parseSmiles. However, when I try a very simple worklfow such as a string constant with a smiles and a parseSmiles function I get errors that I would connect to taverna not finding functions from cdk:

Using ParseSmiles:
>Caused by: java.lang.NoSuchMethodError: org.openscience.cdk.graph.ConnectivityChecker.partitionIntoMolecules(Lorg/openscience/cdk/AtomContainer;)Lorg/openscience/cdk/SetOfMolecules;
>       at org.openscience.cdk.tools.HydrogenAdder.addImplicitHydrogensToSatisfyValency(HydrogenAdder.java:280)
>        at org.openscience.cdk.smiles.SmilesParser.parseSmiles(SmilesParser.java:326)
>       at org.openscience.cdk.applications.taverna.smiles.SmilesTools.parseSMILES(SmilesTools.java:46)

Using readFromSmilesFile:
>Caused by: java.lang.NoSuchMethodError: org.openscience.cdk.applications.taverna.CMLChemFile.getBuilder()Lorg/openscience/cdk/interfaces/IChemObjectBuilder;
>       at org.openscience.cdk.applications.taverna.io.CDKIOReader.readFromSMILESFile(CDKIOReader.java:55)

Using readFromMDLFile:
>Caused by: java.lang.IncompatibleClassChangeError
>        at org.openscience.cdk.applications.taverna.io.CDKIOReader.readFromMDLFile(CDKIOReader.java:93)


Can anybody help me with this? I don't think it's the "corrections" I have done to the code to get it compiled since these are not used in these simple workflows ...

Maybe it's just some variable that needs to be set, but I have absolutely no idea which one :-()

Thanks a lot,
Nik

Reply via email to