Turn debugging up to 99.

-Tim

Ostad, James wrote:
I noticed in the log file that after authentication of admin user,
another line indicates that the user admin does not have the role admin.

I am checking database to make sure that the role and user have
relationship.
any suggestion?

thanks,

james

-----Original Message-----
From: Ostad, James Sent: Wednesday, December 03, 2003 2:51 PM
To: Tomcat Users List
Subject: RE: JDBCRealm problem



Thank you. What a educational ride.

I did the compilation of the jdbcrealm.java
Now I am getting the http status 403 !!!

again, without this realm setup in server.xml, by just using the DD
file, I don't have any restriction problem.

any suggestion?

thanks,

James

-----Original Message-----
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 12:13 PM
To: Tomcat Users List
Subject: Re: JDBCRealm problem


It was a lazy way to set environment variables in unix.


Here is a simple way in ant: (just the relevant snippets, not a lesson
in ant)

...
<path id="classpath">
   <pathelement location="${catalina.home}/common/classes"/>
   <fileset dir="${catalina.home}/common/lib">
     <include name="**/*.jar"/>
   </fileset>
   <pathelement location="${catalina.home}/server/classes"/>
   <fileset dir="${catalina.home}/server/lib">
     <include name="**/*.jar"/>
   </fileset>
</path>
...

   <!-- Assuming java file is in a dir called src -->
   <target name="compile">
     <javac srcdir="src" deprecation="true" debug="true"
           destdir="${catalina.home}/server/classes">
          <classpath refid="classpath"/>
     </javac>
   </target>
...

-Tim

Ostad, James wrote:


Tim,
I am afraid that I am not familiar with the first line, CP=...
is that a copy command on unix?

thanks
james


-----Original Message----- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 11:20 AM To: Tomcat Users List Subject: Re: JDBCRealm problem


Oops, wrong file:



http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-4.0/catalina/src/share/


org/apache/catalina/realm/JDBCRealm.java

-Tim

Tim Funk wrote:




http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-4.0/catalina/src/share/


org/apache/catalina/realm/JNDIRealm.java


The easiest way to compile in this case:
CP=*All jars in $CATALINA/common/lib,All jars in $CATALINA/server/lib*
javac -classpath $CP -d $CATALINA_HOME/server/classes JNDIRealm.java

-Tim

Ostad, James wrote:



I am new in tomcat.
I am looking in tomcat site for source file for JDBCRealm.
Is this part of the tomcat source files? or it is separate?

thanks

James

-----Original Message-----
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 10:20 AM
To: Tomcat Users List
Subject: Re: JDBCRealm problem


If you have a NPE, it might being thrown by the Realm. This can

happen



when there is a null role or similar. This has since been patched.

You



can
test it by getting the latest JDBCRealm from source, compiling it and


placing it
in the appropriate nested dir in server/classes. (Which has a higher
precedence than the lib dir)

-Tim

Ostad, James wrote:




One more thing,
when I commented out the realm section in server.xml, the program

does



work with the default realm.

James

-----Original Message-----
From: Ostad, James Sent: Wednesday, December 03, 2003 10:08 AM
To: Tomcat Users List
Subject: RE: JDBCRealm problem


I just noticed this errors in the following files under tomcat log directory:

catalina_log.2003-12-03.txt

2003-12-03 09:59:06 CoyoteAdapter An exception or error occurred in


the



container during the request processing
java.lang.NullPointerException
  at
org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:478)
  at
org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:394)
  at



org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAut

henticator.java:263)


localhost_log.2003-11-26.txt 2003-12-03 09:58:53 StandardManager[/webdav]: Seeding of random

number



generator has been completed
2003-12-03 09:58:53 StandardManager[/webdav] IOException while

loading



persisted sessions: java.io.EOFException
java.io.EOFException
  at



java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.ja

va:2150)
  at



java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStre

am.java:2619)


Any help would be appreciated thanks,

James


-----Original Message----- From: Ostad, James Sent: Wednesday, December 03, 2003 9:51 AM To: Tomcat Users List Subject: RE: JDBCRealm problem


Hi, Thanks for the info. Apparently, the database was not set correctly. After correcting the previous problem, I am able to login. The log


shows



the correct authentication with no errors.
Yet, I not getting anything after the login. the web page is clear,

in



stead of taking me to the next page, by design.
the top url address is like:

http://localhost/login/j_security_check

any help, suggestion, or comment would be nice.

Thanks,
James

-----Original Message-----
From: Jon Wingfield [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 27, 2003 5:01 AM
To: Tomcat Users List
Subject: Re: JDBCRealm problem


The JDBCRealm does two things: 1) Authenticates the user (by checking password) 2) Authorizes the user (by checking roles)

The logs would seem to imply the JDBC driver is blowing up creating


the



prepared statement in the second step (ie reading from the roles


table).



I think Tim is right - he usually is - that there is a config

problem



with the db or the connection to the db.

A quick google later:
http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B313181

HTH,

Jon

Ostad, James wrote:




The line above the line you mentioned in the error log indicates

that



the connection was established at one point:

2003-11-26 11:53:19 JDBCRealm[localhost]: Username admin

successfully



authenticated
2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing
authentication

So, I don't think that the parameters are wrong, neither the

database



setup. The web application functions with form base authentication
without usage of realm.
It is my next step to implement the realm, which I having problem.

but, I will double check my settings and configuration to make sure


that




I didn't miss anything.

thanks,

James

-----Original Message-----
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 26, 2003 4:00 PM
To: Tomcat Users List
Subject: Re: JDBCRealm problem


The problem is this:


2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing
authentication
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for


JDBC]Can't




start a cloned connection while in manual transaction mode.

Since I don't use SQL server and Java, I can't be of more help, but

my



guess is
- Database setup
- Driver parameter missing

-Tim

Ostad, James wrote:





Hi everyone,
Hope everyone will have a great TG Day.

Problem: I am not able to login successfully. It keeps failing.

Structure: using JDBCRealm + form authentication

database property: match exactly as explained in tomcat

documentation



for setting up JDBCRealm

I am including three things:

1-server.xml part for realm setup
2-web.xml of the web apps
3-errorlog file is the error log I get when I attempt to use


jdbcrealm.





---------------------------------------------------------------------



To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:

[EMAIL PROTECTED]




<---In (14)





Out---> (3)






---------------------------------------------------------------------



To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:

[EMAIL PROTECTED]







---------------------------------------------------------------------


To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



<---In (14)




Out---> (3)






---------------------------------------------------------------------



To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



<---In (14)




Out---> (3)






---------------------------------------------------------------------



To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



<---In (14)




Out---> (3)






---------------------------------------------------------------------



To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



<---In (14)




Out---> (3)




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



<---In (14)




Out---> (3)




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



<---In (14)




Out---> (3)




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



<---In (14)




Out---> (3)




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to