Hi Ben, You mix default config and c3p0 config. With c3p0 jdbcDriver is "DriverClass" for instance. Using class-name you use setters of ComboPooledDataSource and not tomee built-in configuration (Jdbc*). Also JtaManaged will not be provided in such datasource. To get it you either need to use JTADataSourceWrapperFactory ( https://rmannibucau.wordpress.com/2014/04/11/openejbtomee-custom-datasource-jta-integration/) or just write a DataSourceCreator for c3p0 - we dont since c3p0 tends to not be used anymore. You can write it from bonecp one for instance: https://github.com/apache/tomee/blob/master/server/openejb-bonecp/src/main/java/org/apache/openejb/bonecp/BoneCPDataSourceCreator.java
Romain Manni-Bucau @rmannibucau <https://twitter.com/rmannibucau> | Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber <http://www.tomitribe.com> 2015-12-03 15:48 GMT+01:00 Ben <[email protected]>: > Hi folks, > > Has anyone a functional snippets of resources.xml where a datasource is > configured to be pooled using c3p0 ? > > I just tried to setup c3p0 for my datasources, but I am getting a NPE. > > Here is what looks like my datasource config : > <Resource > id="jdbc/com.optosecurity.report.datasource.migration.progression" > type="javax.sql.DataSource" > class-name="com.mchange.v2.c3p0.ComboPooledDataSource"> > jdbcDriver = com.mysql.jdbc.Driver > jdbcUrl = jdbc:mysql://localhost:3306/foo > userName = bar > password = zee > JtaManaged = true > # ... > </Resource> > > Thanks in advance ! > > > > -- > View this message in context: > http://tomee-openejb.979440.n4.nabble.com/Datasource-pooled-using-c3p0-tp4677115.html > Sent from the TomEE Users mailing list archive at Nabble.com. >
