On 17/04/18 17:25, Adam Rauch wrote:
> Our code retrieves DataSources using JNDI, with code similar to this:
>
> new InitialContext().lookup("java:comp/env/jdbc/labkeyDataSource");
>
> With a simple DataSource definition that doesn't specify a "factory"
> attribute, this code now throws in Tomcat 7.0.86. (It works in 7.0.85,
> 8.0.50, 8.5.30, and 9.0.7.)
>
> According to the tomcat70 GitHub mirror, a recent change to
> Constants.java switched DBCP_DATASOURCE_FACTORY to
> "org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory", which seems
> suspicious. See
> https://github.com/apache/tomcat70/commit/08b7ca0fae77063202d82e719eb35e4eda881bbf
Yep. That is an error on my part. Explicitly setting the factory is the
work-around.
I'll get that fixed shortly.
Mark
>
>
> Root cause stack trace is:
>
> Caused by: java.lang.ClassNotFoundException:
> org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory
> at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:264)
> at
> org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:115)
>
> ... 26 more
>
> Thanks,
> Adam
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]