Results 1 to 3 of 3

Thread: BasicDataSourceFactory class not found in Tomcat

  1. #1

    Default BasicDataSourceFactory class not found in Tomcat

    Hello,

    I'm trying to make a Tomcat server webapp, developed on Fedora 8/9 with Tomcat 5.* work on openSUSE 11.0, with Tomcat 6. It misses the class org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory .
    The developer said that on Fedora this class is in /usr/share/java/commons-dbcp-tomcat5-1.2.1.jar which is in the package jakarta-commons-dbcp-tomcat5 . I installed java-commons-dbcp which does not contain this class, and the openSUSE 11.0 repository does not contain a -tomcat package (of course I would need for tomcat6, so something like jakarta-commons-dbcp-tomcat6).

    Could you help how should I get that class for openSUSE 11.0?

    Here is the stack trace from the log:
    2008.07.09. 18:38:26 org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet Login threw exception
    javax.servlet.ServletException: Login javax.naming.NamingException: Could not
    create resource factory instance [Root exception is
    java.lang.ClassNotFoundException:
    org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory]
    at SqlCmd.<init>(SqlCmd.java:40)
    at Login.doPost(Login.java:52)
    at Login.doGet(Login.java:142)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
    at
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at
    org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:619)

  2. #2
    Join Date
    Jun 2008
    Location
    Canada
    Posts
    62

    Default Re: BasicDataSourceFactory class not found in Tomcat

    I always install tomcat using the binary distribution packages from Tomcat's site. I occasionally reuse SuSE's init script and deployment layout.

    If you use Tomcat's site's binary packages, it won't be necessary for you to install any other library (well, maybe jsf's if you need them).

    Try what I suggest and tell me if it works. If it does not, then I guess there is a problem with that web application. I am advancing the idea that it is using tomcat's specific implementation libraries. Normally, a portable application should only use the specification defined interfaces which are implemented by the vendor's libraries (in this case tomcat's).

    If there is a problem, post the relevant code: I'll try to help.
    "All truths wait in all things,
    They neither hasten their own delivery nor resist it" -- Walt Whitman

  3. #3
    Bastian79 NNTP User

    Default Re: BasicDataSourceFactory class not found in Tomcat

    the tomcat-dbcp.jar which ships with the binary tomcat distribution from apache seems to be missing ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •