You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Olivier Dony (JIRA)" <ji...@apache.org> on 2007/01/18 11:04:29 UTC
[jira] Created: (JCR-710) NullPointerException in
DatabasePersistenceManager and DatabaseFileSystem after a failed
reconnection attempt
NullPointerException in DatabasePersistenceManager and DatabaseFileSystem after a failed reconnection attempt
-------------------------------------------------------------------------------------------------------------
Key: JCR-710
URL: https://issues.apache.org/jira/browse/JCR-710
Project: Jackrabbit
Issue Type: Bug
Components: core
Affects Versions: 1.2
Reporter: Olivier Dony
Priority: Minor
As reported on the dev mailing-list, this is what happens:
The reconnection/retry mechanism in DatabasePersistenceManager/DatabaseFileSystem seems to behave fine when the connection times out or is killed for some reason, and the DB server is in fact still running.
However there is a problem if the connection cannot be re-established directly, for example if a transient network outage lasts longer than the few reconnection attempts.
Inside DatabasePersistenceManager.reestablishConnection(), initConnection() will fail, and the preparedStatements map will stay empty.
This in turn will trigger a nasty NullPointerException (never caught) next time executeStmt() is called, because the map is still empty, and there is no check for that.
The following proposed fix from Stefan Guggisberg has been tested to work when applied on 1.2-rc2:
> the simplest fix would be to remove line 783 in
> DatabasePersistenceManager.java and line 1010 in
> DatabaseFileSystem.java,
> i.e. the following stmt:
>
> preparedStatements.clear();
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (JCR-710) NullPointerException in
DatabasePersistenceManager and DatabaseFileSystem after a failed
reconnection attempt
Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-710?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stefan Guggisberg updated JCR-710:
----------------------------------
Fix Version/s: 1.2.1
> NullPointerException in DatabasePersistenceManager and DatabaseFileSystem after a failed reconnection attempt
> -------------------------------------------------------------------------------------------------------------
>
> Key: JCR-710
> URL: https://issues.apache.org/jira/browse/JCR-710
> Project: Jackrabbit
> Issue Type: Bug
> Components: core
> Affects Versions: 1.2
> Reporter: Olivier Dony
> Assigned To: Stefan Guggisberg
> Priority: Minor
> Fix For: 1.2.1
>
>
> As reported on the dev mailing-list, this is what happens:
> The reconnection/retry mechanism in DatabasePersistenceManager/DatabaseFileSystem seems to behave fine when the connection times out or is killed for some reason, and the DB server is in fact still running.
> However there is a problem if the connection cannot be re-established directly, for example if a transient network outage lasts longer than the few reconnection attempts.
> Inside DatabasePersistenceManager.reestablishConnection(), initConnection() will fail, and the preparedStatements map will stay empty.
> This in turn will trigger a nasty NullPointerException (never caught) next time executeStmt() is called, because the map is still empty, and there is no check for that.
> The following proposed fix from Stefan Guggisberg has been tested to work when applied on 1.2-rc2:
> > the simplest fix would be to remove line 783 in
> > DatabasePersistenceManager.java and line 1010 in
> > DatabaseFileSystem.java,
> > i.e. the following stmt:
> >
> > preparedStatements.clear();
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Assigned: (JCR-710) NullPointerException in
DatabasePersistenceManager and DatabaseFileSystem after a failed
reconnection attempt
Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-710?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stefan Guggisberg reassigned JCR-710:
-------------------------------------
Assignee: Stefan Guggisberg
> NullPointerException in DatabasePersistenceManager and DatabaseFileSystem after a failed reconnection attempt
> -------------------------------------------------------------------------------------------------------------
>
> Key: JCR-710
> URL: https://issues.apache.org/jira/browse/JCR-710
> Project: Jackrabbit
> Issue Type: Bug
> Components: core
> Affects Versions: 1.2
> Reporter: Olivier Dony
> Assigned To: Stefan Guggisberg
> Priority: Minor
>
> As reported on the dev mailing-list, this is what happens:
> The reconnection/retry mechanism in DatabasePersistenceManager/DatabaseFileSystem seems to behave fine when the connection times out or is killed for some reason, and the DB server is in fact still running.
> However there is a problem if the connection cannot be re-established directly, for example if a transient network outage lasts longer than the few reconnection attempts.
> Inside DatabasePersistenceManager.reestablishConnection(), initConnection() will fail, and the preparedStatements map will stay empty.
> This in turn will trigger a nasty NullPointerException (never caught) next time executeStmt() is called, because the map is still empty, and there is no check for that.
> The following proposed fix from Stefan Guggisberg has been tested to work when applied on 1.2-rc2:
> > the simplest fix would be to remove line 783 in
> > DatabasePersistenceManager.java and line 1010 in
> > DatabaseFileSystem.java,
> > i.e. the following stmt:
> >
> > preparedStatements.clear();
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Resolved: (JCR-710) NullPointerException in
DatabasePersistenceManager and DatabaseFileSystem after a failed
reconnection attempt
Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-710?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stefan Guggisberg resolved JCR-710.
-----------------------------------
Resolution: Fixed
fixed in svn r497392
olivier, thanks for reporting this issue and testing the fix!
> NullPointerException in DatabasePersistenceManager and DatabaseFileSystem after a failed reconnection attempt
> -------------------------------------------------------------------------------------------------------------
>
> Key: JCR-710
> URL: https://issues.apache.org/jira/browse/JCR-710
> Project: Jackrabbit
> Issue Type: Bug
> Components: core
> Affects Versions: 1.2
> Reporter: Olivier Dony
> Assigned To: Stefan Guggisberg
> Priority: Minor
> Fix For: 1.2.1
>
>
> As reported on the dev mailing-list, this is what happens:
> The reconnection/retry mechanism in DatabasePersistenceManager/DatabaseFileSystem seems to behave fine when the connection times out or is killed for some reason, and the DB server is in fact still running.
> However there is a problem if the connection cannot be re-established directly, for example if a transient network outage lasts longer than the few reconnection attempts.
> Inside DatabasePersistenceManager.reestablishConnection(), initConnection() will fail, and the preparedStatements map will stay empty.
> This in turn will trigger a nasty NullPointerException (never caught) next time executeStmt() is called, because the map is still empty, and there is no check for that.
> The following proposed fix from Stefan Guggisberg has been tested to work when applied on 1.2-rc2:
> > the simplest fix would be to remove line 783 in
> > DatabasePersistenceManager.java and line 1010 in
> > DatabaseFileSystem.java,
> > i.e. the following stmt:
> >
> > preparedStatements.clear();
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira