tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 29895] New: - context.xml isn't read properly by Manager application.
Date Fri, 02 Jul 2004 23:08:14 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29895>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29895

context.xml isn't read properly by Manager application.

           Summary: context.xml isn't read properly by Manager application.
           Product: Tomcat 5
           Version: 5.0.25
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: Webapps:Administration
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: ivj@comcast.net


I was trying to deploy an application using Manager from local file system, 
onto local server.  Manager has two options:  load by specifing XML file, or 
by specifing web directory or war.

You can see my configuration below, but basically, deploying by specifying the 
folder does not read META-INF/context.xml properly.  It read the <context 
path="/ablogic"> value, but it doesn't read the <Resource stuff.  

So, if I deploy by specifying XML file (and specifying <context docBas="">), 
everything works fine.  However, if I use a folder, I get the following:

Error message: Cannot create JDBC driver of class '' for connect URL 'null'

org.apache.commons.dbcp.BasicDataSource.createDataSource
(BasicDataSource.java:750)

org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518)

org.ablogic.db.Manager.getConnection(Manager.java:41)

org.ablogic.db.Manager.testQuery(Manager.java:85)

org.apache.jsp.init._2_jsp._jspService(_2_jsp.java:78)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)

javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)

javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:237)

org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:157)

com.jspbook.GZIPFilter.doFilter(GZIPFilter.java:37)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:186)

org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:157)

org.ablogic.web.CacheFilter.doFilter(CacheFilter.java:130)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:186)

org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:157)

org.ablogic.web.IPBlockFilter.doFilter(IPBlockFilter.java:135)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:186)

org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:157)

org.ablogic.web.TraceFilter.doFilter(TraceFilter.java:69)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:186)

org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:157)

org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:214)

org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:104)

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

org.apache.catalina.core.StandardContextValve.invokeInternal
(StandardContextValve.java:198)

org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:152)

org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:104)

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)

org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:104)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)

org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:102)

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:109)

org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:104)

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)

org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793)

org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnecti
on(Http11Protocol.java:702)

org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571)

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:644)

java.lang.Thread.run(Unknown Source)



-------- C A U S E ----------

Error message: No suitable driver

java.sql.DriverManager.getDriver(Unknown Source)

org.apache.commons.dbcp.BasicDataSource.createDataSource
(BasicDataSource.java:743)

org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518)

org.ablogic.db.Manager.getConnection(Manager.java:41)

org.ablogic.db.Manager.testQuery(Manager.java:85)

org.apache.jsp.init._2_jsp._jspService(_2_jsp.java:78)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)

javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)

javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:237)

org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:157)

com.jspbook.GZIPFilter.doFilter(GZIPFilter.java:37)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:186)

org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:157)

org.ablogic.web.CacheFilter.doFilter(CacheFilter.java:130)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:186)

org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:157)

org.ablogic.web.IPBlockFilter.doFilter(IPBlockFilter.java:135)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:186)

org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:157)

org.ablogic.web.TraceFilter.doFilter(TraceFilter.java:69)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:186)

org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:157)

org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:214)

org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:104)

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

org.apache.catalina.core.StandardContextValve.invokeInternal
(StandardContextValve.java:198)

org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:152)

org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:104)

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)

org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:104)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)

org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:102)

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:109)

org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:104)

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)

org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793)

org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnecti
on(Http11Protocol.java:702)

org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571)

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:644)

java.lang.Thread.run(Unknown Source)



Here's my configuration:

META-INF/context.xml:

<?xml version="1.0" encoding="UTF-8" ?> 

<Context path="/ablogic" docBase="C:\Documents and Settings\SysOp\My 
Documents\AB LOGIC\Eclipse Workspace\abLogic\web" debug="9" reloadable="true">

	<Resource name="jdbc/ablogic" auth="Container" 
type="javax.sql.DataSource"/>
	
    <ResourceParams name="jdbc/ablogic">
		<!-- Max pool connections -->
		<parameter><name>maxActive</name><value>5</value></parameter>
		<!-- Max idle connections -->
		<parameter><name>maxIdle</name><value>5</value></parameter>
		<!-- Username -->
		<parameter><name>username</name><value>ivan</value></parameter>
		<!-- Password -->
	
	<parameter><name>password</name><value>kittiesrcute</value></parameter>
		<!--DB Driver -->
	
	<parameter><name>driverClassName</name><value>com.mysql.jdbc.Driver</va
lue></parameter>
		<!--DB URL -->
	    
<parameter><name>url</name><value>jdbc:mysql://192.168.0.1:3306/school?
autoReconnect=true</value></parameter>
	</ResourceParams>
	
</Context>


And here's the relevant part of my WEB-INF/web.xml file:

	<resource-ref>
		<description>DB Connection</description>
		<res-ref-name>jdbc/ablogic</res-ref-name>
		<res-type>javax.sql.DataSource</res-type>
		<res-auth>Container</res-auth>
	</resource-ref>


So it took me a LOT of time to get it to work, but I finally did, and I 
thought I'd let you know about the problems.

Also, one thing is bugging me - how can you deploy onto a SPECIFIC host.  
Right now I have only one host, and it deploys onto my localhost.  But in the 
future, I'll have many hosts, so how can I specify a certain host to deploy to?

Thanks guys!

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message