You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Walter Gamba <wa...@e-gramma.net> on 2002/05/07 19:33:11 UTC
Error using MySQL with Jetspeed 1.3a2
Hello to everyone.
I'm having the infamous horrible exception while trying to use Jetspeed
(latest version, 1.3a2) connecting to a MySQL DB.
I use tomcat 3.3.1. on a Linux Debian 2.2. Same error with Tomcat 3.2.1 on
Win2K though... (with tomcat 4 I had a ClassFormatException on shutdown so
I quit using it). The JDK I use is 1.3.1 on both machines.
Here is a brief summary of my problem:
Installed and testet jetspeed: Works
I've created and populated the tables in my MySQL DB with the supplied scripts.
Tested connection and table listing with commandline mysql: works
I've included both org.gjt.mm package version 1.2 and 2.0, compressed and
Uncompressed.. in the LIB directory of both Jetspeed/WEB-INF and Tomcat,
even unpacked it in WEB-INF/classes..
Nothing.. The problem seem to be some incompatibility of turbine with the
MYSQL driver.. the final proof is that if I write a portlet (and use
HypersonicSQL as DB for jetspeed) and this portlet reads from MySQL I am
able to ACTUALLY read data from mysql using the same exact driver..
meaning, I think, the mysql-jdbc library CAN be found by the JVM..
I've tried with Oracle and in a few steps I get connected!
Here are the details:
I've configured TurbineREsources.properties as follows ...
#tried two brands of drivers..
database.default.driver=org.gjt.mm.mysql.Driver
#database.default.driver=twz1.jdbc.mysql.jdbcMysqlDriver
database.default.url=jdbc:mysql://localhost/DBNAME
database.default.username=USER
database.default.password=PWD
.....
database.adaptor=MMSQL
database.adaptor.MMSQL=org.gjt.mm.mysql.Driver
But I can't log in.
I'm sure Jetspeed in a way sees the Driver, because while tinkering with
the config and classpath etc I once had an error stating that the DBDriver
wasn't found, and now it has disappeared. Moreover, if I connect manually
in a portlet using a self written DBPool manager, i can fetch rows.
Curiously enoguh i couldn't connect to the MySQL db using Turbine built in
pool manager .... but anyway..
What Do i Have wrong?? I've tried with mmMySQL drivers (both version 1.2c,
2.0 that ships with jetspeed) and twz drivers..
I've seen the code, but the exception doesn't make sense with the line of
code it is supposed to be :
public User retrieve( String username )
throws UnknownEntityException, DataBackendException
{
Criteria criteria = new Criteria();
>>> criteria.add( TurbineUserPeer.USERNAME, username );
Since the only class that couldn't be found in this line is TurbineUserPeer
that is inside the jetspeed JAR file..
The first time I restart tomcat and try to log in (the first page of
course, displays correctly) I get this exception
Horrible Exception: java.lang.ExceptionInInitializerError:
java.lang.NullPointerException at
org.apache.turbine.om.security.peer.TurbineUserPeer.(TurbineUserPeer.java:99)
at
org.apache.turbine.services.security.db.DBUserManager.retrieve(DBUserManager.java:158)
at
org.apache.turbine.services.security.db.DBUserManager.retrieve(DBUserManager.java:246)
at
org.apache.turbine.services.security.BaseSecurityService.getAuthenticatedUser(BaseSecurityService.java:312)
at
org.apache.turbine.services.security.TurbineSecurity.getAuthenticatedUser(TurbineSecurity.java:199)
at
org.apache.turbine.modules.actions.LoginUser.doPerform(LoginUser.java:111)
at org.apache.turbine.modules.Action.perform(Action.java:87) at
org.apache.turbine.modules.ActionLoader.exec(ActionLoader.java:122) at
org.apache.jetspeed.modules.actions.JLoginUser.doPerform(JLoginUser.java:161)
at org.apache.turbine.modules.Action.perform(Action.java:87) at
org.apache.turbine.modules.ActionLoader.exec(ActionLoader.java:122) at
org.apache.turbine.Turbine.doGet(Turbine.java:511) at
org.apache.turbine.Turbine.doPost(Turbine.java:655) at
javax.servlet.http.HttpServlet.service(HttpServlet.java) at
javax.servlet.http.HttpServlet.service(HttpServlet.java) at
org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
at org.apache.tomcat.core.Handler.invoke(Handler.java:322) at
org.apache.tomcat.core.Handler.service(Handler.java:235) at
org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485) at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
at
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
at java.lang.Thread.run(Thread.java:484)
from the second time onwards I get this other exception:
Horrible Exception: java.lang.NoClassDefFoundError at
org.apache.turbine.services.security.db.DBUserManager.retrieve(DBUserManager.java:158)
at
org.apache.turbine.services.security.db.DBUserManager.retrieve(DBUserManager.java:246)
at
org.apache.turbine.services.security.BaseSecurityService.getAuthenticatedUser(BaseSecurityService.java:312)
at
org.apache.turbine.services.security.TurbineSecurity.getAuthenticatedUser(TurbineSecurity.java:199)
at
org.apache.turbine.modules.actions.LoginUser.doPerform(LoginUser.java:111)
at org.apache.turbine.modules.Action.perform(Action.java:87) at
org.apache.turbine.modules.ActionLoader.exec(ActionLoader.java:122) at
org.apache.jetspeed.modules.actions.JLoginUser.doPerform(JLoginUser.java:161)
at org.apache.turbine.modules.Action.perform(Action.java:87) at
org.apache.turbine.modules.ActionLoader.exec(ActionLoader.java:122) at
org.apache.turbine.Turbine.doGet(Turbine.java:511) at
org.apache.turbine.Turbine.doPost(Turbine.java:655) at
javax.servlet.http.HttpServlet.service(HttpServlet.java) at
javax.servlet.http.HttpServlet.service(HttpServlet.java) at
org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
at org.apache.tomcat.core.Handler.invoke(Handler.java:322) at
org.apache.tomcat.core.Handler.service(Handler.java:235) at
org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485) at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
at
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
at java.lang.Thread.run(Thread.java:484)
The jetspeed.log file adds little more to the stack trace:
[Tue May 07 19:13:01 GMT+02:00 2002] -- ERROR --
Exception: java.lang.ClassNotFoundException: MMSQL
Stack Trace follows:
java.lang.ClassNotFoundException: MMSQL
at
org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.java:524)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
and a few lines below
[Tue May 07 19:13:01 GMT+02:00 2002] -- WARN -- IDBroker is being used with
db 'default', which does not support transactions. IDBroker attempts to
use transactions to limit the possibility of duplicate key
generation. Without transactions, duplicate key generation is possible if
multiple JVMs are used or other means are used to write to the database.
[Tue May 07 19:13:01 GMT+02:00 2002] -- ERROR -- BasePeer.MapBuilder failed
trying to instantiate: org.apache.turbine.util.db.map.TurbineMapBuilder
Exception: org.apache.turbine.util.TurbineException: Unknown JDBC
driver: org.gjt.mm.mysql.Driver: Check your configuration file
Stack Trace follows:
java.lang.InstantiationException: Unknown JDBC driver:
org.gjt.mm.mysql.Driver: Check your configuration file
at
org.apache.turbine.util.db.adapter.DBFactory.create(DBFactory.java:183)
at
org.apache.turbine.services.db.TurbineMapBrokerService.getDatabaseMap(TurbineMapBrokerService.java:187)
rethrown as org.apache.turbine.util.TurbineException: Unknown JDBC driver:
org.gjt.mm.mysql.Driver: Check your configuration file
THe Turbine framework can't find org.gjt.mm.msql.Driver!!!!!!!!!!!!!
Any help.... I've read the mailling list archives and nobody seems to have
my exact problem..
thanks
Walter Gamba
Walter Gamba
walter@e-gramma.it
E-Gramma srl
via Palazzo di Citta' 8 - 10122 TORINO
tel 011-5136583 fax 011-5136582
www.e-gramma.it
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>