tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin HaleBoyes <>
Subject -security flag and (oracle) JDBC realms
Date Fri, 18 May 2001 19:58:04 GMT
I've downloaded the 4.0b5 release and noticed the warning/suggestion to start
running with the -security flag.  So, I did just that.  I also uncommented the
Oracle-based JDBCRealm <Realm> element (and commented out the Memory based
realm).  Tomcat wouldn't start since it couldn't find the driver so I made
a symbolic link (running on RedHat Linux 6.2) in the
 $CATALINA_HOME/common/lib directory to the classes111.jar file from the
Oracle distribution.  Is that where the Oracle JDBC driver should be put?  I
also tried it in $CATALINA_HOME/lib but that didn't work.

Once the driver was found I had to make a change to the Realm entry itself.
It has
so I changed the server, SID, username, and password to suite my installation
but Tomcat complained with 
       java.sql.SQLException: invalid arguments in call
After looking at the source code it seams that it needs the
connectionUser and connectionPassword attributes to be defined (it puts them in
the Properties instance to pass to the connect() call from the open() method).
So I removed the
portion of the connectionURL attribute and added the required two.

Things were shaping as Tomcat can now find the JDBC driver and the Oracle
driver isn't complaining about the connection information.  But now I'm getting
another error and this is where
my inexperience with Java security model hinders me.  I'm getting the following
exception when Tomcat starts: access denied (
localhost resolve)
	at java.lang.SecurityManager.checkPermission(
	at java.lang.SecurityManager.checkConnect(
	at oracle.jdbc.ttc7.TTC7Protocol.connect(
	at oracle.jdbc.ttc7.TTC7Protocol.logon(
	at oracle.jdbc.driver.OracleConnection.<init>(
	at oracle.jdbc.driver.OracleDriver.getConnectionInstance(
	at oracle.jdbc.driver.OracleDriver.connect(
	at org.apache.catalina.realm.JDBCRealm.start(
	at org.apache.catalina.core.ContainerBase.start(
	at org.apache.catalina.core.StandardEngine.start(
	at org.apache.catalina.core.StandardService.start(
	at org.apache.catalina.core.StandardServer.start(
	at org.apache.catalina.startup.Catalina.start(
	at org.apache.catalina.startup.Catalina.execute(
	at org.apache.catalina.startup.Catalina.process(
	at java.lang.reflect.Method.invoke(Native Method)
	at org.apache.catalina.startup.Bootstrap.main(

So I had a look at the catalina.policy file but I'm really not sure what I need
to add.  It seems that a DNS resolution is attempted but the security system
denided it.  I found the entry:

// These permissions apply to the servlet API classes
// and those that are shared across all class loaders
// located in the "common" directory
grant codeBase "file:${catalina.home}/common/-" {

I thought I could add a similar entry like:

grant codeBase "file:${catalina.home}/common/lib/-" {

but that didn't work.

I would like to start running with the -security flag but this will obviously
stop me in my tracks.

Any help would be appreciated,

Do You Yahoo!?
Get your free address at
or your free address at

View raw message