java.lang.ClassNotFoundException: org.apache.commons.dbcp2.BasicDataSource in eclipse using deployment assembly -
i have 2 projects.
- java se based let's abcapi.
- dynamic web project using tomcat server. let's abc-web
i followed tutorial automatically build , include 1 eclipse project another include abcapi abc-web. have clear separation between these two. included necessary dependencies , api's in abcapi project , believe when using deployment assembly shouldn't problem because underlying referencing project has reference it's libraries , dependencies in libs folder.
i see no error before execution. after project runs , basicdatasource called exception.
severe: servlet.service() servlet [com.trolix.abcapi.cbf.srvstart] in context path [/abc-web] threw exception [servlet execution threw exception] root cause java.lang.classnotfoundexception: org.apache.commons.dbcp2.basicdatasource @ org.apache.catalina.loader.webappclassloader.loadclass(webappclassloader.java:1714) @ org.apache.catalina.loader.webappclassloader.loadclass(webappclassloader.java:1559) @ com.trolix.abcapi.dbcon.dbconnection.<init>(dbconnection.java:38) @ com.trolix.abcapi.dbcon.dbconnection.getinstance(dbconnection.java:51) @ com.trolix.abcapi.dao.daostart.<clinit>(daostart.java:19) @ com.trolix.abcapi.controller.ctrlstart.<init>(ctrlstart.java:14) @ com.trolix.abcapi.manager.mgrstart.<init>(mgrstart.java:14) @ com.trolix.abcapi.cbf.srvstart.dopost(srvstart.java:55) @ javax.servlet.http.httpservlet.service(httpservlet.java:647) @ javax.servlet.http.httpservlet.service(httpservlet.java:728) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:305) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:210) @ org.apache.catalina.core.standardwrappervalve.invoke(standardwrappervalve.java:222) @ org.apache.catalina.core.standardcontextvalve.invoke(standardcontextvalve.java:123) @ org.apache.catalina.authenticator.authenticatorbase.invoke(authenticatorbase.java:502) @ org.apache.catalina.core.standardhostvalve.invoke(standardhostvalve.java:171) @ org.apache.catalina.valves.errorreportvalve.invoke(errorreportvalve.java:99) @ org.apache.catalina.valves.accesslogvalve.invoke(accesslogvalve.java:953) @ org.apache.catalina.core.standardenginevalve.invoke(standardenginevalve.java:118) @ org.apache.catalina.connector.coyoteadapter.service(coyoteadapter.java:408) @ org.apache.coyote.http11.abstracthttp11processor.process(abstracthttp11processor.java:1023) @ org.apache.coyote.abstractprotocol$abstractconnectionhandler.process(abstractprotocol.java:589) @ org.apache.tomcat.util.net.jioendpoint$socketprocessor.run(jioendpoint.java:312) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615) @ java.lang.thread.run(thread.java:745)
uptil have tried many things suggested community i.e.
- delete server
- clean server
- restart eclipse
- build code
- deploy again etc.
but nothing has yet worked me. please guide!
Comments
Post a Comment