tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aynalem, Seblewengel (Trawick)" <Seblewengel.Ayna...@USPTO.GOV>
Subject RE: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
Date Mon, 31 Jul 2006 19:04:58 GMT
Yes I do have SQL JDBC driver in common/lib as sqljdbc.jar and did drop <ResourceLink.../>
from context.xml file.  Another error comes ups as follows:

Jul 31, 2006 3:01:05 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in production environments
was not found on the java.library.path: C:\Java\jdk1.5.0_07\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
Files\Common Files\Roxio Shared\DLLShared;C:\Java\jdk1.5.0_07\bin;%CATALINA_BASE%\bin;C:\Program
Files\Microsoft SQL Server\80\Tools\BINN
Jul 31, 2006 3:01:05 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jul 31, 2006 3:01:05 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1732 ms
Jul 31, 2006 3:01:05 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jul 31, 2006 3:01:05 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
Jul 31, 2006 3:01:05 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jul 31, 2006 3:01:08 PM org.apache.tomcat.util.digester.Digester fatalError
SEVERE: Parse Fatal Error at line 11 column 79: Element type "Resource" must be followed by
either attribute specifications, ">" or "/>".
org.xml.sax.SAXParseException: Element type "Resource" must be followed by either attribute
specifications, ">" or "/>".
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215)
	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386)
	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
	at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1438)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:845)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
	at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)
	at org.apache.catalina.startup.ContextConfig.processContextConfig(ContextConfig.java:781)
	at org.apache.catalina.startup.ContextConfig.contextConfig(ContextConfig.java:721)
	at org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:977)
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:278)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at org.apache.catalina.core.StandardContext.init(StandardContext.java:5130)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:3945)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:904)
	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
	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:585)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Jul 31, 2006 3:01:08 PM org.apache.catalina.startup.ContextConfig processContextConfig
SEVERE: Parse error in default web.xml
org.xml.sax.SAXParseException: Element type "Resource" must be followed by either attribute
specifications, ">" or "/>".
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1269)
	at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)
	at org.apache.catalina.startup.ContextConfig.processContextConfig(ContextConfig.java:781)
	at org.apache.catalina.startup.ContextConfig.contextConfig(ContextConfig.java:721)
	at org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:977)
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:278)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at org.apache.catalina.core.StandardContext.init(StandardContext.java:5130)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:3945)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:904)
	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
	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:585)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Jul 31, 2006 3:01:08 PM org.apache.catalina.startup.ContextConfig processContextConfig
SEVERE: Occurred at line 11 column 79
Jul 31, 2006 3:01:08 PM org.apache.catalina.startup.ContextConfig start
SEVERE: Marking this application unavailable due to previous error(s)
Jul 31, 2006 3:01:08 PM org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
Jul 31, 2006 3:01:08 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/ISOTrackingTest] startup failed due to previous errors
Jul 31, 2006 3:01:09 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jul 31, 2006 3:01:10 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Jul 31, 2006 3:01:10 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/70  config=null
Jul 31, 2006 3:01:10 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Jul 31, 2006 3:01:10 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 5147 ms

-----Original Message-----
From: David Smith [mailto:dns4@cornell.edu]
Sent: Monday, July 31, 2006 2:53 PM
To: Tomcat Users List
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'


Is your SQL JDBC driver in common/lib?  It has to be there for tomcat to 
set it up as a resource.

Also drop the <ResourceLink.../> tag from your context definition.  Not 
needed when the resource is defined inside the <Context...> tag and may 
confuse tomcat.

--David

Aynalem, Seblewengel (Trawick) wrote:

>Hi there:
>I am using tomcat 5.5.17 and SQL Server 2000 database with SQL Server 2005 JDBC Driver.
 OS is Windows XP professional.  I have configured web.xml in WEB-INF directory and context.xml
in META-INF directory of my application. Both are attached below with this email. I have a
login.jsp page that asks for username and password... and when submit is hit, it gives the
following error.
>org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class ''
for connect URL 'null' 
>I tried to google and tried the suggestion given but any of them doesn't seem to work.
Is there anything wrong with my configuration? PLEASE HELP...it is higly appreciated. If something
is not clear, please get back to me.  Thank you so much.
>context.xml file looks like this...
><?xml version="1.0" encoding="UTF-8"?>
><Context debug="0" displayName="ISOTracking" docBase="C:\Java\TomcatTestServer\apache-tomcat-5.5.17\webapps\ISOTrackingTest"
path="/ISOTracking" reloadable="true">
>  	<Logger className="org.apache.catalina.logger.FileLogger" 
>	prefix="ISOTRackingTest_Log." suffix=".txt" timestamp="true"/>
>	<!-- Define a database connection pool for SQL SERVER 2000 -->
>  	<Resource name="jdbc/sqlserver" auth="Container" factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
type="javax.sql.DataSource" driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
>	url="jdbc:sqlserver://localhost:1433" username="xxx" password="xxx"maxActive="100" maxIdle="30"
maxWait="10000" removeAbandoned="true" removeAbandonedTimeout="60" logAbandoned="true"/>
>	<ResourceLink name="jdbc/sqlserver" type="javax.sql.DataSource" global="jdbc/sqlserver"/>
></Context>
>web.xml looks like this...
><?xml version="1.0" encoding="ISO-8859-1"?>
><!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
><web-app>
>  <display-name>ISOTracking</display-name>
>  <description>
>     Welcome TO ISO Tracking Application
>  </description>
><!-- JSPC servlet mappings start -->
>    <servlet>
>        <servlet-name>ISOTracking.Login_jsp</servlet-name>
>        <servlet-class>ISOTracking.Login_jsp</servlet-class>
>    </servlet>
>    <servlet-mapping>
>        <servlet-name>ISOTracking.Login_jsp</servlet-name>
>        <url-pattern>/Login.jsp</url-pattern>
>    </servlet-mapping>
>    <session-config>
>     <session-timeout>30</session-timeout>
>    </session-config>
><!-- JSPC servlet mappings end -->
>	<resource-ref>
>		<res-ref-name>jdbc/sqlserver</res-ref-name>
>		<res-type>javax.sql.DataSource</res-type>
>		<res-auth>Container</res-auth>
>	</resource-ref>
></web-app>
>
>
>
>
>---------------------------------------------------------------------
>To start a new topic, e-mail: users@tomcat.apache.org
>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: users-help@tomcat.apache.org
>
>  
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message