Re: OFBIZ-3972

2017-05-01 Thread Deepak Dixit
This has been done at r#1793300

Added generateMySqlFileWithAlterTableForTimestamps service to generate sql
alter statement for date-time and time filed.

Also update Data Migration <https://cwiki.apache.org/confluence/x/LoBr> wiki
page with revision and migration service detail.

Thanks & Regards
--
Deepak Dixit
www.hotwaxsystems.com

On Wed, Apr 26, 2017 at 6:35 PM, Michael Brohl <michael.br...@ecomify.de>
wrote:

> +1 Deepak
>
> Thanks,
>
> Michael
>
> Am 15.03.17 um 05:10 schrieb Deepak Dixit:
>
> Can we conclude this?
>>
>> Thanks & Regards
>> --
>> Deepak Dixit
>> www.hotwaxsystems.com
>>
>> On Tue, Feb 28, 2017 at 2:27 PM, Rishi Solanki <rishisolan...@gmail.com>
>> wrote:
>>
>> Interesting related blog - LINK
>>> <https://blog.sqlauthority.com/2014/02/14/mysql-when-to-
>>> use-timestamp-or-datetime-difference-between-timestamp-or-datetime/>
>>> One more conversation -
>>> http://stackoverflow.com/questions/5989539/when-to-use-
>>> datetime-or-timestamp
>>>
>>> It says it depends on the context of the field for which it is used.
>>> DATETIME seems to be good choice as we will be updating field type, and
>>> it
>>> may applicable to many places.
>>>
>>> Thanks!
>>>
>>>
>>> Rishi Solanki
>>> Sr. Manager, Enterprise Software Development
>>> HotWax Systems Pvt. Ltd.
>>> Direct: +91-9893287847
>>> http://www.hotwaxsystems.com
>>>
>>> On Fri, Feb 24, 2017 at 3:37 PM, Taher Alkhateeb <
>>> slidingfilame...@gmail.com
>>>
>>>> wrote:
>>>> I think I would prefer DATETIME. Some reasons are found here ->
>>>> http://stackoverflow.com/questions/409286/should-i-use-
>>>> field-datetime-or-timestamp.
>>>> Given that OFBiz takes care of conversions, DATETIME seems like a more
>>>> appropriate choice
>>>>
>>>> On Fri, Feb 24, 2017 at 12:13 PM, Jacques Le Roux <
>>>> jacques.le.r...@les7arts.com> wrote:
>>>>
>>>> Hi,
>>>>>
>>>>> At OFBIZ-3972 Deepak suggested
>>>>>
>>>>> <>>>> As we have only DATETIME set as sql type and this does not support
>>>>> Milliseconds, we need to use DATETIME(3) or DATETIME(6).>>
>>>>>
>>>>> I suggested
>>>>>
>>>>> <https://dev.mysql.com/doc/
>>>>>
>>>> refman/5.6/en/datetime.html
>>>>
>>>>> Deepak rightly mentioned that in both cases we need to create an entry
>>>>>
>>>> in
>>>
>>>> "data migration" wiki page
>>>>>
>>>>> << we need to run alter query manually (if someone want to upgrade
>>>>>
>>>> custom
>>>
>>>> solution to latest)>>
>>>>>
>>>>> Please let know your thoughts and suggestions if any
>>>>>
>>>>> Jacques
>>>>>
>>>>>
>>>>>
>
>


Re: OFBIZ-3972

2017-04-26 Thread Deepak Dixit
Here is the ticket for this discussion
https://issues.apache.org/jira/browse/OFBIZ-9337

Thanks & Regards
--
Deepak Dixit
www.hotwaxsystems.com

On Wed, Mar 15, 2017 at 11:36 AM, Jacques Le Roux <
jacques.le.r...@les7arts.com> wrote:

> It's OK with me, I was just asking a question and it seems it has been
> answered
>
> Jacques
>
>
>
> Le 15/03/2017 à 05:10, Deepak Dixit a écrit :
>
>> Can we conclude this?
>>
>> Thanks & Regards
>> --
>> Deepak Dixit
>> www.hotwaxsystems.com
>>
>> On Tue, Feb 28, 2017 at 2:27 PM, Rishi Solanki <rishisolan...@gmail.com>
>> wrote:
>>
>> Interesting related blog - LINK
>>> <https://blog.sqlauthority.com/2014/02/14/mysql-when-to-
>>> use-timestamp-or-datetime-difference-between-timestamp-or-datetime/>
>>> One more conversation -
>>> http://stackoverflow.com/questions/5989539/when-to-use-
>>> datetime-or-timestamp
>>>
>>> It says it depends on the context of the field for which it is used.
>>> DATETIME seems to be good choice as we will be updating field type, and
>>> it
>>> may applicable to many places.
>>>
>>> Thanks!
>>>
>>>
>>> Rishi Solanki
>>> Sr. Manager, Enterprise Software Development
>>> HotWax Systems Pvt. Ltd.
>>> Direct: +91-9893287847
>>> http://www.hotwaxsystems.com
>>>
>>> On Fri, Feb 24, 2017 at 3:37 PM, Taher Alkhateeb <
>>> slidingfilame...@gmail.com
>>>
>>>> wrote:
>>>> I think I would prefer DATETIME. Some reasons are found here ->
>>>> http://stackoverflow.com/questions/409286/should-i-use-
>>>> field-datetime-or-timestamp.
>>>> Given that OFBiz takes care of conversions, DATETIME seems like a more
>>>> appropriate choice
>>>>
>>>> On Fri, Feb 24, 2017 at 12:13 PM, Jacques Le Roux <
>>>> jacques.le.r...@les7arts.com> wrote:
>>>>
>>>> Hi,
>>>>>
>>>>> At OFBIZ-3972 Deepak suggested
>>>>>
>>>>> <>>>> As we have only DATETIME set as sql type and this does not support
>>>>> Milliseconds, we need to use DATETIME(3) or DATETIME(6).>>
>>>>>
>>>>> I suggested
>>>>>
>>>>> <https://dev.mysql.com/doc/
>>>>>
>>>> refman/5.6/en/datetime.html
>>>>
>>>>> Deepak rightly mentioned that in both cases we need to create an entry
>>>>>
>>>> in
>>>
>>>> "data migration" wiki page
>>>>>
>>>>> << we need to run alter query manually (if someone want to upgrade
>>>>>
>>>> custom
>>>
>>>> solution to latest)>>
>>>>>
>>>>> Please let know your thoughts and suggestions if any
>>>>>
>>>>> Jacques
>>>>>
>>>>>
>>>>>
>


Re: OFBIZ-3972

2017-03-15 Thread Jacques Le Roux

It's OK with me, I was just asking a question and it seems it has been answered

Jacques


Le 15/03/2017 à 05:10, Deepak Dixit a écrit :

Can we conclude this?

Thanks & Regards
--
Deepak Dixit
www.hotwaxsystems.com

On Tue, Feb 28, 2017 at 2:27 PM, Rishi Solanki <rishisolan...@gmail.com>
wrote:


Interesting related blog - LINK
<https://blog.sqlauthority.com/2014/02/14/mysql-when-to-
use-timestamp-or-datetime-difference-between-timestamp-or-datetime/>
One more conversation -
http://stackoverflow.com/questions/5989539/when-to-use-
datetime-or-timestamp

It says it depends on the context of the field for which it is used.
DATETIME seems to be good choice as we will be updating field type, and it
may applicable to many places.

Thanks!


Rishi Solanki
Sr. Manager, Enterprise Software Development
HotWax Systems Pvt. Ltd.
Direct: +91-9893287847
http://www.hotwaxsystems.com

On Fri, Feb 24, 2017 at 3:37 PM, Taher Alkhateeb <
slidingfilame...@gmail.com

wrote:
I think I would prefer DATETIME. Some reasons are found here ->
http://stackoverflow.com/questions/409286/should-i-use-
field-datetime-or-timestamp.
Given that OFBiz takes care of conversions, DATETIME seems like a more
appropriate choice

On Fri, Feb 24, 2017 at 12:13 PM, Jacques Le Roux <
jacques.le.r...@les7arts.com> wrote:


Hi,

At OFBIZ-3972 Deepak suggested

<>

I suggested

<https://dev.mysql.com/doc/

refman/5.6/en/datetime.html

Deepak rightly mentioned that in both cases we need to create an entry

in

"data migration" wiki page

<< we need to run alter query manually (if someone want to upgrade

custom

solution to latest)>>

Please let know your thoughts and suggestions if any

Jacques






Re: OFBIZ-3972

2017-03-14 Thread Deepak Dixit
Can we conclude this?

Thanks & Regards
--
Deepak Dixit
www.hotwaxsystems.com

On Tue, Feb 28, 2017 at 2:27 PM, Rishi Solanki <rishisolan...@gmail.com>
wrote:

> Interesting related blog - LINK
> <https://blog.sqlauthority.com/2014/02/14/mysql-when-to-
> use-timestamp-or-datetime-difference-between-timestamp-or-datetime/>
> One more conversation -
> http://stackoverflow.com/questions/5989539/when-to-use-
> datetime-or-timestamp
>
> It says it depends on the context of the field for which it is used.
> DATETIME seems to be good choice as we will be updating field type, and it
> may applicable to many places.
>
> Thanks!
>
>
> Rishi Solanki
> Sr. Manager, Enterprise Software Development
> HotWax Systems Pvt. Ltd.
> Direct: +91-9893287847
> http://www.hotwaxsystems.com
>
> On Fri, Feb 24, 2017 at 3:37 PM, Taher Alkhateeb <
> slidingfilame...@gmail.com
> > wrote:
>
> > I think I would prefer DATETIME. Some reasons are found here ->
> > http://stackoverflow.com/questions/409286/should-i-use-
> > field-datetime-or-timestamp.
> > Given that OFBiz takes care of conversions, DATETIME seems like a more
> > appropriate choice
> >
> > On Fri, Feb 24, 2017 at 12:13 PM, Jacques Le Roux <
> > jacques.le.r...@les7arts.com> wrote:
> >
> > > Hi,
> > >
> > > At OFBIZ-3972 Deepak suggested
> > >
> > > < > > As we have only DATETIME set as sql type and this does not support
> > > Milliseconds, we need to use DATETIME(3) or DATETIME(6).>>
> > >
> > > I suggested
> > >
> > > <https://dev.mysql.com/doc/
> > refman/5.6/en/datetime.html
> > > >>
> > >
> > > Deepak rightly mentioned that in both cases we need to create an entry
> in
> > > "data migration" wiki page
> > >
> > > << we need to run alter query manually (if someone want to upgrade
> custom
> > > solution to latest)>>
> > >
> > > Please let know your thoughts and suggestions if any
> > >
> > > Jacques
> > >
> > >
> >
>


Re: OFBIZ-3972

2017-02-28 Thread Rishi Solanki
Interesting related blog - LINK
<https://blog.sqlauthority.com/2014/02/14/mysql-when-to-use-timestamp-or-datetime-difference-between-timestamp-or-datetime/>
One more conversation -
http://stackoverflow.com/questions/5989539/when-to-use-datetime-or-timestamp

It says it depends on the context of the field for which it is used.
DATETIME seems to be good choice as we will be updating field type, and it
may applicable to many places.

Thanks!


Rishi Solanki
Sr. Manager, Enterprise Software Development
HotWax Systems Pvt. Ltd.
Direct: +91-9893287847
http://www.hotwaxsystems.com

On Fri, Feb 24, 2017 at 3:37 PM, Taher Alkhateeb <slidingfilame...@gmail.com
> wrote:

> I think I would prefer DATETIME. Some reasons are found here ->
> http://stackoverflow.com/questions/409286/should-i-use-
> field-datetime-or-timestamp.
> Given that OFBiz takes care of conversions, DATETIME seems like a more
> appropriate choice
>
> On Fri, Feb 24, 2017 at 12:13 PM, Jacques Le Roux <
> jacques.le.r...@les7arts.com> wrote:
>
> > Hi,
> >
> > At OFBIZ-3972 Deepak suggested
> >
> > < > As we have only DATETIME set as sql type and this does not support
> > Milliseconds, we need to use DATETIME(3) or DATETIME(6).>>
> >
> > I suggested
> >
> > <https://dev.mysql.com/doc/
> refman/5.6/en/datetime.html
> > >>
> >
> > Deepak rightly mentioned that in both cases we need to create an entry in
> > "data migration" wiki page
> >
> > << we need to run alter query manually (if someone want to upgrade custom
> > solution to latest)>>
> >
> > Please let know your thoughts and suggestions if any
> >
> > Jacques
> >
> >
>


Re: OFBIZ-3972

2017-02-24 Thread Taher Alkhateeb
I think I would prefer DATETIME. Some reasons are found here ->
http://stackoverflow.com/questions/409286/should-i-use-field-datetime-or-timestamp.
Given that OFBiz takes care of conversions, DATETIME seems like a more
appropriate choice

On Fri, Feb 24, 2017 at 12:13 PM, Jacques Le Roux <
jacques.le.r...@les7arts.com> wrote:

> Hi,
>
> At OFBIZ-3972 Deepak suggested
>
> < As we have only DATETIME set as sql type and this does not support
> Milliseconds, we need to use DATETIME(3) or DATETIME(6).>>
>
> I suggested
>
> <https://dev.mysql.com/doc/refman/5.6/en/datetime.html
> >>
>
> Deepak rightly mentioned that in both cases we need to create an entry in
> "data migration" wiki page
>
> << we need to run alter query manually (if someone want to upgrade custom
> solution to latest)>>
>
> Please let know your thoughts and suggestions if any
>
> Jacques
>
>


OFBIZ-3972

2017-02-24 Thread Jacques Le Roux

Hi,

At OFBIZ-3972 Deepak suggested

<>

I suggested

<https://dev.mysql.com/doc/refman/5.6/en/datetime.html>>

Deepak rightly mentioned that in both cases we need to create an entry in "data 
migration" wiki page

<< we need to run alter query manually (if someone want to upgrade custom solution to 
latest)>>

Please let know your thoughts and suggestions if any

Jacques



[jira] [Closed] (OFBIZ-3972) user of tenant generate errors on entity Server_Hit

2013-02-09 Thread Jacques Le Roux (JIRA)

 [ 
https://issues.apache.org/jira/browse/OFBIZ-3972?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jacques Le Roux closed OFBIZ-3972.
--

Resolution: Duplicate
  Assignee: Jacques Le Roux

Since 5.6 is officially released this is less a problem with mySql (probability 
of race condition divided by 1000. It still exists and should not use a 
timestamp (hitStartDateTime) in its PK, there is another related Jira
http://dev.mysql.com/doc/relnotes/mysql/5.6/en/
https://blogs.oracle.com/MySqlOnWindows/entry/milliseconds_value_support_on_datetime

I close this issue as a duplicate of OFBIZ-2208

 user of tenant generate errors on entity Server_Hit
 ---

 Key: OFBIZ-3972
 URL: https://issues.apache.org/jira/browse/OFBIZ-3972
 Project: OFBiz
  Issue Type: Bug
  Components: framework
Affects Versions: SVN trunk
Reporter: Pierre Smits
Assignee: Jacques Le Roux
 Fix For: SVN trunk


 When a user is active in a tenant and he/she logs off, server_hits are 
 generated. However the persistence is rolled back. See excerpt of error.log 
 below.
 2010-10-01 11:34:12,169 (http-0.0.0.0-8443-5) [   
 GenericDelegator.java:889:ERROR] 
  exception report 
 --
 Failure in create operation for entity [ServerHit]: 
 org.ofbiz.entity.GenericEntityException: Error while inserting: 
 [GenericEntity:ServerHit][contentId,catalog.logout(java.lang.String)][createdStamp,2010-10-01
  11:34:12.138(java.sql.Timestamp)][createdTxStamp,2010-10-01 
 11:34:12.138(java.sql.Timestamp)][hitStartDateTime,2010-10-01 
 11:34:11.732(java.sql.Timestamp)][hitTypeId,REQUEST(java.lang.String)][lastUpdatedStamp,2010-10-01
  11:34:12.138(java.sql.Timestamp)][lastUpdatedTxStamp,2010-10-01 
 11:34:12.138(java.sql.Timestamp)][partyId,DEMO55-admin(java.lang.String)][referrerUrl,https://localhost:8443/catalog/control/main?externalLoginKey=EL814028348655(java.lang.String)][requestUrl,https://localhost:8443/catalog/control/logout(java.lang.String)][runningTimeMillis,406(java.lang.Long)][serverHostName,zase(java.lang.String)][serverIpAddress,10.0.0.125(java.lang.String)][userLoginId,DEMO55-admin(java.lang.String)][visitId,10024(java.lang.String)]
  (SQL Exception while executing the following:INSERT INTO OFBIZ.SERVER_HIT 
 (VISIT_ID, CONTENT_ID, HIT_START_DATE_TIME, HIT_TYPE_ID, NUM_OF_BYTES, 
 RUNNING_TIME_MILLIS, USER_LOGIN_ID, STATUS_ID, REQUEST_URL, REFERRER_URL, 
 SERVER_IP_ADDRESS, SERVER_HOST_NAME, LAST_UPDATED_STAMP, 
 LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP, INTERNAL_CONTENT_ID, 
 PARTY_ID, ID_BY_IP_CONTACT_MECH_ID, REF_BY_WEB_CONTACT_MECH_ID) VALUES (?, ?, 
 ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 
 'SERVER_HIT' caused a violation of foreign key constraint 'SERVER_HIT_USER' 
 for key (DEMO55-admin).  The statement has been rolled back.)). Rolling back 
 transaction.
 Exception: org.ofbiz.entity.GenericEntityException
 Message: Error while inserting: 
 [GenericEntity:ServerHit][contentId,catalog.logout(java.lang.String)][createdStamp,2010-10-01
  11:34:12.138(java.sql.Timestamp)][createdTxStamp,2010-10-01 
 11:34:12.138(java.sql.Timestamp)][hitStartDateTime,2010-10-01 
 11:34:11.732(java.sql.Timestamp)][hitTypeId,REQUEST(java.lang.String)][lastUpdatedStamp,2010-10-01
  11:34:12.138(java.sql.Timestamp)][lastUpdatedTxStamp,2010-10-01 
 11:34:12.138(java.sql.Timestamp)][partyId,DEMO55-admin(java.lang.String)][referrerUrl,https://localhost:8443/catalog/control/main?externalLoginKey=EL814028348655(java.lang.String)][requestUrl,https://localhost:8443/catalog/control/logout(java.lang.String)][runningTimeMillis,406(java.lang.Long)][serverHostName,zase(java.lang.String)][serverIpAddress,10.0.0.125(java.lang.String)][userLoginId,DEMO55-admin(java.lang.String)][visitId,10024(java.lang.String)]
  (SQL Exception while executing the following:INSERT INTO OFBIZ.SERVER_HIT 
 (VISIT_ID, CONTENT_ID, HIT_START_DATE_TIME, HIT_TYPE_ID, NUM_OF_BYTES, 
 RUNNING_TIME_MILLIS, USER_LOGIN_ID, STATUS_ID, REQUEST_URL, REFERRER_URL, 
 SERVER_IP_ADDRESS, SERVER_HOST_NAME, LAST_UPDATED_STAMP, 
 LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP, INTERNAL_CONTENT_ID, 
 PARTY_ID, ID_BY_IP_CONTACT_MECH_ID, REF_BY_WEB_CONTACT_MECH_ID) VALUES (?, ?, 
 ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 
 'SERVER_HIT' caused a violation of foreign key constraint 'SERVER_HIT_USER' 
 for key (DEMO55-admin).  The statement has been rolled back.))
  cause 
 -
 Exception: org.ofbiz.entity.GenericDataSourceException
 Message: SQL Exception while executing the following:INSERT INTO 
 OFBIZ.SERVER_HIT (VISIT_ID, CONTENT_ID, HIT_START_DATE_TIME, HIT_TYPE_ID, 
 NUM_OF_BYTES

[jira] [Commented] (OFBIZ-3972) user of tenant generate errors on entity Server_Hit

2013-01-10 Thread Paul Piper (JIRA)

[ 
https://issues.apache.org/jira/browse/OFBIZ-3972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13549584#comment-13549584
 ] 

Paul Piper commented on OFBIZ-3972:
---

If your database is MySQL then I second Jacques opinion. Unless you purchase 
the Enterprise edition of mysql, mysql will not handle timestamps correctly, 
which in turn can generate duplicate server-hit entries and also cause 
misfiring of events. 

I would propose for you to switch to postgres and close the issue here...

 user of tenant generate errors on entity Server_Hit
 ---

 Key: OFBIZ-3972
 URL: https://issues.apache.org/jira/browse/OFBIZ-3972
 Project: OFBiz
  Issue Type: Bug
  Components: framework
Affects Versions: SVN trunk
Reporter: Pierre Smits
 Fix For: SVN trunk


 When a user is active in a tenant and he/she logs off, server_hits are 
 generated. However the persistence is rolled back. See excerpt of error.log 
 below.
 2010-10-01 11:34:12,169 (http-0.0.0.0-8443-5) [   
 GenericDelegator.java:889:ERROR] 
  exception report 
 --
 Failure in create operation for entity [ServerHit]: 
 org.ofbiz.entity.GenericEntityException: Error while inserting: 
 [GenericEntity:ServerHit][contentId,catalog.logout(java.lang.String)][createdStamp,2010-10-01
  11:34:12.138(java.sql.Timestamp)][createdTxStamp,2010-10-01 
 11:34:12.138(java.sql.Timestamp)][hitStartDateTime,2010-10-01 
 11:34:11.732(java.sql.Timestamp)][hitTypeId,REQUEST(java.lang.String)][lastUpdatedStamp,2010-10-01
  11:34:12.138(java.sql.Timestamp)][lastUpdatedTxStamp,2010-10-01 
 11:34:12.138(java.sql.Timestamp)][partyId,DEMO55-admin(java.lang.String)][referrerUrl,https://localhost:8443/catalog/control/main?externalLoginKey=EL814028348655(java.lang.String)][requestUrl,https://localhost:8443/catalog/control/logout(java.lang.String)][runningTimeMillis,406(java.lang.Long)][serverHostName,zase(java.lang.String)][serverIpAddress,10.0.0.125(java.lang.String)][userLoginId,DEMO55-admin(java.lang.String)][visitId,10024(java.lang.String)]
  (SQL Exception while executing the following:INSERT INTO OFBIZ.SERVER_HIT 
 (VISIT_ID, CONTENT_ID, HIT_START_DATE_TIME, HIT_TYPE_ID, NUM_OF_BYTES, 
 RUNNING_TIME_MILLIS, USER_LOGIN_ID, STATUS_ID, REQUEST_URL, REFERRER_URL, 
 SERVER_IP_ADDRESS, SERVER_HOST_NAME, LAST_UPDATED_STAMP, 
 LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP, INTERNAL_CONTENT_ID, 
 PARTY_ID, ID_BY_IP_CONTACT_MECH_ID, REF_BY_WEB_CONTACT_MECH_ID) VALUES (?, ?, 
 ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 
 'SERVER_HIT' caused a violation of foreign key constraint 'SERVER_HIT_USER' 
 for key (DEMO55-admin).  The statement has been rolled back.)). Rolling back 
 transaction.
 Exception: org.ofbiz.entity.GenericEntityException
 Message: Error while inserting: 
 [GenericEntity:ServerHit][contentId,catalog.logout(java.lang.String)][createdStamp,2010-10-01
  11:34:12.138(java.sql.Timestamp)][createdTxStamp,2010-10-01 
 11:34:12.138(java.sql.Timestamp)][hitStartDateTime,2010-10-01 
 11:34:11.732(java.sql.Timestamp)][hitTypeId,REQUEST(java.lang.String)][lastUpdatedStamp,2010-10-01
  11:34:12.138(java.sql.Timestamp)][lastUpdatedTxStamp,2010-10-01 
 11:34:12.138(java.sql.Timestamp)][partyId,DEMO55-admin(java.lang.String)][referrerUrl,https://localhost:8443/catalog/control/main?externalLoginKey=EL814028348655(java.lang.String)][requestUrl,https://localhost:8443/catalog/control/logout(java.lang.String)][runningTimeMillis,406(java.lang.Long)][serverHostName,zase(java.lang.String)][serverIpAddress,10.0.0.125(java.lang.String)][userLoginId,DEMO55-admin(java.lang.String)][visitId,10024(java.lang.String)]
  (SQL Exception while executing the following:INSERT INTO OFBIZ.SERVER_HIT 
 (VISIT_ID, CONTENT_ID, HIT_START_DATE_TIME, HIT_TYPE_ID, NUM_OF_BYTES, 
 RUNNING_TIME_MILLIS, USER_LOGIN_ID, STATUS_ID, REQUEST_URL, REFERRER_URL, 
 SERVER_IP_ADDRESS, SERVER_HOST_NAME, LAST_UPDATED_STAMP, 
 LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP, INTERNAL_CONTENT_ID, 
 PARTY_ID, ID_BY_IP_CONTACT_MECH_ID, REF_BY_WEB_CONTACT_MECH_ID) VALUES (?, ?, 
 ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 
 'SERVER_HIT' caused a violation of foreign key constraint 'SERVER_HIT_USER' 
 for key (DEMO55-admin).  The statement has been rolled back.))
  cause 
 -
 Exception: org.ofbiz.entity.GenericDataSourceException
 Message: SQL Exception while executing the following:INSERT INTO 
 OFBIZ.SERVER_HIT (VISIT_ID, CONTENT_ID, HIT_START_DATE_TIME, HIT_TYPE_ID, 
 NUM_OF_BYTES, RUNNING_TIME_MILLIS, USER_LOGIN_ID, STATUS_ID, REQUEST_URL, 
 REFERRER_URL, SERVER_IP_ADDRESS, SERVER_HOST_NAME, LAST_UPDATED_STAMP

[jira] Commented: (OFBIZ-3972) user of tenant generate errors on entity Server_Hit

2011-01-23 Thread Jacques Le Roux (JIRA)

[ 
https://issues.apache.org/jira/browse/OFBIZ-3972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12985276#action_12985276
 ] 

Jacques Le Roux commented on OFBIZ-3972:


Pierre,

Was this with mySql? Because there is a know issue: mySql does not handle 
milliseconds in transaction. Actually this problem can occurs as well with 
other DBMS fut much more rarely (1000 time less).

 user of tenant generate errors on entity Server_Hit
 ---

 Key: OFBIZ-3972
 URL: https://issues.apache.org/jira/browse/OFBIZ-3972
 Project: OFBiz
  Issue Type: Bug
  Components: framework
Affects Versions: SVN trunk
Reporter: Pierre Smits
 Fix For: SVN trunk


 When a user is active in a tenant and he/she logs off, server_hits are 
 generated. However the persistence is rolled back. See excerpt of error.log 
 below.
 2010-10-01 11:34:12,169 (http-0.0.0.0-8443-5) [   
 GenericDelegator.java:889:ERROR] 
  exception report 
 --
 Failure in create operation for entity [ServerHit]: 
 org.ofbiz.entity.GenericEntityException: Error while inserting: 
 [GenericEntity:ServerHit][contentId,catalog.logout(java.lang.String)][createdStamp,2010-10-01
  11:34:12.138(java.sql.Timestamp)][createdTxStamp,2010-10-01 
 11:34:12.138(java.sql.Timestamp)][hitStartDateTime,2010-10-01 
 11:34:11.732(java.sql.Timestamp)][hitTypeId,REQUEST(java.lang.String)][lastUpdatedStamp,2010-10-01
  11:34:12.138(java.sql.Timestamp)][lastUpdatedTxStamp,2010-10-01 
 11:34:12.138(java.sql.Timestamp)][partyId,DEMO55-admin(java.lang.String)][referrerUrl,https://localhost:8443/catalog/control/main?externalLoginKey=EL814028348655(java.lang.String)][requestUrl,https://localhost:8443/catalog/control/logout(java.lang.String)][runningTimeMillis,406(java.lang.Long)][serverHostName,zase(java.lang.String)][serverIpAddress,10.0.0.125(java.lang.String)][userLoginId,DEMO55-admin(java.lang.String)][visitId,10024(java.lang.String)]
  (SQL Exception while executing the following:INSERT INTO OFBIZ.SERVER_HIT 
 (VISIT_ID, CONTENT_ID, HIT_START_DATE_TIME, HIT_TYPE_ID, NUM_OF_BYTES, 
 RUNNING_TIME_MILLIS, USER_LOGIN_ID, STATUS_ID, REQUEST_URL, REFERRER_URL, 
 SERVER_IP_ADDRESS, SERVER_HOST_NAME, LAST_UPDATED_STAMP, 
 LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP, INTERNAL_CONTENT_ID, 
 PARTY_ID, ID_BY_IP_CONTACT_MECH_ID, REF_BY_WEB_CONTACT_MECH_ID) VALUES (?, ?, 
 ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 
 'SERVER_HIT' caused a violation of foreign key constraint 'SERVER_HIT_USER' 
 for key (DEMO55-admin).  The statement has been rolled back.)). Rolling back 
 transaction.
 Exception: org.ofbiz.entity.GenericEntityException
 Message: Error while inserting: 
 [GenericEntity:ServerHit][contentId,catalog.logout(java.lang.String)][createdStamp,2010-10-01
  11:34:12.138(java.sql.Timestamp)][createdTxStamp,2010-10-01 
 11:34:12.138(java.sql.Timestamp)][hitStartDateTime,2010-10-01 
 11:34:11.732(java.sql.Timestamp)][hitTypeId,REQUEST(java.lang.String)][lastUpdatedStamp,2010-10-01
  11:34:12.138(java.sql.Timestamp)][lastUpdatedTxStamp,2010-10-01 
 11:34:12.138(java.sql.Timestamp)][partyId,DEMO55-admin(java.lang.String)][referrerUrl,https://localhost:8443/catalog/control/main?externalLoginKey=EL814028348655(java.lang.String)][requestUrl,https://localhost:8443/catalog/control/logout(java.lang.String)][runningTimeMillis,406(java.lang.Long)][serverHostName,zase(java.lang.String)][serverIpAddress,10.0.0.125(java.lang.String)][userLoginId,DEMO55-admin(java.lang.String)][visitId,10024(java.lang.String)]
  (SQL Exception while executing the following:INSERT INTO OFBIZ.SERVER_HIT 
 (VISIT_ID, CONTENT_ID, HIT_START_DATE_TIME, HIT_TYPE_ID, NUM_OF_BYTES, 
 RUNNING_TIME_MILLIS, USER_LOGIN_ID, STATUS_ID, REQUEST_URL, REFERRER_URL, 
 SERVER_IP_ADDRESS, SERVER_HOST_NAME, LAST_UPDATED_STAMP, 
 LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP, INTERNAL_CONTENT_ID, 
 PARTY_ID, ID_BY_IP_CONTACT_MECH_ID, REF_BY_WEB_CONTACT_MECH_ID) VALUES (?, ?, 
 ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 
 'SERVER_HIT' caused a violation of foreign key constraint 'SERVER_HIT_USER' 
 for key (DEMO55-admin).  The statement has been rolled back.))
  cause 
 -
 Exception: org.ofbiz.entity.GenericDataSourceException
 Message: SQL Exception while executing the following:INSERT INTO 
 OFBIZ.SERVER_HIT (VISIT_ID, CONTENT_ID, HIT_START_DATE_TIME, HIT_TYPE_ID, 
 NUM_OF_BYTES, RUNNING_TIME_MILLIS, USER_LOGIN_ID, STATUS_ID, REQUEST_URL, 
 REFERRER_URL, SERVER_IP_ADDRESS, SERVER_HOST_NAME, LAST_UPDATED_STAMP, 
 LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP, INTERNAL_CONTENT_ID, 
 PARTY_ID, ID_BY_IP_CONTACT_MECH_ID

[jira] Created: (OFBIZ-3972) user of tenant generate errors on entity Server_Hit

2010-10-01 Thread Pierre Smits (JIRA)
user of tenant generate errors on entity Server_Hit
---

 Key: OFBIZ-3972
 URL: https://issues.apache.org/jira/browse/OFBIZ-3972
 Project: OFBiz
  Issue Type: Bug
  Components: framework
Affects Versions: SVN trunk
Reporter: Pierre Smits
 Fix For: SVN trunk


When a user is active in a tenant and he/she logs off, server_hits are 
generated. However the persistence is rolled back. See excerpt of error.log 
below.

2010-10-01 11:34:12,169 (http-0.0.0.0-8443-5) [   
GenericDelegator.java:889:ERROR] 

 exception report --
Failure in create operation for entity [ServerHit]: 
org.ofbiz.entity.GenericEntityException: Error while inserting: 
[GenericEntity:ServerHit][contentId,catalog.logout(java.lang.String)][createdStamp,2010-10-01
 11:34:12.138(java.sql.Timestamp)][createdTxStamp,2010-10-01 
11:34:12.138(java.sql.Timestamp)][hitStartDateTime,2010-10-01 
11:34:11.732(java.sql.Timestamp)][hitTypeId,REQUEST(java.lang.String)][lastUpdatedStamp,2010-10-01
 11:34:12.138(java.sql.Timestamp)][lastUpdatedTxStamp,2010-10-01 
11:34:12.138(java.sql.Timestamp)][partyId,DEMO55-admin(java.lang.String)][referrerUrl,https://localhost:8443/catalog/control/main?externalLoginKey=EL814028348655(java.lang.String)][requestUrl,https://localhost:8443/catalog/control/logout(java.lang.String)][runningTimeMillis,406(java.lang.Long)][serverHostName,zase(java.lang.String)][serverIpAddress,10.0.0.125(java.lang.String)][userLoginId,DEMO55-admin(java.lang.String)][visitId,10024(java.lang.String)]
 (SQL Exception while executing the following:INSERT INTO OFBIZ.SERVER_HIT 
(VISIT_ID, CONTENT_ID, HIT_START_DATE_TIME, HIT_TYPE_ID, NUM_OF_BYTES, 
RUNNING_TIME_MILLIS, USER_LOGIN_ID, STATUS_ID, REQUEST_URL, REFERRER_URL, 
SERVER_IP_ADDRESS, SERVER_HOST_NAME, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, 
CREATED_STAMP, CREATED_TX_STAMP, INTERNAL_CONTENT_ID, PARTY_ID, 
ID_BY_IP_CONTACT_MECH_ID, REF_BY_WEB_CONTACT_MECH_ID) VALUES (?, ?, ?, ?, ?, ?, 
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'SERVER_HIT' caused 
a violation of foreign key constraint 'SERVER_HIT_USER' for key (DEMO55-admin). 
 The statement has been rolled back.)). Rolling back transaction.
Exception: org.ofbiz.entity.GenericEntityException
Message: Error while inserting: 
[GenericEntity:ServerHit][contentId,catalog.logout(java.lang.String)][createdStamp,2010-10-01
 11:34:12.138(java.sql.Timestamp)][createdTxStamp,2010-10-01 
11:34:12.138(java.sql.Timestamp)][hitStartDateTime,2010-10-01 
11:34:11.732(java.sql.Timestamp)][hitTypeId,REQUEST(java.lang.String)][lastUpdatedStamp,2010-10-01
 11:34:12.138(java.sql.Timestamp)][lastUpdatedTxStamp,2010-10-01 
11:34:12.138(java.sql.Timestamp)][partyId,DEMO55-admin(java.lang.String)][referrerUrl,https://localhost:8443/catalog/control/main?externalLoginKey=EL814028348655(java.lang.String)][requestUrl,https://localhost:8443/catalog/control/logout(java.lang.String)][runningTimeMillis,406(java.lang.Long)][serverHostName,zase(java.lang.String)][serverIpAddress,10.0.0.125(java.lang.String)][userLoginId,DEMO55-admin(java.lang.String)][visitId,10024(java.lang.String)]
 (SQL Exception while executing the following:INSERT INTO OFBIZ.SERVER_HIT 
(VISIT_ID, CONTENT_ID, HIT_START_DATE_TIME, HIT_TYPE_ID, NUM_OF_BYTES, 
RUNNING_TIME_MILLIS, USER_LOGIN_ID, STATUS_ID, REQUEST_URL, REFERRER_URL, 
SERVER_IP_ADDRESS, SERVER_HOST_NAME, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, 
CREATED_STAMP, CREATED_TX_STAMP, INTERNAL_CONTENT_ID, PARTY_ID, 
ID_BY_IP_CONTACT_MECH_ID, REF_BY_WEB_CONTACT_MECH_ID) VALUES (?, ?, ?, ?, ?, ?, 
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'SERVER_HIT' caused 
a violation of foreign key constraint 'SERVER_HIT_USER' for key (DEMO55-admin). 
 The statement has been rolled back.))
 cause -
Exception: org.ofbiz.entity.GenericDataSourceException
Message: SQL Exception while executing the following:INSERT INTO 
OFBIZ.SERVER_HIT (VISIT_ID, CONTENT_ID, HIT_START_DATE_TIME, HIT_TYPE_ID, 
NUM_OF_BYTES, RUNNING_TIME_MILLIS, USER_LOGIN_ID, STATUS_ID, REQUEST_URL, 
REFERRER_URL, SERVER_IP_ADDRESS, SERVER_HOST_NAME, LAST_UPDATED_STAMP, 
LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP, INTERNAL_CONTENT_ID, 
PARTY_ID, ID_BY_IP_CONTACT_MECH_ID, REF_BY_WEB_CONTACT_MECH_ID) VALUES (?, ?, 
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 
'SERVER_HIT' caused a violation of foreign key constraint 'SERVER_HIT_USER' for 
key (DEMO55-admin).  The statement has been rolled back.)
 cause -
Exception: java.sql.SQLIntegrityConstraintViolationException
Message: INSERT on table 'SERVER_HIT' caused a violation of foreign key 
constraint 'SERVER_HIT_USER' for key (DEMO55-admin