On 11/03/2021 19:08, Rob Sargent wrote:
I've started getting this error, though I've been running fine since days of "localhost" issue help.

    class org.apache.tomcat.dbcp.dbcp2.BasicDataSource cannot be cast to
    class org.apache.tomcat.jdbc.pool.DataSource
    (org.apache.tomcat.dbcp.dbcp2.BasicDataSource is in unnamed module
    of loader 'app'; org.apache.tomcat.jdbc.pool.DataSource is in
    unnamed module of loader
    org.apache.catalina.loader.ParallelWebappClassLoader @33c9efd6)

I'm most confused by the "'app'" loader.   Who's is that?  I doesn't look like a TC thing.  I have a package called "app" which includes the main() of my embedded server.

Apologies as I'm not fully up on the modules notion and was blissfully getting by without dealing with that.  Until now.  You can find me over in the Java Organization section of hell.

Which database connection pool do you want to use?

Tomcat's package renamed copy of Apache Commons DBCP
or
Tomcat's own JDBC Pool?

(there isn't much to choose between them these days).

How is the DataSource defined?

Do you know what code is triggering the failing cast?

The app loader is one of the class loaders in the standard Java class loader hierarchy. I forget the exact details. Google should be able to tell you that.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to