Note that there are some explanatory texts on larger screens.

plurals
  1. POJava Hibernate Envers UpdateLockingStrategy warning HHH000416 On AuditTable
    text
    copied!<p>Hi we have a server running with Hibernate the classes are audited with envers. Like this :</p> <pre><code>package db.shared; import interfaces.GuiEditableTable; import interfaces.ListableEntity; import interfaces.ShortDescriptable; import java.util.HashSet; import java.util.Set; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.OneToMany; import javax.persistence.Table; import javax.persistence.UniqueConstraint; import javax.persistence.Version; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; import org.hibernate.annotations.Cascade; import org.hibernate.annotations.CascadeType; import org.hibernate.envers.AuditTable; import org.hibernate.envers.Audited; import common.Identifiable; import common.Preferences; import common.entity.EntityConcurrency; @Entity @Cache(usage = CacheConcurrencyStrategy.READ_WRITE) @Audited @AuditTable(schema=Preferences.SCHEMA_AUDIT, value=Lizenz.CLASS_NAME+Preferences.AUDIT_SUFFIX) @Table(schema = Preferences.SCHEMA_SHARED, uniqueConstraints = { @UniqueConstraint(columnNames = { Lizenz.PROPERTY_LIZENZ_NAME }), @UniqueConstraint(columnNames = { Lizenz.PROPERTY_LIZENZ_NUMBER }) }) public class Lizenz extends common.entity.AbstractEntity implements EntityConcurrency, ListableEntity, ShortDescriptable, GuiEditableTable { private static final long serialVersionUID = 589201271279697573L; public static final String CLASS_NAME = "Lizenz"; public static final String PROPERTY_LIZENZ_NAME = "lizenzName"; public static final String PROPERTY_LIZENZ_NUMBER = "lizenzNummer"; public static final String MTM_PROPERTY_NAME = "lizenz"; public static final int LIZENZ_NUMBER_PADDING = 4; @Id @Column(name = Identifiable.PROPERTY_ID, columnDefinition = Preferences.DDL_TYPE_ID) @GeneratedValue(strategy = GenerationType.IDENTITY) private long ID; @Version @Column(name = EntityConcurrency.PROPERTY_VERSION) private long version; private String lizenzName; private String logo; . . . } </code></pre> <p>At the serverstart there warnings like that:</p> <pre><code>15:14:49 WARN [org.hibernate.dialect.lock.UpdateLockingStrategy] HHH000416: Write locks via update not supported for non-versioned entities [db.shared.Lizenz_AUD] 15:14:49 WARN [org.hibernate.dialect.lock.UpdateLockingStrategy] HHH000416: Write locks via update not supported for non-versioned entities [db.shared.Lizenz_AUD] 15:14:49 WARN [org.hibernate.dialect.lock.UpdateLockingStrategy] HHH000416: Write locks via update not supported for non-versioned entities [db.shared.Lizenz_AUD] 15:14:49 WARN [org.hibernate.dialect.lock.PessimisticReadUpdateLockingStrategy] HHH000416: Write locks via update not supported for non-versioned entities [db.shared.Lizenz_AUD] 15:14:49 WARN [org.hibernate.dialect.lock.PessimisticWriteUpdateLockingStrategy] HHH000416: Write locks via update not supported for non-versioned entities [db.shared.Lizenz_AUD] </code></pre> <p>The Problem is that we are only have created the DB-Table for the Audit, we haven't any Audit-Classes. The Classes will be generated at startup, and we haven't found any @audit-Options to suppress these warnings. The Warnings are irrelevant for us because only write an Audit-entry once and never update it, and 5 warnings per class are flooding our log.</p> <p>We are using hibernate-envers-4.1.10.Final.jar and hibernate-core-4.1.10.Final.jar with java 1.7.</p> <p>Does anyone have the same problem or know howto fix it. we are grateful for any Help.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload