I have the same problem Could not initialize class 'com.mysql.jdbc.
ConnectionImpl' while working with Google app engine in the Dev mode. Any leads on the solution?
Thanks
On Monday, June 20, 2011 5:59:35 PM UTC+5:30, Aryan wrote:
Hi all,
I have an application using RequestFactory. Its a small
application for the purpose of practice. Here is the problem that when
I run the application ( in eclipse with Google App Engine ) it says
Could not initialize class 'com.mysql.jdbc.ConnectionImpl'. However on
compiling and deploying over Tomcat 7.0 container it runs fine and run
as expected.
Now this kind of behavior is a bit uncomfortable for development. Any
Idea how it can be resolved within Dev mode.
The Exception stack trace is as following :
com.google.web.bindery.requestfactory.server. ReportableException:
Server Error: Could not initialize class com.mysql.jdbc.ConnectionImpl
at
com.google.web.bindery.requestfactory.server. ServiceLayerDecorator.report( ServiceLayerDecorator.java:
238)
at
com.google.web.bindery.requestfactory.server. ReflectiveServiceLayer.invoke( ReflectiveServiceLayer.java:
191)
at
com.google.web.bindery.requestfactory.server. ServiceLayerDecorator.invoke( ServiceLayerDecorator.java:
110)
at
com.google.web.bindery.requestfactory.server. ServiceLayerDecorator.invoke( ServiceLayerDecorator.java:
110)
at
com.google.web.bindery.requestfactory.server. ReflectiveServiceLayer.isLive( ReflectiveServiceLayer.java:
202)
at
com.google.web.bindery.requestfactory.server. ServiceLayerDecorator.isLive( ServiceLayerDecorator.java:
115)
at
com.google.web.bindery.requestfactory.server. LocatorServiceLayer.doIsLive( LocatorServiceLayer.java:
198)
at
com.google.web.bindery.requestfactory.server. LocatorServiceLayer.isLive( LocatorServiceLayer.java:
90)
at
com.google.web.bindery.requestfactory.server. ServiceLayerDecorator.isLive( ServiceLayerDecorator.java:
115)
at
com.google.web.bindery.requestfactory.server. SimpleRequestProcessor. createReturnOperations( SimpleRequestProcessor.java:
268)
at
com.google.web.bindery.requestfactory.server. SimpleRequestProcessor. process( SimpleRequestProcessor.java:
225)
at
com.google.web.bindery.requestfactory.server. SimpleRequestProcessor. process( SimpleRequestProcessor.java:
125)
at
com.google.web.bindery.requestfactory.server. RequestFactoryServlet.doPost( RequestFactoryServlet.java:
118)
at javax.servlet.http.HttpServlet.service( HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service( HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle( ServletHolder.java:
511)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1166)
at
com.google.appengine.tools.development. HeaderVerificationFilter. doFilter( HeaderVerificationFilter.java:
35)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.appengine.api.blobstore.dev.ServeBlobFilter. doFilter(ServeBlobFilter.java:
58)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.apphosting.utils.servlet. TransactionCleanupFilter. doFilter( TransactionCleanupFilter.java:
43)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.appengine.tools.development.StaticFileFilter. doFilter(StaticFileFilter. java:
122)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.appengine.tools.development. BackendServersFilter.doFilter( BackendServersFilter.java:
94)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
org.mortbay.jetty.servlet.ServletHandler.handle( ServletHandler.java:
388)
at
org.mortbay.jetty.security.SecurityHandler.handle( SecurityHandler.java:
216)
at
org.mortbay.jetty.servlet.SessionHandler.handle( SessionHandler.java:
182)
at
org.mortbay.jetty.handler.ContextHandler.handle( ContextHandler.java:
765)
at org.mortbay.jetty.webapp.WebAppContext.handle( WebAppContext.java:
418)
at
com.google.apphosting.utils.jetty. DevAppEngineWebAppContext. handle( DevAppEngineWebAppContext. java:
70)
at
org.mortbay.jetty.handler.HandlerWrapper.handle( HandlerWrapper.java:
152)
at com.google.appengine.tools.development. JettyContainerService
$ApiProxyHandler.handle(JettyContainerService.java: 351)
at
org.mortbay.jetty.handler.HandlerWrapper.handle( HandlerWrapper.java:
152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest( HttpConnection.java:
542)
at org.mortbay.jetty.HttpConnection
$RequestHandler.content(HttpConnection.java:938)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser. java:218)
at org.mortbay.jetty.HttpConnection.handle( HttpConnection.java:404)
at
org.mortbay.io.nio.SelectChannelEndPoint.run( SelectChannelEndPoint.java:
409)
at org.mortbay.thread.QueuedThreadPool
$PoolThread.run(QueuedThreadPool.java:582)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class
com.mysql.jdbc.ConnectionImpl
at
com.mysql.jdbc.NonRegisteringDriver.connect( NonRegisteringDriver.java:
282)
at java.sql.DriverManager.getConnection(DriverManager. java:582)
at java.sql.DriverManager.getConnection(DriverManager. java:185)
at com.google.mydynatable.server.PizzaDAO.getConnection( PizzaDAO.java:
42)
at com.google.mydynatable.server.PizzaDAO.findByID(PizzaDAO. java:79)
at com.google.mydynatable.server.domain.Pizza.findPizza(Pizza. java:
31)
at sun.reflect.NativeMethodAccessorImpl. invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl. invoke( NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl. invoke( DelegatingMethodAccessorImpl. java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.google.appengine.tools.development.agent.runtime. Runtime.invoke(Runtime.java:
100)
at
com.google.web.bindery.requestfactory.server. ReflectiveServiceLayer.invoke( ReflectiveServiceLayer.java:
180)
... 42 more
Driver loadedcom.mysql.jdbc.Driver@10eb816
Driver loadedcom.mysql.jdbc.Driver@50c6dd
Driver loadedcom.mysql.jdbc.Driver@4f18f6
com.google.web.bindery.requestfactory.server. ReportableException:
Server Error: Could not initialize class com.mysql.jdbc.ConnectionImpl
at
com.google.web.bindery.requestfactory.server. ServiceLayerDecorator.report( ServiceLayerDecorator.java:
238)
at
com.google.web.bindery.requestfactory.server. ReflectiveServiceLayer.invoke( ReflectiveServiceLayer.java:
191)
at
com.google.web.bindery.requestfactory.server. ServiceLayerDecorator.invoke( ServiceLayerDecorator.java:
110)
at
com.google.web.bindery.requestfactory.server. ServiceLayerDecorator.invoke( ServiceLayerDecorator.java:
110)
at
com.google.web.bindery.requestfactory.server. ReflectiveServiceLayer.isLive( ReflectiveServiceLayer.java:
202)
at
com.google.web.bindery.requestfactory.server. ServiceLayerDecorator.isLive( ServiceLayerDecorator.java:
115)
at
com.google.web.bindery.requestfactory.server. LocatorServiceLayer.doIsLive( LocatorServiceLayer.java:
198)
at
com.google.web.bindery.requestfactory.server. LocatorServiceLayer.isLive( LocatorServiceLayer.java:
90)
at
com.google.web.bindery.requestfactory.server. ServiceLayerDecorator.isLive( ServiceLayerDecorator.java:
115)
at
com.google.web.bindery.requestfactory.server. SimpleRequestProcessor. createReturnOperations( SimpleRequestProcessor.java:
268)
at
com.google.web.bindery.requestfactory.server. SimpleRequestProcessor. process( SimpleRequestProcessor.java:
225)
at
com.google.web.bindery.requestfactory.server. SimpleRequestProcessor. process( SimpleRequestProcessor.java:
125)
at
com.google.web.bindery.requestfactory.server. RequestFactoryServlet.doPost( RequestFactoryServlet.java:
118)
at javax.servlet.http.HttpServlet.service( HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service( HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle( ServletHolder.java:
511)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1166)
at
com.google.appengine.tools.development. HeaderVerificationFilter. doFilter( HeaderVerificationFilter.java:
35)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.appengine.api.blobstore.dev.ServeBlobFilter. doFilter(ServeBlobFilter.java:
58)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.apphosting.utils.servlet. TransactionCleanupFilter. doFilter( TransactionCleanupFilter.java:
43)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.appengine.tools.development.StaticFileFilter. doFilter(StaticFileFilter. java:
122)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.appengine.tools.development. BackendServersFilter.doFilter( BackendServersFilter.java:
94)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
org.mortbay.jetty.servlet.ServletHandler.handle( ServletHandler.java:
388)
at
org.mortbay.jetty.security.SecurityHandler.handle( SecurityHandler.java:
216)
at
org.mortbay.jetty.servlet.SessionHandler.handle( SessionHandler.java:
182)
at
org.mortbay.jetty.handler.ContextHandler.handle( ContextHandler.java:
765)
at org.mortbay.jetty.webapp.WebAppContext.handle( WebAppContext.java: