New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Glassfish - Pool KO after an exception [JDBC199] #248
Comments
Commented by: Raphaël Bourges (raphael) Test Case attached |
Modified by: Raphaël Bourges (raphael)Attachment: CineProg.zip [ 12051 ] Attachment: CINEPROG.FDB [ 12052 ] Attachment: exception_pool_firebird.txt [ 12053 ] |
Modified by: Raphaël Bourges (raphael)Attachment: log_next_query.txt [ 12054 ] |
Modified by: @dyemanovsecurity: Developers [ 10012 ] => |
Modified by: @mrotteveelassignee: Roman Rokytskyy [ rrokytskyy ] => Mark Rotteveel [ avalanche1979 ] |
Commented by: @mrotteveel Could you include reproduction steps to trigger the error? |
Commented by: @mrotteveel Never mind my previous request, I already found out how to reproduce it :) |
Commented by: @mrotteveel Content of mail I sent to Firebird-Java on 18th of November: I managed to reproduce this yesterday, but the NPE is triggered inside I am not sure of the cause yet and the many levels of indirection I did go over the list of EclipseLink changes since 2.2.0, and a number of |
Commented by: @mrotteveel I am still struggling with pinpointing the problem, this is going to take more time than I expected. |
Commented by: @mrotteveel Posted a topic at http://www.eclipse.org/forums/index.php/t/263189/ to get support from the EclipseLink as I am unable to pinpoint the problem. |
Commented by: @mrotteveel The problem is that when the the unique constraint violation exception is thrown by EclipseLink, the exception (DatabaseException) contains detailed information on the cause, including the SQLCall object, which contains an InsertObjectQuery which contains an object of class RelationDescriptor. When Flex receives this exception, it serializes the exception using a custom serialization protocol. And during that serialization it will serialize everything it considers a bean property. During that serialzation it calls a method called getInheritancePolicy() on the RelationDescriptor. This method has a side-effect, where it will create a new InheritancePolicy if the current value is null. The problem is that Movie does not have inheritance, so the inheritancePolicy should remain null. If after this exception you create a new object, it will refresh the Movie list, and now due to inheritancePolicy being non-null, it calls a number of methods it should not actually call for this object with the NullPointerException as a result. In other words: This is not a problem in Jaybird, but in the interaction between how Flex handles the Exception, and the way EclipseLink handles that inheritancePolicy property. I would consider this a bug (or at least a deficiency) in EclipseLink, so I would advise you to file a bug with them. |
Commented by: @mrotteveel Closed as 'Won't fix', as the problem is between the interaction of Flex and EclipseLink, not with Jaybird. |
Submitted by: Raphaël Bourges (raphael)
Attachments:
CineProg.zip
CINEPROG.FDB
exception_pool_firebird.txt
log_next_query.txt
When we get an exception about UNIQUE KEY violation or NOT NULL constraint not satisfied, the pool don't accept anymore queries
=> we have to restart GlassFish
We have a test case here
-the Netbeans project : http://ftp.cinematheque.fr/retrait/CineProg.zip
- the database : http://ftp.cinematheque.fr/retrait/CINEPROG.fdb
- the exception log : http://ftp.cinematheque.fr/retrait/exception_pool_firebird.txt
The text was updated successfully, but these errors were encountered: