Ok, I managed to workaround the duplicate primary key SERVER_HIT logging problem by turning off logging in ./framework/webapp/config/serverstats.properties ; no idea what the root cause is (bug?) but I don't need the logging for the testing I'm doing.
Now I can finally create an order with the service product (creating a facility and adding it to the product despite it being a service seems to have resolved the problem). Thanks. Morten On Fri, Sep 18, 2015 at 9:47 AM, Morten Jensen <[email protected]> wrote: > Thanks for your response, much appreciated. To rectify I created a new > facility and assigned the product to the facility in the facilities tab. > > However, after doing so I am now suddenly having another problem (insert > into a SERVER_HIT table, which appears to log user activity) that prevents > me from even searching for products when attempting to create an Order > Entry and can't seem to get rid of the Exception: > > 2015-09-18 07:59:02,134 |-0.0.0.0-8443-exec-1 > |ControlServlet |T| [[[LookupSupplierProduct(Domain: > https://192.168.0.154)] Request Begun, encoding=[UTF-8]- total:0.0,since > last(Begin):0.0]] > 2015-09-18 07:59:02,139 |-0.0.0.0-8443-exec-1 > |RequestHandler |I| Rendering View [LookupSupplierProduct], > sessionId=3B1742E9EC7E6A196D9AF46CE0AF484F.jvm1 > 2015-09-18 07:59:02,142 |-0.0.0.0-8443-exec-1 > |ServiceDispatcher |T| Sync service > [order/catalogPermissionCheck] finished in [1] milliseconds > 2015-09-18 07:59:02,143 |-0.0.0.0-8443-exec-1 > |ServiceDispatcher |T| Sync service > [order/getUserPreferenceGroup] finished in [1] milliseconds > 2015-09-18 07:59:02,151 |-0.0.0.0-8443-exec-1 > |ServiceDispatcher |T| Sync service [order/executeFind] > finished in [1] milliseconds > 2015-09-18 07:59:02,151 |-0.0.0.0-8443-exec-1 > |ServiceDispatcher |T| Sync service [order/performFind] > finished in [2] milliseconds > 2015-09-18 07:59:02,157 |-0.0.0.0-8443-exec-1 > |ServerHitBin |I| Visit delegatorName=default, > ServerHitBin delegatorName=default > 2015-09-18 07:59:02,158 |-0.0.0.0-8443-exec-1 > |GenericDelegator |E| Failure in create operation for entity > [ServerHit]: org.ofbiz.entity.GenericEntityException: Error while > inserting: > [GenericEntity:ServerHit][contentId,ordermgr.LookupSupplierProduct(java.lang.String)][createdStamp,2015-09-18 > 07:59:02.157(java.sql.Timestamp)][createdTxStamp,2015-09-18 > 07:59:02.157(java.sql.Timestamp)][hitStartDateTime,2015-09-18 > 07:59:02.134(java.sql.Timestamp)][hitTypeId,REQUEST(java.lang.String)][lastUpdatedStamp,2015-09-18 > 07:59:02.157(java.sql.Timestamp)][lastUpdatedTxStamp,2015-09-18 > 07:59:02.157(java.sql.Timestamp)][partyId,admin(java.lang.String)][referrerUrl, > https://192.168.0.154:8443/ordermgr/control/BulkAddProducts(java.lang.String)][requestUrl,https://192.168.0.154:8443/ordermgr/control/LookupSupplierProduct(java.lang.String)][runningTimeMillis,22(java.lang.Long)][serverHostName,ofbiz-dev(java.lang.String)][serverIpAddress,127.0.1.1(java.lang.String)][userLoginId,admin(java.lang.String)][visitId,10601(java.lang.String)] > (SQL Exception while executing the following:INSERT INTO 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 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, > ?, ?, ?, ?, ?, ?, ?) (Duplicate entry > '10601-ordermgr.LookupSupplierProduct-2015-09-18 07:59:02-REQUEST' for key > 'PRIMARY')). Rolling back transaction. > > I have tried clearing the SERVER_HIT table to no avail. > > Any ideas as to what is going on here - looks like I'm involuntarily > digging a deeper hole for myself here..? > > Thanks. > Morten > > > >> Oleg Andreyev Sep 16, 2015; 9:02am >> Re: Problem with order creation with service order line >> Hi, >> >> Unfortunately such message appears if reservation service is failed, even >> if the reason is not related to product setup or quantity in stock. >> The real error message is: " Incoming context (in runSync : >> reserveProductInventoryByFacility) does not match expected requirements >> org.ofbiz.service.ServiceValidationException: The following required >> parameter is missing: [reserveProductInventoryByFacility.facilityId] " >> >> Attribute facilityId is not provided to service >> reserveProductInventoryByFacility and this is the real cause. You may want >> to check inventory facility in product store. >> >> >> >> >> >> >
