#239 DescriptorEngine constructor fails

closed
5
2012-10-08
2004-12-06
No

When trying to instantiate the DescriptorEngine class
it crashes with the error:

Exception in thread "main"
java.lang.NoClassDefFoundError:
junit/framework/AssertionFailedError
at
java.lang.Class.getDeclaredConstructors0(Native Method)
at
java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)
at java.lang.Class.getConstructor0(Class.java:2640)
at java.lang.Class.newInstance0(Class.java:321)
at java.lang.Class.newInstance(Class.java:303)
at
org.openscience.cdk.qsar.DescriptorEngine.<init>(DescriptorEngine.java:75)
at test.main(test.java:7)

A test program that reproduces this error is given below:

import org.openscience.cdk.qsar.DescriptorEngine;

public class test {
public static void main(String[] args) {
DescriptorEngine de = new DescriptorEngine();
}
}

Discussion

  • Egon Willighagen

    Logged In: YES
    user_id=25678

    Hi Rajarshi, I'm not sure what the problem is that you have,
    but the constructor seems fine; I've added a JUnit test for it.
    And running the above code works fine too.

    I'm puzzeled why it actually fails to find a class definition for
    a JUnit framework class... that's not really used...

    Does the cdk.applications.DescriptorCalculator run on your
    environment?

    What are the details of your environment? 'ant info'

     
  • Rajarshi Guha

    Rajarshi Guha - 2004-12-07

    Logged In: YES
    user_id=349408

    Yes, you're right. It seems I did'nt have junit.jar in my
    CLASSPATH. As a developer this is fine - but is there a
    reason for the dependency on junit when it is not a test?

     
  • Egon Willighagen

    Logged In: YES
    user_id=25678

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks