Does JBoss for Linux need to be configured differently than JBoss for Windows for 
SQLException handling?

Here is my situation: I am creating a Struts 1.1 based application that runs fine 
under Tomcat 5 and JBoss 3.2.5 on Windows. During login, I am validating the user 
against their PostgreSQL database login. If they enter a bad username/password, 
PostgreSQL generates an exception. On Windows the following code works:

                catch (SQLException e)
                {
                        log.error("Error in validating user.");
                        log.error("\tSQL statement = " + sQuery);
                        log.error("\terror code = " + e.getErrorCode());
                        log.error("\tstate = " + e.getSQLState());
                        if (e.getSQLState().equals("08004"))
                        {
                                // have a password/userid error, return null user
                        }

the 'state' is '08004' on userid/password errors.

I packaged up my exploded war directory on Windows and moved it over to Linux and 
unzipped it into jboss-3.2.5/servers/default/deploy -- same location as on Windows. 
However when I run the same code on Windows and enter in an invalid user id/passowrd 
combination, when the exception is thrown and caught and my code is run, the 'state' 
returned is NULL.

If a proper userid/password are entered they are logged into the system and everything 
runs fine.

Thanks in advance for any corrections or suggestions.

Brian


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3847819#3847819

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3847819


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to