aspose file tools*
The moose likes Tomcat and the fly likes JDBC connections Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "JDBC connections" Watch "JDBC connections" New topic
Author

JDBC connections

MP
Greenhorn

Joined: Sep 22, 2002
Posts: 6
I have installed a small application under tomcat4.1.10 & java & redhat 7.3
It is giving the following connection error when i run tomcat4 run in a terminal window :"java.sql.SQLException: General error: Access denied for user: '@localhost.locald
omain' to database 'b2bdata'"
Where to configure the default userid for the login of the application into the b2bdata ( mysql data base)
===============
[root@localhost root]# tomcat4 run
Using CATALINA_BASE: /var/tomcat4
Using CATALINA_HOME: /var/tomcat4
Using CATALINA_TMPDIR: /var/tomcat4/temp
Using JAVA_HOME: /usr/java/jdk1.3.1_04
[INFO] Registry - -Loading registry information
[INFO] Registry - -Creating new Registry instance
[INFO] Registry - -Creating MBeanServer
[INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 on port 8080
Starting service Tomcat-Standalone
Apache Tomcat/4.1
[INFO] Http11Protocol - -Starting Coyote HTTP/1.1 on port 8080
[INFO] ChannelSocket - -JK2: ajp13 listening on tcp port 8009
[INFO] JkMain - -Jk running ID=0 time=16/66 config=/var/tomcat4/conf/jk2.proper
ties
java.sql.SQLException: General error: Access denied for user: '@localhost.locald
omain' to database 'b2bdata'
at com.mysql.jdbc.MysqlIO.sendCommand(Unknown Source)
at com.mysql.jdbc.Connection.connectionInit(Unknown Source)
at com.mysql.jdbc.jdbc2.Connection.connectionInit(Unknown Source)
at com.mysql.jdbc.Driver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:194)
at org.apache.jsp.b2bLoginCheck_jsp._jspService(b2bLoginCheck_jsp.java:5
9)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:202)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
89)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:260)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:
2397)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatche
rValve.java:170)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.inv a:480)
at org.apache.catalina.core.ContainerBase.invoke
at org.apache.coyote.tomcat4.CoyoteAdapter.servi
at org.apache.coyote.http11.Http11Processor.proc )
at org.apache.coyote.http11.Http11Protocol$Http1 ssConnection(Http11Protocol.java)
at org.apache.tomcat.util.net.TcpWorkerThread.ru :508)
at org.apache.tomcat.util.threads.ThreadPool$Con ool.java:533)
at java.lang.Thread.run(Thread.java:479)
===============
Pauline McNamara
Sheriff

Joined: Jan 19, 2001
Posts: 4012
    
    6
Welcome to JavaRanch "MP".
Could you please change your display name to comply with JavaRanch's naming policy? (It's our only rule.) You can make the change quickly right here. Thanks! Hope you visit the ranch often.

Pauline
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBC connections