Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.1.1
-
Fix Version/s: 1.1.1
-
Component/s: Reporting (Outbound Datafeeds)
-
Labels:None
-
Environment:
BUILD DETAILS :
smb-datafeed-ear-1.1.1-SNAPSHOT-p72-t20120214-172232-CI.ear
Description
Optus_Datafeed:Sending SOAP Datafeed service request throws Exception - 'Error updating batch Duplicate entry '10' for key 'PRIMARY'
Prerequisite:
1.Campaign are deployed though AdmaxDeploymentService:
A) mysql> select * from tsacommon.searchEngineAccounts where accountID=5860;
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
id | accountID | distributionID | searchEngineUserID | description | shortCode | paused | searchEngineIdentifier | searchEngineScope | inContent | enabled | useConversionData | searchEngineStatus | searchEngineStatusText | budgetType | budgetAmount | lastChecked | networkType | contentType | biddingStrategy |
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
405751 | 5860 | 3 | 57227 | 12568678_2000062_22770_888888_GT | NULL | false | 571100 | true | true | false | disabled | Paused | dailyDivide | 1.06 | NULL | GoogleSearch,SearchNetwork,ContentNetwork | AllPlacements |
405752 | 5860 | 3 | 57227 | 12568678_2000062_22770_888888_GM | NULL | false | 571101 | false | true | false | disabled | Paused | dailyDivide | 1.06 | NULL | GoogleSearch,SearchNetwork | None |
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)
mysql> update tsacommon.searchEngineAccounts set searchEngineStatus='ok' where id=405751;
Query OK, 1 row affected (0.01 sec)
Rows matched: 1 Changed: 1 Warnings: 0
B)[gsingh@optus-qa-agency1 ~]$ mysql -uspike -ptar63t -h acctdb-01-write -P3307
update admaxCampaignBudgetAccrualStatus set startDate='2012-01-1' where id>5;
update admaxNominalMonthlyBudgets set startDate='2012-01-1' where id>5;
2.Ran Admax script.
[tsaapp@optus-qa-agency1 bidmgr]$ ./admax.sh -d 3 -T2012-01-02 -a 5860
=====================================================================================================
1.Send SOAP Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dat="http://www.thesearchagency.com/smb/DataFeedService/">
<soapenv:Header/>
<soapenv:Body>
<dat:executeJobFromFileSystemRepository>
<!-Optional:->
<job name="Job 1">
<!-Optional:->
<variables>
<!-Zero or more repetitions:->
<variable key="START_DATE" value="2011-12-31"/>
<variable key="END_DATE" value="2012-01-05"/>
</variables>
</job>
</dat:executeJobFromFileSystemRepository>
</soapenv:Body>
</soapenv:Envelope>
2.SOAP RESPONSE:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>There were errors during Job execution.</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>
3. JBoss log shows exception ===Detailed log attached===
10:03:28,531 INFO [STDOUT] INFO 16-02 10:03:28,531 - Table output - Prepared statement : INSERT INTO dfStructureAdMaxCampaigns (id, accountID, description, businessAreaID, businessLocationID) VALUES ( ?, ?, ?, ?, ?)
10:03:28,550 INFO [STDOUT] ERROR 16-02 10:03:28,550 - Table output - Unexpected batch update error committing the database connection.
10:03:28,550 INFO [STDOUT] ERROR 16-02 10:03:28,550 - Table output - org.pentaho.di.core.exception.KettleDatabaseBatchException:
Error updating batch
Duplicate entry '10' for key 'PRIMARY'
at org.pentaho.di.core.database.Database.emptyAndCommit(Database.java:1494)
at org.pentaho.di.trans.steps.tableoutput.TableOutput.dispose(TableOutput.java:647)
at org.pentaho.di.trans.step.RunThread.run(RunThread.java:69)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.sql.BatchUpdateException: Duplicate entry '10' for key 'PRIMARY'
at com.mysql.jdbc.ServerPreparedStatement.executeBatchSerially(ServerPreparedStatement.java:796)
at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1449)
at org.pentaho.di.core.database.Database.emptyAndCommit(Database.java:1477)