You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ola Tuvesson <ol...@mikrogroove.com> on 2002/10/06 12:01:04 UTC

JDBC Driver

Hi all...

I want a sevlet I'm trying to install to use a JDBC driver (JTDS) to
authenticate users against a database (SQL). However, when I change the ini
files for the servlet to use the JDBC authentication method it throws an
error. Setting it to use null authentication (no authentication) everything
seems to work ok and if I run the servlet as a standalone application
(outside Tomcat) the JDBC authentication works just fine. Being a
Java/Tomcat newbie I find it pretty hard (impossible) to decode what these
error messages mean. In the ini files for the servlet the JDBC driver is
specified like this:

	# JDBC Driver Class
	jdbc.Class=com.internetcds.jdbc.tds.Driver

	# JDBC URL
	jdbc.DBUrl=jdbc:freetds:sqlserver://localhost:36874/TestDB

And line 44 in TunnelServlet.java reads:

	 _chatServer = (ChatServer)constructor.newInstance(new
bject[]{ getServletContext() });

I've tried putting the JDBC JAR in both the extension folder for the JDK and
in the servlet's lib folder but no luck :( Any hints greatly appreciated!

This is the error message I get (in stderr.log):

Created catalinaLoader in: C:\Tomcat\server\lib
06-Oct-2002 10:42:13 org.apache.commons.modeler.Registry loadRegistry
INFO: Loading registry information
06-Oct-2002 10:42:13 org.apache.commons.modeler.Registry getRegistry
INFO: Creating new Registry instance
06-Oct-2002 10:42:14 org.apache.commons.modeler.Registry getServer
INFO: Creating MBeanServer
06-Oct-2002 10:42:15 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on port 8080
java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at
com.lyrisoft.chat.server.remote.TunnelServlet.init(TunnelServlet.java:44)
	at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:92
4)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:813)
	at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3341)
	at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3534)
	at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8
21)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
	at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j
ava:257)
	at org.apache.catalina.core.StandardHost.install(StandardHost.java:772)
	at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:569
)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:411)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:879)
	at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:368)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:166)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
	at org.apache.catalina.core.StandardService.start(StandardService.java:497)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
	at
org.apache.catalina.startup.CatalinaService.start(CatalinaService.java:271)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at
org.apache.catalina.startup.BootstrapService.start(BootstrapService.java:245
)
	at
org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:307)
Caused by: java.lang.NullPointerException
	at com.lyrisoft.chat.server.remote.ChatServer.log(ChatServer.java:226)
	at com.lyrisoft.chat.server.remote.auth.jdbc.Jdbc.<init>(Jdbc.java:51)
	at
com.lyrisoft.chat.server.remote.auth.jdbc.JdbcAuthenticator.<init>(JdbcAuthe
nticator.java:32)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at java.lang.Class.newInstance0(Unknown Source)
	at java.lang.Class.newInstance(Unknown Source)
	at com.lyrisoft.chat.server.remote.ChatServer.<init>(ChatServer.java:99)
	at com.lyrisoft.chat.server.remote.ChatServer.<init>(ChatServer.java:134)
	... 32 more
Oct 06 10:42:21 CommandProcessorRemote: initting the rclient command
processor
Oct 06 10:42:21 CommandProcessorRemote: initting the quit command processor
Oct 06 10:42:21 CommandProcessorRemote: initting the kill command processor
Oct 06 10:42:21 CommandProcessorRemote: initting the unignore command
processor
Oct 06 10:42:21 CommandProcessorRemote: initting the users command processor
Oct 06 10:42:21 CommandProcessorRemote: initting the rooms command processor
Oct 06 10:42:21 CommandProcessorRemote: initting the signon command
processor
Oct 06 10:42:21 CommandProcessorRemote: initting the bping command processor
Oct 06 10:42:21 CommandProcessorRemote: initting the ignore command
processor
Oct 06 10:42:21 CommandProcessorRemote: initting the version command
processor
Oct 06 10:42:21 CommandProcessorRemote: initting the sayroom command
processor
Oct 06 10:42:21 CommandProcessorRemote: initting the pong command processor
Oct 06 10:42:21 CommandProcessorRemote: initting the mesg command processor
Oct 06 10:42:21 CommandProcessorRemote: initting the shutdown command
processor
Oct 06 10:42:21 CommandProcessorRemote: initting the msg command processor
Oct 06 10:42:21 CommandProcessorRemote: initting the join command processor
Oct 06 10:42:21 CommandProcessorRemote: initting the ping command processor
Oct 06 10:42:21 CommandProcessorRemote: initting the whois command processor
Oct 06 10:42:21 CommandProcessorRemote: initting the who command processor
Oct 06 10:42:21 CommandProcessorRemote: initting the leave command processor
Oct 06 10:42:21 CommandProcessorRemote: initting the hello command processor
Oct 06 10:42:21 CommandProcessorRemote: initting the help command processor
Oct 06 10:42:21 CommandProcessorRemote: initting the op command processor
Oct 06 10:42:21 CommandProcessorRemote: initting the kick command processor
Oct 06 10:42:21 CommandProcessorRemote: initting the stats command processor
Oct 06 10:42:21 CommandProcessorRemote: initting the me command processor
06-Oct-2002 10:42:21 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 8080
06-Oct-2002 10:42:21 org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on tcp port 8009
06-Oct-2002 10:42:21 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/50  config=C:\Tomcat\conf\jk2.properties



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>