[ https://issues.apache.org/jira/browse/OFBIZ-3972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=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, 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). The statement has been rolled back. > ---- cause --------------------------------------------------------------------- > Exception: org.apache.derby.impl.jdbc.EmbedSQLException > Message: 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.apache.derby.iapi.error.StandardException > Message: 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. > ---- stack trace --------------------------------------------------------------- > ERROR 23503: 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. > org.apache.derby.iapi.error.StandardException.newException(Unknown Source) > org.apache.derby.impl.sql.execute.ForeignKeyRIChecker.doCheck(Unknown Source) > org.apache.derby.impl.sql.execute.GenericRIChecker.doCheck(Unknown Source) > org.apache.derby.impl.sql.execute.RISetChecker.doFKCheck(Unknown Source) > org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source) > org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source) > org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source) > org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source) > org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source) > org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source) > org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(Unknown Source) > org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) > org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) > org.ofbiz.entity.jdbc.SQLProcessor.executeUpdate(SQLProcessor.java:420) > org.ofbiz.entity.datasource.GenericDAO.singleInsert(GenericDAO.java:173) > org.ofbiz.entity.datasource.GenericDAO.insert(GenericDAO.java:115) > org.ofbiz.entity.datasource.GenericHelperDAO.create(GenericHelperDAO.java:64) > org.ofbiz.entity.GenericDelegator.create(GenericDelegator.java:867) > org.ofbiz.entity.GenericDelegator.create(GenericDelegator.java:733) > org.ofbiz.entity.GenericValue.create(GenericValue.java:125) > org.ofbiz.webapp.stats.ServerHitBin.saveHit(ServerHitBin.java:701) > org.ofbiz.webapp.stats.ServerHitBin.countHit(ServerHitBin.java:218) > org.ofbiz.webapp.stats.ServerHitBin.countHit(ServerHitBin.java:84) > org.ofbiz.webapp.stats.ServerHitBin.countRequest(ServerHitBin.java:62) > org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:318) > javax.servlet.http.HttpServlet.service(HttpServlet.java:617) > javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) > org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:271) > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555) > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857) > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) > org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) > java.lang.Thread.run(Thread.java:619) > -------------------------------------------------------------------------------- -- 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 |