I've seen a couple of other people with this problem, but alas, no one who had the solution that I needed. Anyhoo, same old same old...
I'm trying to use a JDBC Realm to authenticate. If I use an incorrect login, I get the correct error page so I have reason to think the database is talking. If I use a correct login, I get a 403 Error - Access to the requested resource has been denied
The data set is from a working application, and I've double (and triple) checked that the table names and the field names match what's in my server.xml. Here are the relevant parts of server.xml [sanitized for your enjoyment]
Here are the interesting parts in the application's web.xml..
Based on these, I haven't the slightest idea what might be wrong. As usual, there are no useful log information. But just cause I can't see anything of value, doesn't mean someone else might not. Here's a selection from the access_log:
There is nothing but the standard startup messages in the Catalina log.
Thanks for the tips if'n ya'll have any. I'm off to press pins into my voodoo doll shaped liked my computer.
[ January 10, 2008: Message edited by: Davin Atkins ] [ January 11, 2008: Message edited by: Davin Atkins ]
Thought a little update might be in order in case anyone else has a similar problem down the road and wants to see how I (hopefully!) worked my way through the issue.
Basically, I was trying to move my development environment over to my new computer. After getting really frustrated, I decided "screw it, let's use the old system." Then I thought, "the old system sucks, let's see how much of the new system I can use at the same time."
So first thing I did was alter my old system's server.xml to allow external connections. Logged in from my new computer and everything was spiffy. So what next? I decided to see if I could hit the old computer's SQL Server with the new computer's SQL Manager. After some fiddling, I was able to. Rock on.
What next? Well, let's set up the new computer's Tomcat server to hit the old computer's database server. A little more fiddling and I've managed to recreate the bug. And that's where I'm at right now.
I figure this means that the database isn't the problem. Eventually I could try to hit the new computer's SQL Server from the old computer's Tomcat server, but for now I'm happy giving up looking for the problem from that end. So I figure either my web.xml is the culprit - or, of course, something else. Weee!
Alright peeps, thought I'd let you all know that I fixed it, and I know what the problem was. First problem - and this one is a doozy - is the horrible way that my new Vista box doesn't let you know if you can't save files to a directory. So basically I've been screwing around with this blasted configuration for 2 days straight because nothing I did was actually being saved.
This is, of course, a totally awesome thing to figure out after all of this time. I also had a couple of problems with my server.xml and web.xml - SQL Server drivers names and the like. So I can find this stupid problem again, when I run into it 2 years from now - here is my final server.xml and web.xml - at least the important parts.
If you're paying attention, you'll notice that we're talking about maybe an 8 character difference in what I posted earlier. 8 characters that I actually figured out 10 minutes after my post, and then the next 10 hours figuring it out over and over again.
So, my tip? When working in Vista, check to make sure that a save command actually saves in the directory you are saving to. Also, when double checking your xml files, remember that browsers default to caching that kind of stuff too.
I'm off to find a stiff drink.
Oh yeah, I hate it when other people forget to post this stuff....
Tomcat 5.5.25 MS SQL Server Express 2005 Windows Vista Ultimate
Did I leave anything out for good search data? Ehh, probably. [ January 11, 2008: Message edited by: Davin Atkins ]
Wow myself... when you predict needing this information 2 years later, you sure hit it on the head.
A quick note for the next time you need this... make sure SQL Server is set up for SQL authentication in addition to Windows authentication. and try and remember that you sanitized the user name, password and table names. Otherwise, good job self!
permaculture is largely about replacing oil with people. And one tiny ad: