cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: DBCP
Date Mon, 20 Jul 2015 09:26:15 GMT
> It appears that DBCP2 is not support by Cayenne 4.0, I guess?

Correct. I guess we need to add a factory for this. 

In the meantime you can easily create your own Cayenne DataSourceFactory for DBCP2. Use DBCPDataSourceFactory
[1] as an example. Then you can enter your custom factory class name in the modeler for "DataSource
Factory". 

If that works, feel free to submit a pull request to Cayenne :)

Andrus

[1] https://github.com/apache/cayenne/blob/master/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/DBCPDataSourceFactory.java



> On Jul 20, 2015, at 6:19 AM, Joe Baldwin <jfbaldwin@earthlink.net> wrote:
> 
>> What were the errors?
> 
> The only indication is via the browser (see the full message below):
> 
> 	java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSourceFactory
> 
> When I revert back to the DBCP version (1.4 & 1.6) there is no problem.
> 
> 
> This appears to be the same class that is specified in the cayenne domain xml file
> 
> 	factory="org.apache.cayenne.configuration.server.DBCPDataSourceFactory” 
> 
> Again, if there is documentation on a new configuration for DBCP2 in the cayenne docs,
I could not find it.  I figure there is either a new configuration or DBCP2 is not compatible
with Cayenne.
> 
> BTW, I just found this post
> 
> 	http://osdir.com/ml/dev-cayenne-apache/2015-04/msg00056.html
> 
> 	"So Cayenne does not know anything about DBCP2, only DBCP."
> 
> It appears that DBCP2 is not support by Cayenne 4.0, I guess?
> 
> Joe
> 
> 
> 
> 
>> On Jul 19, 2015, at 9:42 PM, John Huss <johnthuss@gmail.com> wrote:
>> 
>> What were the errors?
>> 
>> 
>> On Sun, Jul 19, 2015 at 5:37 PM Joe Baldwin <jfbaldwin@earthlink.net> wrote:
>> 
>>> Is Cayenne 4.0 compatible with Apache commons-dbcp2 & commons-pool2?
>>> 
>>> (While migrating to 4.0 (from 3.0), I was able to upgrade all of the other
>>> commons libraries without errors, but these two caused errors. When I
>>> reverted to commons-dbcp-1.4 & commons-pool-1.5.6 respectively, there were
>>> no errors.  I could not find any documentation on these versions.)
>>> 
>>> If they are compatible, then is there some other dependency I need to
>>> consider?
>>> 
>>> Thanks
>>> Joe
>>> 
>>> 
> 
> 
> 
> java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSourceFactory
> 	org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1313)
> 	org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1164)
> 	org.apache.cayenne.configuration.server.DBCPDataSourceFactory.getDataSource(DBCPDataSourceFactory.java:82)
> 	org.apache.cayenne.configuration.server.DelegatingDataSourceFactory.getDataSource(DelegatingDataSourceFactory.java:68)
> 	org.apache.cayenne.configuration.server.DefaultDataNodeFactory.createDataNode(DefaultDataNodeFactory.java:74)
> 	org.apache.cayenne.configuration.server.DataDomainProvider.addDataNode(DataDomainProvider.java:170)
> 	org.apache.cayenne.configuration.server.DataDomainProvider.createAndInitDataDomain(DataDomainProvider.java:136)
> 	org.apache.cayenne.configuration.server.DataDomainProvider.get(DataDomainProvider.java:91)
> 	org.apache.cayenne.configuration.server.DataDomainProvider.get(DataDomainProvider.java:56)
> 	org.apache.cayenne.di.spi.CustomProvidersProvider.get(CustomProvidersProvider.java:39)
> 	org.apache.cayenne.di.spi.FieldInjectingProvider.get(FieldInjectingProvider.java:43)
> 	org.apache.cayenne.di.spi.DefaultScopeProvider.get(DefaultScopeProvider.java:50)
> 	org.apache.cayenne.di.spi.DefaultInjector.getInstance(DefaultInjector.java:136)
> 	org.apache.cayenne.di.spi.FieldInjectingProvider.value(FieldInjectingProvider.java:105)
> 	org.apache.cayenne.di.spi.FieldInjectingProvider.injectMember(FieldInjectingProvider.java:68)
> 	org.apache.cayenne.di.spi.FieldInjectingProvider.injectMembers(FieldInjectingProvider.java:59)
> 	org.apache.cayenne.di.spi.FieldInjectingProvider.get(FieldInjectingProvider.java:44)
> 	org.apache.cayenne.di.spi.DefaultScopeProvider.get(DefaultScopeProvider.java:50)
> 	org.apache.cayenne.di.spi.DefaultInjector.getInstance(DefaultInjector.java:131)
> 	org.apache.cayenne.configuration.web.SessionContextRequestHandler.requestStart(SessionContextRequestHandler.java:72)
> 	org.apache.cayenne.configuration.web.CayenneFilter.doFilter(CayenneFilter.java:116)


Mime
View raw message