Error while authenticating user throught glassfish jdbc realm mysql connection pool problem
posted 12 years ago
-
1 -
-
Number of slices to send:Optional 'thank-you' note:
-
-
I am able to authenticate the user successfully through realm first time when restart the server and deploy the application. But after few minutes when i try to open the webapp in different browser the i'am unable to authenticate the user..
With localhost mysql it works fine but when i try to connect the remote mysql authentication fails after sometime.
I have posted this question in jdbc forum also ... mysql connection pool issue
This is my glassfish-resources.xml
the stack trace of the error is as follows...
I am fed of this error search so many threads but unable to resolve this problem.
With localhost mysql it works fine but when i try to connect the remote mysql authentication fails after sometime.
I have posted this question in jdbc forum also ... mysql connection pool issue
This is my glassfish-resources.xml
the stack trace of the error is as follows...
I am fed of this error search so many threads but unable to resolve this problem.
| B.E IT | SCJP 6.0 98 % |
posted 12 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
The default value for the attribute idle-timeout-in-seconds is 300. The pool may reclaim a any connection that is idle for that duration or longer.
Try adjusting this value to a longer interval and see if that clears the problem you're seeing.
Try adjusting this value to a longer interval and see if that clears the problem you're seeing.
Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
posted 12 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Hi... Michael... sorry for late reply...
i added this field is-connection-validation-required="true" it worked but there is a new exception... not severe or any other... it should be igored or something else...
INFO: RAR5074 : Table based validation detected invalid connection. Querying the table GROUPS failed. Set resource-adapter log-level to FINE for exception stack trace.
INFO: RAR5074 : Table based validation detected invalid connection. Querying the table GROUPS failed. Set resource-adapter log-level to FINE for exception stack trace.
INFO: RAR5074 : Table based validation detected invalid connection. Querying the table GROUPS failed. Set resource-adapter log-level to FINE for exception stack trace.
INFO: RAR5074 : Table based validation detected invalid connection. Querying the table GROUPS failed. Set resource-adapter log-level to FINE for exception stack trace.
INFO: RAR5074 : Table based validation detected invalid connection. Querying the table GROUPS failed. Set resource-adapter log-level to FINE for exception stack trace.
INFO: RAR5074 : Table based validation detected invalid connection. Querying the table GROUPS failed. Set resource-adapter log-level to FINE for exception stack trace.
INFO: RAR5074 : Table based validation detected invalid connection. Querying the table GROUPS failed. Set resource-adapter log-level to FINE for exception stack trace.
INFO: RAR5074 : Table based validation detected invalid connection. Querying the table GROUPS failed. Set resource-adapter log-level to FINE for exception stack trace.
i added this field is-connection-validation-required="true" it worked but there is a new exception... not severe or any other... it should be igored or something else...
INFO: RAR5074 : Table based validation detected invalid connection. Querying the table GROUPS failed. Set resource-adapter log-level to FINE for exception stack trace.
INFO: RAR5074 : Table based validation detected invalid connection. Querying the table GROUPS failed. Set resource-adapter log-level to FINE for exception stack trace.
INFO: RAR5074 : Table based validation detected invalid connection. Querying the table GROUPS failed. Set resource-adapter log-level to FINE for exception stack trace.
INFO: RAR5074 : Table based validation detected invalid connection. Querying the table GROUPS failed. Set resource-adapter log-level to FINE for exception stack trace.
INFO: RAR5074 : Table based validation detected invalid connection. Querying the table GROUPS failed. Set resource-adapter log-level to FINE for exception stack trace.
INFO: RAR5074 : Table based validation detected invalid connection. Querying the table GROUPS failed. Set resource-adapter log-level to FINE for exception stack trace.
INFO: RAR5074 : Table based validation detected invalid connection. Querying the table GROUPS failed. Set resource-adapter log-level to FINE for exception stack trace.
INFO: RAR5074 : Table based validation detected invalid connection. Querying the table GROUPS failed. Set resource-adapter log-level to FINE for exception stack trace.
| B.E IT | SCJP 6.0 98 % |
posted 11 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Hi all,
I had a similar issue appearing on a CentOS server, the exact reasons are not clear to me; it might be an issue with the MySQL version or the OS version, in any case I had no problems with my initial settings on other servers.
The actual problem manifests thus:
- after a Glassfish (V3.1.2.2) restart the login via a JDBC table based authentication worked fine
- some minutes later the authentication failed: on the client side throwing a HTTP authentication required (401) error while the server glassfish log listed a jdbcrealm.invaliduserreason error with no further details.
- a glassfish restart reset the problem for a few minutes, then it reappeared again ….
A working solution was found by configuring the Glassfish JDBC connection pool advanced settings in the Connection Validation section:
- Connection Validation: Required
- Validation Method: table
- table name: <your database table that holds the user information> (name and password)
- On Any Failure: Close All Connections
Cheers & happy coding!
Andy
I had a similar issue appearing on a CentOS server, the exact reasons are not clear to me; it might be an issue with the MySQL version or the OS version, in any case I had no problems with my initial settings on other servers.
The actual problem manifests thus:
- after a Glassfish (V3.1.2.2) restart the login via a JDBC table based authentication worked fine
- some minutes later the authentication failed: on the client side throwing a HTTP authentication required (401) error while the server glassfish log listed a jdbcrealm.invaliduserreason error with no further details.
- a glassfish restart reset the problem for a few minutes, then it reappeared again ….
A working solution was found by configuring the Glassfish JDBC connection pool advanced settings in the Connection Validation section:
- Connection Validation: Required
- Validation Method: table
- table name: <your database table that holds the user information> (name and password)
- On Any Failure: Close All Connections
Cheers & happy coding!
Andy
posted 6 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
I had a similar challenge and almost gave up. Here's what to do. Under the services tab, locate servers and Right-click on the glassfish server and select view admin console. This will launch the glassfish admin console on your default browser. Under "configurations", click "server-config", then "security" and then "realms" . On the pane that displays on the right hand, click "new". Then you fill the details. Basically, that page tells glassfish server where the user table is in the database, the column/field that is used as the username, the name of the table that has the users group, the name of the password field/column, the kind of encryption that is used. Don't forget to also fill the digest algorithm (this is usually the same with the one you filled in the password encryption algorithm). you can also watch this on youtube link https://www.youtube.com/watch?v=a-hUUTHOzsY
| please buy my thing and then I'll have more money: The new gardening playing cards kickstarter is now live! https://www.kickstarter.com/projects/paulwheaton/garden-cards |








