tags:

views:

182

answers:

1

I get this error

Jun 23, 2009 4:49:10 PM org.apache.catalina.startup.Catalina start INFO: Server 
   startup in 5265 ms 
0 [http-8080-Processor25] ERROR Could not load security-xss-regex.txt file. [at
   app.sparx.navigate.AppNavigationControllerServlet.init(AppNavigationControllerServlet.java:45)] 
   Unable to register any web resource locators (/resources/sparx, /sparx were not found). 
   Please use the SparxResourcesServlet for serving Sparx resources. 
2328 [http-8080-Processor25] ERROR Name jdbc is not bound in this Context [at 
   net.sf.hibernate.util.JDBCExceptionReporter.logExceptions(JDBCExceptionReporter.java:58)] 
2328 [http-8080-Processor25] ERROR net.sf.hibernate.exception.GenericJDBCException: Cannot
   open connection [at app.security.AppLoginAuthenticator.isUserValid(AppLoginAuthenticator.java:89)]
   and this is what I have in my server.xml file    
Resource name="sparx" 
   auth="Container" type="javax.sql.DataSource" 
   driverClassName="com.ibm.db2.jcc.DB2Driver" 
   url="jdbc:db2://192.168.0.131:50000/MAX" 
   username="db2admin" password="!!!!!!!!!"

Anyone know what the exact name of the resource should be

Thanks

A: 

This link might help you. The JNDI name should be "jdbc/sparx".

Looks like you can't open the connection because the file security-xss-regex.txt can't be found.

That stuff doesn't belong in server.xml. (You can't always depend on being able to edit that file, anyway.) The proper place is META-INF/context.xml

Did you declare the resource in your web.xml as well? You must have that, you know.

The JDBC driver JAR has to be in the common/lib for Tomcat 5.x or /lib for Tomcat 6.x.

You're using a very old version of Hibernate - that package name starting with "net.sf.hibernate" is ancient. Time for an upgrade?

If you're still having problems, I'd try swapping in another database to stand in for DB2, just to get the connection working. MySQL, Hypersonic - ANYTHING other than an IBM product. If you get that to work, you'll know that DB2 specific things are the issue.

duffymo
Thanks...the project was a hand me down...that I have to first get up and running and then modify..