Announcement Announcement Module
Collapse
No announcement yet.
Error when running test case Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error when running test case

    Hi, I am a beginner to the spring and actually I am now doing the application development user Spring framework. However, I got a InitializationError when trying to run the JUnit test. It seems is some bean cannot be initialiated. Is there any efficiency way that I can trace that kind of error. Thanks


    java.lang.NoClassDefFoundError: org.springframework.beans.factory.support.BeanDefi nitionRegistry
    at java.lang.J9VMInternals.verifyImpl(Native Method)
    at java.lang.J9VMInternals.verify(J9VMInternals.java: 59)
    at java.lang.J9VMInternals.verify(J9VMInternals.java: 57)
    at java.lang.J9VMInternals.verify(J9VMInternals.java: 57)
    at java.lang.J9VMInternals.verify(J9VMInternals.java: 57)
    at java.lang.J9VMInternals.verify(J9VMInternals.java: 57)
    at java.lang.J9VMInternals.initialize(J9VMInternals.j ava:120)
    at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInsta nce(NativeConstructorAccessorImpl.java:67)
    at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Construc tor.java:521)
    at junit.framework.TestSuite.createTest(TestSuite.jav a:56)
    at junit.framework.TestSuite.addTestMethod(TestSuite. java:279)
    at junit.framework.TestSuite.<init>(TestSuite.java:14 2)
    at org.junit.internal.runners.OldTestClassRunner.<ini t>(OldTestClassRunner.java:23)
    at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInsta nce(NativeConstructorAccessorImpl.java:67)
    at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Construc tor.java:521)
    at org.junit.internal.requests.ClassRequest.getRunner (ClassRequest.java:26)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestR eference.<init>(JUnit4TestReference.java:26)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestC lassReference.<init>(JUnit4TestClassReference.java :24)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestL oader.createTest(JUnit4TestLoader.java:34)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestL oader.loadTests(JUnit4TestLoader.java:24)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.runTests(RemoteTestRunner.java:445)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.runTests(RemoteTestRunner.java:673)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.run(RemoteTestRunner.java:386)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.main(RemoteTestRunner.java:196)

  • #2
    The Spring JAR must not be on the classpath.

    Comment


    • #3
      Problem solved. Thx a lot

      Comment

      Working...
      X