java.lang.NoClassDefFoundError: org/apache/commons/dbcp2/BasicDataSource

Stack Overflow | richersoon | 8 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    NoClassDefFoundError when running test via Ant but working when Deployed in Tomcat

    Stack Overflow | 8 months ago | richersoon
    java.lang.NoClassDefFoundError: org/apache/commons/dbcp2/BasicDataSource

    Root Cause Analysis

    1. java.lang.NoClassDefFoundError

      org/apache/commons/dbcp2/BasicDataSource

      at com.x.ws.repo.DatabaseConnection.<init>()
    2. com.x.ws
      FooTest.setUp
      1. com.x.ws.repo.DatabaseConnection.<init>(Unknown Source)
      2. com.x.ws.repo.DatabaseConnection.getSynchronizedInstance(Unknown Source)
      3. com.x.ws.repo.DatabaseConnection.getInstance(Unknown Source)
      4. com.x.ws.repo.Foo.<init>(Unknown Source)
      5. com.x.ws.repo.FooTest.setUp(Unknown Source)
      5 frames