PDA

View Full Version : Problems with PAC and MySQL



perrand
09-17-2010, 10:49 AM
I've configured PAC to use MySQL for the hibernate database. The BI-server works fine and if I manually add new users to the database they can log in.

When I log into PAC, I get the following error messages:
"Unable to refresh database connection list: The call failed on the server; see server log for details"
and
"Unable to refresh security information: The call failed on the server; see server log for details"

In the log, I get:

2010-09-17 16:46:35.411:/:WARN: Exception while dispatching incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract org.pentaho.pac.common.UserRoleSecurityInfo org.pentaho.pac.client.PacService.getUserRoleSecurityInfo() throws org.pentaho.pac.common.PacServiceException' threw an unexpected exception: java.lang.NoClassDefFoundError: com/mchange/v2/c3p0/DataSources
at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:360)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:546)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:166)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:285)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:835)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:638)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:208)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)
at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
Caused by: java.lang.NoClassDefFoundError: com/mchange/v2/c3p0/DataSources
at org.hibernate.connection.C3P0ConnectionProvider.configure(C3P0ConnectionProvider.java:154)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56)
at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:414)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2073)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1298)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:859)
at org.pentaho.pac.server.common.HibernateSessionFactory.addConfiguration(HibernateSessionFactory.java:91)
at org.pentaho.pac.server.common.HibernateSessionFactory.initDefaultConfiguration(HibernateSessionFactory.java:70)
at org.pentaho.pac.server.PacServiceImpl.refreshHibernateConfig(PacServiceImpl.java:877)
at org.pentaho.pac.server.PacServiceImpl.getUserRoleMgmtService(PacServiceImpl.java:857)
at org.pentaho.pac.server.PacServiceImpl.getUserRoleSecurityInfo(PacServiceImpl.java:124)
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.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:527)
... 18 more
Caused by: java.lang.ClassNotFoundException: com.mchange.v2.c3p0.DataSources
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 36 more

The user I configured is connected to MySQL, I can verify that in MySQL.

codek
09-17-2010, 11:52 AM
seems quite simple - you havent added your mysql c3po driver to PAC:

java.lang.NoClassDefFoundError: com/mchange/v2/c3p0/DataSources

Add that in, restart PAC and it'll work.

perrand
09-20-2010, 05:43 AM
Thank you! Now it works perfectly! :-)