Connection pool on app engine with Cloud SQL

0 views
Skip to first unread message

user1057128 via StackOverflow

unread,
Jan 30, 2014, 8:23:40 AM1/30/14
to google-appengin...@googlegroups.com

It sounds like the newer cloud SQL JDBC drivers for app engine (1) support connection pooling.

Our app uses Spring+Hibernate and we're trying to use one of the existing java frameworks for connection pooling (BoneCP, C3p0, Hikari), and have failed so far to use any of them because of app engine limitations. Stack trace using Spring+Hibernate+C3p0 below. Did anyone manage to get this to work?

[INFO] java.lang.NoClassDefFoundError: java.lang.management.ManagementFactory is a restricted class. Please see the Google  App Engine developer's guide for more details.
[INFO]  at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:51)
[INFO]  at com.mchange.v2.c3p0.management.ActiveManagementCoordinator.<init>(ActiveManagementCoordinator.java:54)
[INFO]  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[INFO]  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
[INFO]  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[INFO]  at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
[INFO]  at com.google.appengine.tools.development.agent.runtime.Runtime.newInstance_(Runtime.java:127)
[INFO]  at com.google.appengine.tools.development.agent.runtime.Runtime.newInstance(Runtime.java:148)
[INFO]  at com.mchange.v2.c3p0.C3P0Registry.<clinit>(C3P0Registry.java:146)
[INFO]  at java.lang.Class.forName0(Native Method)
[INFO]  at java.lang.Class.forName(Class.java:190)
[INFO]  at com.google.appengine.tools.development.agent.runtime.RuntimeHelper.checkRestricted(RuntimeHelper.java:70)
[INFO]  at com.google.appengine.tools.development.agent.runtime.Runtime.checkRestricted(Runtime.java:64)
[INFO]  at com.mchange.v2.c3p0.impl.DriverManagerDataSourceBase.<init>(DriverManagerDataSourceBase.java:212)
[INFO]  at com.mchange.v2.c3p0.DriverManagerDataSource.<init>(DriverManagerDataSource.java:72)
....

(1): Old driver = com.google.appengine.api.rdbms.AppEngineDriver. New driver = com.mysql.jdbc.GoogleDriver.



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/21457736/connection-pool-on-app-engine-with-cloud-sql
Reply all
Reply to author
Forward
0 new messages