Re: Tomcat and MySQL

2001-04-30 Thread Benoit Jacquemont

Hi,

Try to put your mysql-comp.jar and mysql-uncomp.jar in the war/WEB-INF/lib of 
your app.

It should do the trick.

BenoƮt
> Hi to all!
>
> I use Tomcat together with mysql to store my data.
> I wrote an servlet at school that uses an Oracle Database to store and
> retrieve data. It worked fine. So I wanted to use this servlet at home too.
> I changed the JDBC driver but now i get in the tomcat.log file an
> exception. The source of the exception is, that i cn't connect to my
> database. in my tomcat.log - file i found this entry:
>
> 2001-04-30 10:50:05 - Ctx( /examples ): Exception in: R( /examples +
> /servlet/Navigation + null) - java.lang.NoClassDefFoundError:
> org/gjt/mm/mysql/Driver
>   at JDBCAdapter.(JDBCAdapter.java:48)
>   at Navigation.doGet(Navigation.java:35)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at
> org.apache.tomcat.core.Handler.service(Handler.java:286)
>   at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
>   at
> org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:7
>9 7)
>   at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
>   at
> org.apache.tomcat.service.connector.JNIConnectionHandler.processConnection(
>J NIConnectionHandler.java:167)
>   at org.apache.tomcat.service.JNIEndpoint.service(JNIEndpoint.java:162)
>
> Before i had some other errors. I change the classpath that the mysql-jdbc
> driver is also in it. And now the error mentioned above occours.
> Is this a problem of my classpath and why does the exception writes:
> org/gjt/mm/my an not org.gjt.mm.my.?
>
> I know this is not a problem of tomcat, but I think many of you use the
> mysql database with java.
> Perhaps someone can help me.
>
> Thanks in advance,
>   Robert



Re: Tomcat and MySQL

2001-04-30 Thread Doug Fields

I have MySQL working fine with the driver you mention below (version 2.0.4) 
by putting the library for it (the jar file) into the WEB-INF/lib 
directory, where it belongs.

If it doesn't work for you there, you can try the $TOMCAT_HOME/lib 
directory. Some things (like JCE 1.2.1) only will work from there due to 
problems in tomcat.

I use Tomcat 3.2.1.

Doug

At 04:54 AM 4/30/2001, Robert Wohlgemuth wrote:
>Hi to all!
>
>I use Tomcat together with mysql to store my data.
>I wrote an servlet at school that uses an Oracle Database to store and
>retrieve data. It worked fine. So I wanted to use this servlet at home too.
>I changed the JDBC driver but now i get in the tomcat.log file an exception.
>The source of the exception is, that i cn't connect to my database. in my
>tomcat.log - file i found this entry:
>
>2001-04-30 10:50:05 - Ctx( /examples ): Exception in: R( /examples +
>/servlet/Navigation + null) - java.lang.NoClassDefFoundError:
>org/gjt/mm/mysql/Driver
> at JDBCAdapter.(JDBCAdapter.java:48)
> at Navigation.doGet(Navigation.java:35)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at 
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
> at org.apache.tomcat.core.Handler.service(Handler.java:286)
> at 
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> at
>org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
>7)
> at 
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
> at
>org.apache.tomcat.service.connector.JNIConnectionHandler.processConnection(J
>NIConnectionHandler.java:167)
> at 
> org.apache.tomcat.service.JNIEndpoint.service(JNIEndpoint.java:162)
>
>Before i had some other errors. I change the classpath that the mysql-jdbc
>driver is also in it. And now the error mentioned above occours.
>Is this a problem of my classpath and why does the exception writes:
>org/gjt/mm/my an not org.gjt.mm.my.?
>
>I know this is not a problem of tomcat, but I think many of you use the
>mysql database with java.
>Perhaps someone can help me.
>
>Thanks in advance,
> Robert





Re: Tomcat and MySQL

2001-05-10 Thread Gary Lawrence Murphy


Any recommendations for JDBC connection pool software?  I'd seen
Turbine mentioned in this context, but couldn't figure out how to
extract just that functionality from it.  Any other recommended
packages for a simple but robust pool?

-- 
Gary Lawrence Murphy <[EMAIL PROTECTED]> TeleDynamics Communications Inc
Business Innovations Through Open Source Systems: http://www.teledyn.com
"Computers are useless.  They can only give you answers."(Pablo Picasso)




Re: Tomcat and MySQL

2001-05-10 Thread Jeff Kilbride

DbConnectionBroker available at www.javaexchange.com.

I've also heard of Poolman, but have never used it myself.

Thanks,
--jeff

- Original Message - 
From: "Gary Lawrence Murphy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 10, 2001 1:24 PM
Subject: Re: Tomcat and MySQL


> 
> Any recommendations for JDBC connection pool software?  I'd seen
> Turbine mentioned in this context, but couldn't figure out how to
> extract just that functionality from it.  Any other recommended
> packages for a simple but robust pool?
> 
> -- 
> Gary Lawrence Murphy <[EMAIL PROTECTED]> TeleDynamics Communications Inc
> Business Innovations Through Open Source Systems: http://www.teledyn.com
> "Computers are useless.  They can only give you answers."(Pablo Picasso)
> 




Re: Tomcat and MySQL

2001-05-10 Thread c:h


the Sun press "Core Servlets" books also has some good sample code, if you
wanted to write your own connection pool class.


> 
> - Original Message - 
> From: "Gary Lawrence Murphy" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, May 10, 2001 1:24 PM
> Subject: Re: Tomcat and MySQL
> 
> 
> > 
> > Any recommendations for JDBC connection pool software?  I'd seen
> > Turbine mentioned in this context, but couldn't figure out how to
> > extract just that functionality from it.  Any other recommended
> > packages for a simple but robust pool?
> > 
> > -- 
> > Gary Lawrence Murphy <[EMAIL PROTECTED]> TeleDynamics Communications Inc
> > Business Innovations Through Open Source Systems: http://www.teledyn.com
> > "Computers are useless.  They can only give you answers."(Pablo Picasso)
> > 




Re: Tomcat and MySQL

2001-05-10 Thread Bip Thelin

On Thu, 10 May 2001, Jeff Kilbride wrote:

> DbConnectionBroker available at www.javaexchange.com.
> 
> I've also heard of Poolman, but have never used it myself.
> 
> [...]
> > 
> > Any recommendations for JDBC connection pool software?  I'd seen
> > Turbine mentioned in this context, but couldn't figure out how to
> > extract just that functionality from it.  Any other recommended
> > packages for a simple but robust pool?

There is one under Jakarta Commons.
http://jakarta.apache.org/cvsweb/index.cgi/jakarta-commons/dbcp/

..bip





Re: Tomcat and MySQL

2001-05-10 Thread Gary Lawrence Murphy

> "B" == Bip Thelin <[EMAIL PROTECTED]> writes:

B> There is one under Jakarta Commons.
B> http://jakarta.apache.org/cvsweb/index.cgi/jakarta-commons/dbcp/

I'd tried DbConnectionBroker and was reasonably satisfied, but
the jakarta-commons project looks very interesting

Thanks.

-- 
Gary Lawrence Murphy <[EMAIL PROTECTED]> TeleDynamics Communications Inc
Business Innovations Through Open Source Systems: http://www.teledyn.com
"Computers are useless.  They can only give you answers."(Pablo Picasso)




RE: Tomcat and mySQL

2001-02-28 Thread Cato, Christopher

Add ;autoreconnect=true to the db connect string.

> -Original Message-
> From: Herchel Wojciech [mailto:[EMAIL PROTECTED]]
> Sent: den 28 februari 2001 17:32
> To: 'Tomcat'
> Subject: Tomcat and mySQL
> 
> 
> Hi!
> 
> I'm using JDBCRealm authorisation.
> How can I force mySQL not to close the connection Tomcat 
> opened upon startup
> (to database where users, roles, user_roles tables are stored)?
> i assume mySQL's variable wait_timeout is responsible for 
> closing inactive
> connections. the default is 28800 secs, will changing it to 
> zero do the
> trick? or else? anyone?
> 
> regards, 
> 
> vVolf
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Tomcat and mysql

2003-01-22 Thread Larry Meadors
Looking at the stack trace, I do not see anything related to mysql. What
makes you think that is the source of the problem?

Based on the org.apache.jsp.projects$jsp bit, I would look in the
project.jsp file first...

Larry

>>> [EMAIL PROTECTED] 01/22/03 15:47 PM >>>
Hello, 

I have installed a web application called xplanner. It is using mysql
and
it is integrated in tomcat for authentication. 

I got the following error when I startup the application. I susspect
somehow tomcat doesn't work well with mysql database. I wonder if
anyone has seen this problem and if anyone has configured tomcat to work
with mysql database.

Here is the error:

A Servlet Exception Has Occurred

Exception Report:

javax.servlet.ServletException: java/lang/reflect/InvocationHandler
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.(Compiled Code)
at java.lang.Exception.(Compiled Code)
at javax.servlet.ServletException.(ServletException.java:161)
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(Unknown
Source)
at org.apache.jsp.projects$jsp._jspService(Compiled Code)
at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Unknown
Source)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown
Source)
at org.apache.jasper.servlet.JspServlet.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at org.apache.catalina.core.ApplicationDispatcher.invoke(Unknown
Source)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(Unknown Source)
at
org.apache.catalina.core.ApplicationDispatcher.forward(Unknown
Source)
at
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.java:1759)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1596)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)



Thanks,

Lihong


--
To unsubscribe, e-mail:  

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Tomcat and MySQL

2003-07-31 Thread John Turner
Should be "?user=leeson&password="

Also you need to make sure that user leeson has access privileges to 
MySQL from localhost.

http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Database_Administration.html#User_Account_Management

John

engp0510 wrote:

Hi,
 I am using Tomcat 4.0 and MySQL 4.0.14 on WIn2K Professional.
In Server.XML of Tomcat, I use:
 
connectionURL="jdbc:mysql://localhost/authority?user=leeson;password="
  userTable="users" userNameCol="user_name"
userCredCol="user_pass"
  userRoleTable="user_roles" roleNameCol="role_name" />
In MySQL, I set all user must access database with password and grant user
'leeson' with all privileges. I can use leeson and password to log into
MySQL. But when I start tomcat-standalone, there is always  :
Catalina.start: LifecycleException:  Exception opening database connection:
java.sql.SQLException: Invalid authorizatio
n specification: Access denied for user: 'leeson;[EMAIL PROTECTED]' (Using
password: NO)
LifecycleException:  Exception opening database connection:
java.sql.SQLException: Invalid authorization specification:
 Access denied for user: 'leeson;[EMAIL PROTECTED]' (Using password: NO)
at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:615)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307)
at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:505)
at org.apache.catalina.startup.Catalina.start(Catalina.java:776)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
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:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:218)
- Root Cause -
java.sql.SQLException: Invalid authorization specification: Access denied
for user: 'leeson;[EMAIL PROTECTED]' (Using p
assword: NO)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:659)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1562)
at com.mysql.jdbc.Connection.(Connection.java:491)
at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:346)
at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:548)
at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:613)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307)
at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:505)
at org.apache.catalina.startup.Catalina.start(Catalina.java:776)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
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:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:218)
Can anyone help me?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Tomcat and MySQL

2003-07-31 Thread Scott Stewart
Look closely at your URL - it is malformed.

it should read:
connectionURL="jdbc:mysql://localhost/authority?user=leeson&password="

Thanks,

Scott Stewart

-Original Message-
From: engp0510 [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 11:48 AM
To: [EMAIL PROTECTED]
Subject: Tomcat and MySQL


Hi,
 I am using Tomcat 4.0 and MySQL 4.0.14 on WIn2K Professional.
In Server.XML of Tomcat, I use:

 

In MySQL, I set all user must access database with password and grant user
'leeson' with all privileges. I can use leeson and password to log into
MySQL. But when I start tomcat-standalone, there is always  :

Catalina.start: LifecycleException:  Exception opening database connection:
java.sql.SQLException: Invalid authorizatio
n specification: Access denied for user: 'leeson;[EMAIL PROTECTED]' (Using
password: NO)
LifecycleException:  Exception opening database connection:
java.sql.SQLException: Invalid authorization specification:
 Access denied for user: 'leeson;[EMAIL PROTECTED]' (Using password: NO)
at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:615)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307)
at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:505)
at org.apache.catalina.startup.Catalina.start(Catalina.java:776)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
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:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:218)
- Root Cause -
java.sql.SQLException: Invalid authorization specification: Access denied
for user: 'leeson;[EMAIL PROTECTED]' (Using p
assword: NO)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:659)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1562)
at com.mysql.jdbc.Connection.(Connection.java:491)
at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:346)
at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:548)
at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:613)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307)
at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:505)
at org.apache.catalina.startup.Catalina.start(Catalina.java:776)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
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:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:218)

Can anyone help me?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]