Anonymous | Login | Signup for a new account | 12-17-2024 10:46 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Advanced Details [ Jump to Notes ] | [ View Simple ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0002093 | [Quercus] | minor | always | 10-19-07 10:26 | 10-19-07 11:32 | ||||
Reporter | koreth | View Status | public | ||||||
Assigned To | ferg | ||||||||
Priority | normal | Resolution | fixed | Platform | |||||
Status | closed | OS | |||||||
Projection | none | OS Version | |||||||
ETA | none | Fixed in Version | 3.1.4 | Product Version | 3.1.3 | ||||
Product Build | |||||||||
Summary | 0002093: Null pointer exception in Env.getConnection() | ||||||||
Description |
When the remote side closed a MySQL connection, the latest code was trying to recover (this is with "ping" specified in the <database-default> section of the web app's resin-web.xml). But it ended up getting a NullPointerException the next time the PHP code called mysql_connect(). The connect call then fails. This is probably a sign of a deeper bug but the following patch fixes the immediate problem and seems like a good sanity check in any case: --- a/modules/quercus/src/com/caucho/quercus/env/Env.java +++ b/modules/quercus/src/com/caucho/quercus/env/Env.java @@ -692,7 +692,7 @@ public class Env { Connection conn; - if (oldEntry != null && ! oldEntry.getConnection().isClosed()) + if (oldEntry != null && oldEntry.getConnection() != null && ! oldEntry.getConnection().isClosed()) conn = oldEntry.getConnection(); else { if (userName == null || userName.equals("")) |
||||||||
Steps To Reproduce | |||||||||
Additional Information | |||||||||
Attached Files | |||||||||
|
There are no notes attached to this issue. |
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
27 total queries executed. 25 unique queries executed. |