core icon indicating copy to clipboard operation
core copied to clipboard

Publish Audit insert failed

Open almontic opened this issue 13 years ago • 10 comments

Publishing 3 bundles from staging to delivery I get on the delivery side the following error:

com.dotcms.publisher.business.DotPublisherException: Unable to add element to publish queue audit table:ORA-00001: unique constraint (DOTCMSALB.SYS_C0051642) violated at com.dotcms.publisher.business.PublishAuditAPIImpl.insertPublishAuditStatus(PublishAuditAPIImpl.java:85) at com.dotcms.publisher.business.PublishAuditAPIImpl.updateAuditTable(PublishAuditAPIImpl.java:320) at com.dotcms.rest.BundlePublisherResource.publish(BundlePublisherResource.java:73)

almontic avatar Apr 09 '13 15:04 almontic

Is this on the latest master? I know your production is not on the lastest master.

On Tue, Apr 9, 2013 at 11:02 AM, almontic [email protected] wrote:

Publishing 3 bundles from staging to delivery I get on the delivery side the following error: com.dotcms.publisher.business.DotPublisherException: Unable to add element to publish queue audit table:ORA-00001: unique constraint (DOTCMSALB.SYS_C0051642) violated

at com.dotcms.publisher.business.PublishAuditAPIImpl.insertPublishAuditStatus(PublishAuditAPIImpl.java:85) at com.dotcms.publisher.business.PublishAuditAPIImpl.updateAuditTable(PublishAuditAPIImpl.java:320) at com.dotcms.rest.BundlePublisherResource.publish(BundlePublisherResource.java:73)

— Reply to this email directly or view it on GitHubhttps://github.com/dotCMS/dotCMS/issues/2562 .

dotcmsCodeReview avatar Apr 09 '13 15:04 dotcmsCodeReview

I updated the master this morning and checking now I don't see any changes to the PublishAudit code

almontic avatar Apr 09 '13 15:04 almontic

@almontic I cannot reproduce this. My guess is you are publishing a bundle that is already published. This will cause this.

If you can get me reproducible steps from a starter site or a bundle that can be loaded once from a start site or something I can look more into it but I think the case is that you cannot publish a bundle that was already published or something like that.

jtesser avatar Apr 09 '13 16:04 jtesser

Here the steps:

  • Create 3 different bundles on the staging side
  • When publication process starts on the delivery side I get the error

In any case, even if I publish the same bundle, it could be better to add a control in the update method that checks if the record exists or not

almontic avatar Apr 09 '13 16:04 almontic

@almontic you can reproduce this locally? I cannot. That is why I am asking you for steps. Maybe something is strange about the data in your Production DB. Unless you can get me the DB I need you to do a little more leg work here as I cannot reproduce using those steps. I can publish many bundles.

jtesser avatar Apr 09 '13 16:04 jtesser

The steps I provided are the same of the previous message. Maybe with a big bundles that take a lot of time for publishing, you can reproduce the error. I'm sorry, but I can't help you in a better way

almontic avatar Apr 09 '13 17:04 almontic

@almontic I am still wondering where you able to reproduce locally. I need you to do this for me to help me be able to help you.

For now I cannot reproduce and we are not working towards a fix. If you can help us reproduce I am happy to work towards a fix.

jtesser avatar Apr 09 '13 17:04 jtesser

I see a PublishAuditAPI.getInstance().insertPublishAuditStatus(status); without a check if there is a record already for that bundle. so it is just bad data bugging us. I'm gonna insert code there to update the record if it exists and insert as we do now if it doesn't

dotjorgeu avatar Apr 15 '13 17:04 dotjorgeu

@almontic this should be up now.

jtesser avatar Apr 15 '13 17:04 jtesser

added to test scripts

DeanGonzalez avatar Apr 15 '13 20:04 DeanGonzalez