6

Got this error when publishing css file:

Phase:

Deployment Prepare Commit Phase failed,

Unable to prepare transaction: tcm:0-104418-66560, org.hibernate.exception.ConstraintViolationException: could not insert: [com.tridion.storage.ComponentMeta], org.hibernate.exception.ConstraintViolationException: could not insert: [com.tridion.storage.ComponentMeta],

Unable to prepare transaction: tcm:0-104418-66560, org.hibernate.exception.ConstraintViolationException: could not insert: [com.tridion.storage.ComponentMeta], org.hibernate.exception.ConstraintViolationException: could not insert: [com.tridion.storage.ComponentMeta]

Some of the settings from <Storages> section from cd_storage_conf.xml file:

<Storage Type="persistence" Id="defaultdb" dialect="MSSQL"
         Class="com.tridion.storage.persistence.JPADAOFactory" defaultStorage="true">
  <Pool Type="jdbc" Size="5" MonitorInterval="60" IdleTimeout="120" CheckoutTimeout="120" />
  <DataSource Class="com.microsoft.sqlserver.jdbc.SQLServerDataSource">
    <Property Name="serverName" Value="******" />
    <Property Name="portNumber" Value="1759" />
    <Property Name="databaseName" Value="***" />
    <Property Name="user" Value="****" />
    <Property Name="password" Value="****" />
  </DataSource>
</Storage>

<Storage Type="filesystem" Class="com.tridion.storage.filesystem.FSDAOFactory"
         Id="*****" defaultFilesystem="false">
  <Root Path="C:\inetpub\wwwroot\*****" />
</Storage>

<ItemTypes defaultStorageId="defaultdb" cached="false">

Any help will be highly appreciated.

I haven't tried with any other file.

Many thanks, Vip

7
  • Could you edit your question and provide more information, specifically the <Storages> section of your cd_storage_conf.xml and also does this issue happen for all the items you publish or just a specific one? Commented Oct 25, 2013 at 12:44
  • Thanks Bart for your quick reply. I have now reformatted my question.
    – vip
    Commented Oct 25, 2013 at 13:25
  • Adding the <ItemTypes> mapping from cd_storage_conf.xml could also help, sorry for not asking that earlier. Also you mention you are publishing a css file, is that a Page or a Multimedia Component in SDL Tridion? Commented Oct 25, 2013 at 13:45
  • <ItemTypes defaultStorageId="defaultdb" cached="false">
    – vip
    Commented Oct 25, 2013 at 13:53
  • and css file is actually a page. This page have five components and they are using raw data components template.
    – vip
    Commented Oct 25, 2013 at 13:55

5 Answers 5

0

ConstraintViolationException

This makes me think of an issue with the database version... might be something else, but that's the only case where I usually get this type of errors.

Please double check the version of the Broker database

6

Try applying the cumulative hotfix CD_2011.1.1.83467 from https://www.sdltridionworld.com/ (login required).

As stated, this contains

TT82946 Publish to the deployer fail with the exception "org.hibernate.exception.ConstraintViolationException: could not insert"

In addition, You state...

I haven't tried with any other file

why not try? Perhaps with a file with no Component Presentations to remove that from the equation.

Also - did you recently upgrade? Is this a clean installation?

1
  • Other files work fine.
    – vip
    Commented Oct 28, 2013 at 11:46
5

ConstraintViolationException

I've also seen this when publishing binaries associated to dynamic component templates. The issue was related the use duplicate file names.

This issue actually lead to the development of this tool: https://code.google.com/p/tridion-2011-power-tools/wiki/DuplicateBinaries to ensure that the publication didn't contain binaries with the same file names.

Could it be in your css you are referencing binaries and have some file name conflicts?

2

I have seen a similar error before -- it had to do with the auto id sequence on the database tables, which was wrong.

The fix included working directly on the database tables and altering some SQL statements. Please contact SDL WCM Customer Support to get support on this, because touching the database directly can get you to an unsupported system.

1

I just ran into this problem where every phase was successful except the commit phase. It was resolved when I freed space on the database. There was 0 bytes free.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.