Ralph Einfeldt wrote:
> According to
> http://jakarta.apache.org/tomcat/tomcat-4.0-doc/jndi-resources-howto.htm
> l
> it's <ResourceParams instead of <Resource-params.
>
Thanks Ralph, I tried that, and things are getting (slightly) better!
It's still not working tho'... here's the log now:
2002-06-19 12:27:09 NamingContextListener[/Standalone/localhost/drs]:
Creating JNDI naming context
2002-06-19 12:27:09 NamingContextListener[/Standalone/localhost/drs]:
Resource parameters for jdbc/RadiationDB =
ResourceParams[name=jdbc/RadiationDB, parameters={user=me,
factory=org.apache.commons.dbcp.BasicDataSourceFactory,
url=jdbc:mysql://localhost/radiation, password=my-password, maxWait=100,
maxActive=100, driverClassName=org.gjt.mm.mysql.Driver, maxIdle=30000}]
2002-06-19 12:27:09 NamingContextListener[/Standalone/localhost/drs]:
Adding resource ref jdbc/RadiationDB
2002-06-19 12:27:09 NamingContextListener[/Standalone/localhost/drs]:
ResourceRef[className=javax.sql.DataSource,factoryClassLocation=null,factoryClassName=org.apache.naming.factory.ResourceFactory,{type=scope,content=Shareable},{type=auth,content=Container},{type=user,content=me},{type=factory,content=org.apache.commons.dbcp.BasicDataSourceFactory},{type=url,content=jdbc:mysql://localhost/radiation},{type=password,content=my-password},{type=maxWait,content=100},{type=maxActive,content=100},{type=driverClassName,content=org.gjt.mm.mysql.Driver},{type=maxIdle,content=30000}]
2002-06-19 12:27:09 NamingContextListener[/Standalone/localhost/drs]:
Resource parameters for UserTransaction = null
<snip...>
2002-06-19 12:27:56 static: Error!
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:380)
at
org.apache.commons.dbcp.BasicDataSource.createDataSource(Unknown Source)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(Unknown Source)
at com.terma.martin.drs.StaticPage.handleRequest(Unknown Source)
at
org.apache.velocity.servlet.VelocityServlet.doRequest(VelocityServlet.java:331)
at <etc. etc.>
Obviously, it can now find and process the parameters (thanks Ralph!)
but something is causing createDataSource() to barf.
Any ideas, anyone?
Martin
PS: Having a DTD for server.xml - even if it changed for each release -
would help idiots like me, who can't read!
--
To unsubscribe, e-mail: <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>
|