Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > JDBCRealm

Thread Tools


Wojtek Kusch
Posts: n/a

I am a newbie in JSP. I am defining a JDBCRealm for my web application
in the server.xml:

<Realm className="org.apache.catalina.realm.JDBCRealm"
userTable="USER" userNameCol="username"
userRoleTable="USER_ROLE" roleNameCol="role" />

If I am starting Tomcat I get followwing message:

INFO: Initializing Coyote HTTP/1.1 on http-8080
18.12.2006 22:41:27 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 937 ms
18.12.2006 22:41:27 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
18.12.2006 22:41:27 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.9
18.12.2006 22:41:27 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
18.12.2006 22:41:28 org.apache.catalina.realm.JAASRealm setContainer
INFO: Set JAAS app name Catalina
18.12.2006 22:41:30 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
18.12.2006 22:41:30 org.apache.catalina.startup.Catalina start
INFO: Server startup in 2875 ms

If I start my JSP-Site (Login.jsp) I get an error:

org.apache.catalina.realm.JAASRealm authenticate
SCHWERWIEGEND: Unexpected error
java.lang.SecurityException: Login configuration can't be found.
at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native

Why JAASRealm is starting?????
Thanks for an answer!

My whole Server.xml:
<Server port="8005" shutdown="SHUTDOWN">

<!-- Comment these entries out to disable JMX MBeans support used for the
administration web application -->
className="org.apache.catalina.mbeans.ServerLifecy cleListener" />
className="org.apache.catalina.mbeans.GlobalResour cesLifecycleListener" />
className="org.apache.catalina.storeconfig.StoreCo nfigLifecycleListener"/>

<!-- Global JNDI resources -->

<!-- Test entry for demonstration purposes -->
<Environment name="simpleValue" type="java.lang.Integer" value="30"/>

<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users -->
<Resource name="UserDatabase" auth="Container"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatab aseFactory"
pathname="conf/tomcat-users.xml" />


<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" (and therefore the web applications visible
within that Container). Normally, that Container is an "Engine",
but this is not required.

Note: A "Service" is not itself a "Container", so you may not
define subcomponents such as "Valves" or "Loggers" at this level.

<!-- Define the Tomcat Stand-Alone Service -->
<Service name="Catalina">

<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector port="8080" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" />
<!-- Note : To disable connection timeouts, set connectionTimeout value
to 0 -->

<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009"
enableLookups="false" redirectPort="8443"
protocol="AJP/1.3" />

<!-- Define the top level container in our container hierarchy -->
<Engine name="Catalina" defaultHost="localhost">

<Realm className="org.apache.catalina.realm.JDBCRealm"
userTable="USER" userNameCol="username"
userRoleTable="USER_ROLE" roleNameCol="role" />

<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">





Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
implementing remember password in tomcat server jdbcrealm Java 1 06-20-2005 02:55 PM
jdbcrealm MYSQL autoReconnect problem PC Java 0 07-09-2004 03:45 PM