Bugs item #782498, was opened at 2003-08-03 21:37
Message generated for change (Comment added) made by svaret
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=782498&group_id=22866

Category: JBossCMP
Group: v3.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Lars Bergstr�m (svaret)
Assigned to: Nobody/Anonymous (nobody)
Summary: Driver problem with DatabaseServerloginModule

Initial Comment:
My application (web app) uses MySQL as a database. I 
am also using form-based authentication so that the 
web-container will authenticate the user. I use 
DatabaseServerLoginModule to retrieve users, roles and 
passwords.

Whenever I start my application I always get this error 
the first time I try to login. I then try to login again and 
then it works fine. It's just the first time.

Best regards  /Lasse

Operating system: XP
JDK: 1.4.2

Server output:

22:58:44,514 ERROR [DatabaseServerLoginModule] 
Query failed
org.jboss.util.NestedSQLException: Apparently wrong 
driver class specified for U
RL: class: org.gjt.mm.mysql.Driver, url: 
jdbc:mysql://localhost/betservant; - ne
sted throwable: 
(org.jboss.resource.JBossResourceException: Apparently 
wrong dri
ver class specified for URL: class: 
org.gjt.mm.mysql.Driver, url: jdbc:mysql://l
ocalhost/betservant)
        at 
org.jboss.resource.adapter.jdbc.WrapperDataSource.get
Connection(Wrapp
erDataSource.java:106)
        at 
org.jboss.security.auth.spi.DatabaseServerLoginModule.g
etUsersPasswor
d(DatabaseServerLoginModule.java:96)
        at 
org.jboss.security.auth.spi.UsernamePasswordLoginModul
e.login(Usernam
ePasswordLoginModule.java:143)
        at sun.reflect.NativeMethodAccessorImpl.invoke0
(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.
java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke
(Method.java:324)
        at javax.security.auth.login.LoginContext.invoke
(LoginContext.java:675)
        at 
javax.security.auth.login.LoginContext.access$000
(LoginContext.java:1
29)
        at javax.security.auth.login.LoginContext$4.run
(LoginContext.java:610)
        at java.security.AccessController.doPrivileged
(Native Method)
        at 
javax.security.auth.login.LoginContext.invokeModule
(LoginContext.java
:607)
        at javax.security.auth.login.LoginContext.login
(LoginContext.java:534)
        at 
org.jboss.security.plugins.JaasSecurityManager.defaultLo
gin(JaasSecur
ityManager.java:462)
        at 
org.jboss.security.plugins.JaasSecurityManager.authentic
ate(JaasSecur
ityManager.java:417)
        at 
org.jboss.security.plugins.JaasSecurityManager.isValid
(JaasSecurityMa
nager.java:244)
        at 
org.jboss.security.plugins.JaasSecurityManager.isValid
(JaasSecurityMa
nager.java:219)
        at 
org.jboss.jetty.security.JBossUserRealm$JBossUserPrincip
al.isAuthenti
cated(JBossUserRealm.java:92)
        at 
org.jboss.jetty.security.JBossUserRealm$JBossUserPrincip
al.authentica
te(JBossUserRealm.java:154)
        at 
org.jboss.jetty.security.JBossUserRealm.authenticate
(JBossUserRealm.j
ava:323)
        at 
org.mortbay.jetty.servlet.FormAuthenticator.authenticat
ed(FormAuthent
icator.java:106)
        at 
org.mortbay.jetty.servlet.ServletHttpContext.jSecurityCh
eck(ServletHt
tpContext.java:121)
        at 
org.mortbay.jetty.servlet.ServletHttpContext.checkSecur
ityConstraints
(ServletHttpContext.java:137)
        at 
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch
(WebApplicati
onHandler.java:235)
        at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:5
58)
        at org.mortbay.http.HttpContext.handle
(HttpContext.java:1714)
        at 
org.mortbay.jetty.servlet.WebApplicationContext.handle
(WebApplication
Context.java:507)
        at org.mortbay.http.HttpContext.handle
(HttpContext.java:1664)
        at org.mortbay.http.HttpServer.service
(HttpServer.java:863)
        at org.jboss.jetty.Jetty.service(Jetty.java:460)
        at org.mortbay.http.HttpConnection.service
(HttpConnection.java:775)
        at org.mortbay.http.HttpConnection.handleNext
(HttpConnection.java:939)
        at org.mortbay.http.HttpConnection.handle
(HttpConnection.java:792)
        at 
org.mortbay.http.SocketListener.handleConnection
(SocketListener.java:
201)
        at org.mortbay.util.ThreadedServer.handle
(ThreadedServer.java:289)
        at org.mortbay.util.ThreadPool$PoolThread.run
(ThreadPool.java:455)
Caused by: org.jboss.resource.JBossResourceException: 
Apparently wrong driver cl
ass specified for URL: class: org.gjt.mm.mysql.Driver, 
url: jdbc:mysql://localho
st/betservant
        at 
org.jboss.resource.adapter.jdbc.local.LocalManagedConn
ectionFactory.g
etDriver(LocalManagedConnectionFactory.java:284)
        at 
org.jboss.resource.adapter.jdbc.local.LocalManagedConn
ectionFactory.c
reateManagedConnection
(LocalManagedConnectionFactory.java:146)
        at 
org.jboss.resource.connectionmanager.InternalManagedC
onnectionPool.cr
eateConnection
(InternalManagedConnectionPool.java:352)
        at 
org.jboss.resource.connectionmanager.InternalManagedC
onnectionPool.ge
tConnection(InternalManagedConnectionPool.java:151)
        at 
org.jboss.resource.connectionmanager.JBossManagedCon
nectionPool$OnePo
ol.getConnection(JBossManagedConnectionPool.java:648)
        at 
org.jboss.resource.connectionmanager.BaseConnectionM
anager2.getManage
dConnection(BaseConnectionManager2.java:413)
        at 
org.jboss.resource.connectionmanager.TxConnectionMan
ager.getManagedCo
nnection(TxConnectionManager.java:331)
        at 
org.jboss.resource.connectionmanager.BaseConnectionM
anager2.allocateC
onnection(BaseConnectionManager2.java:488)
        at 
org.jboss.resource.connectionmanager.BaseConnectionM
anager2$Connectio
nManagerProxy.allocateConnection
(BaseConnectionManager2.java:798)
        at 
org.jboss.resource.adapter.jdbc.WrapperDataSource.get
Connection(Wrapp
erDataSource.java:102)
        ... 35 more
22:58:44,514 WARN  [JBossUserRealm#null] 
authentication failure: java




----------------------------------------------------------------------

>Comment By: Lars Bergstr�m (svaret)
Date: 2003-08-07 09:17

Message:
Logged In: YES 
user_id=836793

I noticed that when I removed the driver jar from the lib 
directory of my webapp the problem seem to disappear. Is it 
that jboss already have some driver included?

Best regards

Lasse

----------------------------------------------------------------------

Comment By: Scott M Stark (starksm)
Date: 2003-08-04 12:46

Message:
Logged In: YES 
user_id=175228

There would seem to be duplicate sources of the
org.gjt.mm.mysql.Driver that are confusing the
javax.sql.DriverManager used to load the class. Where is the
jdbc driver jar(s) in the configuration you are running?


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=782498&group_id=22866


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to