472,354 Members | 2,245 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,354 software developers and data experts.

Tomcat+MySQL. Intermitent DbcpException: Server configuration denies access to data source

Hi!

I'm not sure if this is the most adequate mySQL list for this post. If not,
please indicat me which one I should use...

I'm using Tomcat 4.1.24 with Apache 2 and MySQL 4.0.13. I have the mysql-
connector-java-2.0.14-bin.jar in commons/lib.
The application runs normally, and usually about once or twice a day I get
this exception org.apache.commons.dbcp.DbcpException:
java.sql.SQLException: Server configuration denies access to data source.
Once the exception occurs, it happens for every request and Tomcat needs
restarting.

Before getting this exception, I used to run out of connections, and
therefore I added to the server.xml

<parameter>
<name>logAbandoned</name>
<value>true</value>
</parameter>
<parameter>
<name>removeAbandoned</name>
<value>true</value>
</parameter>

I guess it could be related...

I include the exception and my server.xml file.

Any help appreciated.
Monica


2003-08-07 15:55:02 StandardWrapperValve[StructureServlet]: Servlet.service
() for servlet StructureServlet threw exception
org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Server
configuration denies access to data source
at org.apache.commons.dbcp.DriverConnectionFactory.cr eateConnection
(DriverConnectionFactory.java:85)
at org.apache.commons.dbcp.PoolableConnectionFactory. makeObject
(PoolableConnectionFactory.java:184)
at org.apache.commons.pool.impl.GenericObjectPool.bor rowObject
(GenericObjectPool.java)
at org.apache.commons.dbcp.AbandonedObjectPool.borrow Object
(AbandonedObjectPool.java:117)
at org.apache.commons.dbcp.PoolingDataSource.getConne ction
(PoolingDataSource.java:110)
at org.apache.commons.dbcp.BasicDataSource.getConnect ion
(BasicDataSource.java:312)
at com.ah.auk.db.DBUtil.getDBConnection(DBUtil.java:5 4)
at com.ah.auk.db.DB.checkDBCon(DB.java:34)
at com.ah.auk.db.HotelDBReader.getHotelsInGeoEntry
(HotelDBReader.java:64)
at com.ah.auk.delegates.CountyHelper.getHotelsPerCoun ty
(CountyHelper.java:100)
at com.ah.auk.box.CountyListBox.getCounties(CountyLis tBox.java:118)
at com.ah.auk.box.CountyListBox.configure(CountyListB ox.java:63)
at com.ah.auk.core.BoxManager.configureBoxes(BoxManag er.java:41)
at com.ah.auk.structure.StructureServlet.doGet
(StructureServlet.java:74)
at javax.servlet.http.HttpServlet.service(HttpServlet .java)
at javax.servlet.http.HttpServlet.service(HttpServlet .java)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter
(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(Unknown
Source)
at com.ah.auk.context.ContextFilter.doFilter(ContextF ilter.java:158)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter
(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(Unknown
Source)
at org.apache.catalina.core.StandardWrapperValve.invo ke(Unknown
Source)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok
eNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(U nknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unkn own Source)
at org.apache.catalina.core.StandardContextValve.invo ke(Unknown
Source)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok
eNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(U nknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unkn own Source)
at org.apache.catalina.core.StandardContext.invoke(Un known Source)
at org.apache.catalina.core.StandardHostValve.invoke( Unknown Source)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok
eNext(Unknown Source)
at org.apache.catalina.valves.ErrorDispatcherValve.in voke(Unknown
Source)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok
eNext(Unknown Source)
at org.apache.catalina.valves.ErrorReportValve.invoke (Unknown
Source)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok
eNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(U nknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unkn own Source)
at org.apache.catalina.core.StandardEngineValve.invok e(Unknown
Source)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok
eNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(U nknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unkn own Source)
at org.apache.coyote.tomcat4.CoyoteAdapter.service
(CoyoteAdapter.java:223)
at org.apache.jk.server.JkCoyoteHandler.invoke
(JkCoyoteHandler.java:261)
at org.apache.jk.common.HandlerRequest.invoke
(HandlerRequest.java:360)
at org.apache.jk.common.ChannelSocket.invoke(ChannelS ocket.java:604)
at org.apache.jk.common.ChannelSocket.processConnecti on
(ChannelSocket.java:562)
at org.apache.jk.common.SocketConnection.runIt
(ChannelSocket.java:679)
at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run
(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.sql.SQLException: Server configuration denies access to
data source
at com.mysql.jdbc.MysqlIO.init(Unknown Source)
at com.mysql.jdbc.Connection.connectionInit(Unknown Source)
at com.mysql.jdbc.jdbc2.Connection.connectionInit(Unk nown Source)
at com.mysql.jdbc.Driver.connect(Unknown Source)
at org.apache.commons.dbcp.DriverConnectionFactory.cr eateConnection
(DriverConnectionFactory.java:83)
.... 49 more
SERVER.XML:
----------

<Server port="8005" shutdown="SHUTDOWN" debug="0">
<Listener className="org.apache.catalina.mbeans.ServerLifecy cleListener"
debug="0"/>
<Listener
className="org.apache.catalina.mbeans.GlobalResour cesLifecycleListener"
debug="0"/>

<GlobalNamingResources/>

<Service name="Tomcat-Standalone">

<!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
<Connector className="org.apache.coyote.tomcat4.CoyoteConnect or"
port="8009" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="10" debug="0" connectionTimeout="0"
useURIValidationHack="false"

protocolHandlerClassName="org.apache.jk.server.JkC oyoteHandler"/>

<Engine name="Standalone" defaultHost="localhost" debug="0">

<Logger className="org.apache.catalina.logger.FileLogger"
prefix="catalina_log." suffix=".txt"
timestamp="true"/>

<Host name="localhost" debug="0" appBase="webapps"
unpackWARs="true" autoDeploy="false">
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="localhost_log." suffix=".txt"
timestamp="true"/>
<Context path="" docBase="/home/user/auk" debug="0"
reloadable="false" crossContext="false">
<Resource name="jdbc/allukmasterDB"
auth="Container"
type="javax.sql.DataSource"/>

<ResourceParams name="jdbc/allukmasterDB">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFact ory</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>500</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>30</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>10000</value>
</parameter>
<parameter>
<name>username</name>
<value>******</value>
</parameter>
<parameter>
<name>password</name>
<value>*******</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>org.gjt.mm.mysql.Driver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:mysql://localhost:3306/auk?autoReconnect=true</value>
</parameter>
<parameter>
<name>logAbandoned</name>
<value>true</value>
</parameter>
<parameter>
<name>removeAbandoned</name>
<value>true</value>
</parameter>
</ResourceParams>
</Context>

</Host>
</Engine>
</Service>
</Server>


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/my***********...ie.nctu.edu.tw

Jul 19 '05 #1
0 3573

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Shireesha | last post by:
Hi all, I am new to this group and wish clear some doubts regarding tomcat server and database connection pooling (Java language). Our group has developed a application using Tomcat 4.x. We need...
4
by: Subhodini Fernandes | last post by:
A very basic question about Tomcat 3.3.1 configuration - We have an application setup on Tomcat. Daily the service needs to be taken down for backup purpose for 1 hour and we need Tomcat to...
2
by: Steve | last post by:
Hi, I'm trying to design a web server where users can login, initiate long running processes on uploaded files, monitor the progress via a web page and download some results when the process has...
2
by: shanmukhi | last post by:
Hi, I am using tomcat i got a problem with tomcat 5.0.25 as i specified jdk path during installation of tomcat as C:/j2sdk1.4.2_12/jre i tried by specifying path as...
6
by: shaileshkumar | last post by:
iam able to startup & shutdown tomcat server from the bin directory. But when i have copied the same files on to the desktop,iam unable to do so. my operating system is xp. (i have copied...
2
by: gamiravi.d | last post by:
Hi, I have one c++ application to get number of monitors from system. I am calling .exe of c++ application using java api through tomcat server in browser on window vista. right now I have two...
0
by: ntech | last post by:
hello, i have a problem. i am using the tomcat server for java. my problem is that: i want to use the same tomcat server with client authentication having two certificate authorities. i have been...
6
by: Raghunandan24 | last post by:
Hi, Can you tell me how to check if tomcat server is running. Is there a command i can use. Thanks, Raghu
4
by: shivapadma | last post by:
1.I installed apache tomcat. 2.I have the following java servlet import java.io.*; import javax.sevlet.*; import javax.servlet.http.*; public class ser extends HttpServlet {
0
by: Marco Bizzarri | last post by:
On Wed, Sep 3, 2008 at 11:06 AM, jorma kala <jjkk73@gmail.comwrote: localhost is not resolved to 127.0.0.1 on your machine. Try changing it to http://127.0.0.1:8080 Regards Marco
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made but the http to https rule only works for...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. header("Location:".$urlback); Is this the right layout the...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it so the python app could use a http request to get...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.