Duplicate entry for key 1) on login
----------------------------------- Key: OFBIZ-925 URL: https://issues.apache.org/jira/browse/OFBIZ-925 Project: OFBiz (The Open for Business Project) Issue Type: Bug Components: framework Affects Versions: SVN trunk Environment: all i think Reporter: Krzysztof Podejma Priority: Trivial in framework/security/entitydef/entitymodel.xml/UserLoginHistory are pkfields <prim-key field="userLoginId"/> and <prim-key field="fromDate"/> so if you'r fast in logout/login action, you can get nasty error ;] the best workaround i found is to add <prim-key field="visitId"/> because visitId seems to be unique for this entity. Regards Krzysztof Podejma -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
[ https://issues.apache.org/jira/browse/OFBIZ-925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12492103 ] Art Hughes commented on OFBIZ-925: ---------------------------------- Greetings, I have the same problem, however, it appears only when I'm using Mysql 5.0 data base and not with Derby. Could this be a problem or bug in Mysql or jdbc driver? Just a thought. Art > Duplicate entry for key 1) on login > ----------------------------------- > > Key: OFBIZ-925 > URL: https://issues.apache.org/jira/browse/OFBIZ-925 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Environment: all i think > Reporter: Krzysztof Podejma > Priority: Trivial > > in framework/security/entitydef/entitymodel.xml/UserLoginHistory are pkfields <prim-key field="userLoginId"/> and <prim-key field="fromDate"/> so if you'r fast in logout/login action, you can get nasty error ;] > the best workaround i found is to add <prim-key field="visitId"/> because visitId seems to be unique for this entity. > Regards > Krzysztof Podejma -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12492128 ] Krzysztof Podejma commented on OFBIZ-925: ----------------------------------------- on Derby two login timestamps look like this 2007-04-26 23:48:15.75 2007-04-26 23:48:15.828 date time ms? but on MySQL the same timestamps: 2007-04-26 23:48:15 2007-04-26 23:48:15 this timestamp field is part of primary key(<prim-key field="fromDate"/>) so with MySQL it is possible to get login error if you try to login twice with the the same username in less than one second. Krzysztof Podejma > Duplicate entry for key 1) on login > ----------------------------------- > > Key: OFBIZ-925 > URL: https://issues.apache.org/jira/browse/OFBIZ-925 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Environment: all i think > Reporter: Krzysztof Podejma > Priority: Trivial > > in framework/security/entitydef/entitymodel.xml/UserLoginHistory are pkfields <prim-key field="userLoginId"/> and <prim-key field="fromDate"/> so if you'r fast in logout/login action, you can get nasty error ;] > the best workaround i found is to add <prim-key field="visitId"/> because visitId seems to be unique for this entity. > Regards > Krzysztof Podejma -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-925?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] David E. Jones closed OFBIZ-925. -------------------------------- Resolution: Fixed Fix Version/s: SVN trunk Assignee: David E. Jones This is now fixed by fixing the underlying problem which caused the creation of 2 UserLoginHistory records for a single login in the first place. Not that this problem is fixed this shouldn't be an issue. > Duplicate entry for key 1) on login > ----------------------------------- > > Key: OFBIZ-925 > URL: https://issues.apache.org/jira/browse/OFBIZ-925 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Environment: all i think > Reporter: Krzysztof Podejma > Assigned To: David E. Jones > Priority: Trivial > Fix For: SVN trunk > > > in framework/security/entitydef/entitymodel.xml/UserLoginHistory are pkfields <prim-key field="userLoginId"/> and <prim-key field="fromDate"/> so if you'r fast in logout/login action, you can get nasty error ;] > the best workaround i found is to add <prim-key field="visitId"/> because visitId seems to be unique for this entity. > Regards > Krzysztof Podejma -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
Free forum by Nabble | Edit this page |