Hi Heath, Rick! I'll try to be online on IRC tonight
irc.freenode.net channel is #openjpa LieGrue, strub ----- Original Message ----- > From: Heath Thomann (JIRA) <[email protected]> > To: [email protected] > Cc: > Sent: Thursday, April 26, 2012 5:38 PM > Subject: [jira] [Commented] (OPENJPA-2139) OpenJPA fails to recover from a > broken database on startup > > > [ > https://issues.apache.org/jira/browse/OPENJPA-2139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13262675#comment-13262675 > > ] > > Heath Thomann commented on OPENJPA-2139: > ---------------------------------------- > > Hi Mark! Just wanted to add a quick update here. Rick reviewed my patch and > yours (your committed changes to trunk that is). He feels that your > fix/commit > is definitely necessary in addition to a *portion* of the last patch I > submitted. The changes to MappingRepository in my previous patch are > necessary. However, he raised a very valid point that my eating of an > exception > in 'JDBCConfigurationImpl.getDBDictionaryInstance' would allow a null DB > instance to be returned where an exception used to be returned.......there > are a > lot of callers to JDBCConfigurationImpl.getDBDictionaryInstance throughout > OpenJPA code and as such we can't be sure each caller accounts for a null DB > instance to be returned. However, when I test with your commit plus the > changes > to MappingRepository, it still does not allow us to register a transformer > because as part of the registration, we go down the path to > JDBCConfigurationImpl.getDBDictionaryInstance which yields an exception when > the > DB is down, thus cause the registration to not occur. We have some ideas on > a > modified fix which will consist of following a similar pattern in > MappingDefaultsImpl as was done in MappingRepository (i.e. delay getting a > reference to DBDictionary). I will work on a fix today and hopefully have an > updated patch later today (the patch will include your changes). > >> OpenJPA fails to recover from a broken database on startup >> ---------------------------------------------------------- >> >> Key: OPENJPA-2139 >> URL: https://issues.apache.org/jira/browse/OPENJPA-2139 >> Project: OpenJPA >> Issue Type: Bug >> Affects Versions: 2.2.0 >> Reporter: Mark Struberg >> Assignee: Mark Struberg >> Priority: Critical >> Fix For: 2.3.0 >> >> Attachments: OPENJPA-2139-1.2.x.patch, OPENJPA-2139.mdr.patch, > OPENJPA-2139.patch >> >> >> The following scenario: >> 1.) turn off the database >> 2.) perform a query against the database >> 3.) turn on the database >> 4.) try to re-run the query from 2.) >> In 4.) you will get the following Exception: >> openjpa-2.2.0-r422266:1244990 nonfatal user error> > org.apache.openjpa.persistence.ArgumentException: An error occurred while > parsing the query filter "SELECT k FROM DbEnumKey AS k where k.type=:typ > ORDER BY k.ordinal". Error message: The name "DbEnumKey" is not a > recognized entity or identifier. Known entity names: [] >> Basically the whole app is stale afterwards! >> Solution: caching the entities might only be done if a connection can be > established. > > -- > This message is automatically generated by JIRA. > If you think it was sent incorrectly, please contact your JIRA > administrators: > https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa > For more information on JIRA, see: http://www.atlassian.com/software/jira >
