[JBoss JIRA] (WFLY-7533) hibernate.hbm2ddl.auto value="update" on PostgresSQL 9.4(x86) DB issue with Hibenate 5.1 & Wildfly 10.1.0
by Scott Marlow (Jira)
[ https://issues.jboss.org/browse/WFLY-7533?page=com.atlassian.jira.plugin.... ]
Scott Marlow resolved WFLY-7533.
--------------------------------
Resolution: Out of Date
> hibernate.hbm2ddl.auto value="update" on PostgresSQL 9.4(x86) DB issue with Hibenate 5.1 & Wildfly 10.1.0
> ---------------------------------------------------------------------------------------------------------
>
> Key: WFLY-7533
> URL: https://issues.jboss.org/browse/WFLY-7533
> Project: WildFly
> Issue Type: Bug
> Components: JPA / Hibernate
> Affects Versions: 10.1.0.Final
> Reporter: Parag Goyal
> Assignee: Scott Marlow
> Priority: Major
>
> I have an application presently running (without issue) on Wildfly 8.2.1 Final & PostgresSQL 9.4(x86), now we are trying to upgrade our application to WildFly 10.1.0 (Final) with PostgresSQL 9.4(x86). Most of this upgrade is going well but the upgrade from Hibernate 4.3.7 (on Wildfly 8.2.1) to Hibernate 5.0.1 (on WildFly 10.1) is causing an issue.
> Specifically, in persistence.xml we have below property and DB is PostgresSQL 9.4(x86).
> <property name="hibernate.hbm2ddl.auto" value="update"/>
> NOTE: We have not done any schema change or other DB changes with this upgrade and also pointing to same database instance on PostgresSQL 9.4(x86) which was successfully running with Wildfly 8.2.1 instance. Seems <property name="hibernate.hbm2ddl.auto" value="update"/> is behaving like <property name="hibernate.hbm2ddl.auto" value="create"/> and It is trying to create tables which are actually already exists.
> i.e. 1) Erroneously it determines that it needs to create new relation(s).
> 2) Fail to do above step.
>
> Following is stack trace:
> Caused by: javax.persistence.PersistenceException: [PersistenceUnit: cms_layoutmgt] Unable to build Hibernate SessionFactory
> Caused by: org.hibernate.tool.schema.spi.SchemaManagementException: Unable to execute schema management to JDBC target [create table CMS_LAYM_APPLICATIONS (ID serial not null, mCommandLineArg varchar(255), mDescription varchar(4000), mHandleByCaption boolean NOT NULL DEFAULT TRUE, mName varchar(255), mPath varchar(255), mTags varchar(2000), mWindowTitle varchar(255), mWorkingDir varchar(255), Display_Id int4, primary key (ID))]
> Caused by: org.postgresql.util.PSQLException: ERROR: relation \\\"cms_laym_applications\\\" already exists\",
>
> Kindly provide solution for above issue, thanks in advance.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 8 months
[JBoss JIRA] (WFLY-11213) On release of batch it still contained JDBC statements logged
by Scott Marlow (Jira)
[ https://issues.jboss.org/browse/WFLY-11213?page=com.atlassian.jira.plugin... ]
Scott Marlow resolved WFLY-11213.
---------------------------------
Resolution: Duplicate Issue
Closing as duplicate of [HHH-13307]
> On release of batch it still contained JDBC statements logged
> -------------------------------------------------------------
>
> Key: WFLY-11213
> URL: https://issues.jboss.org/browse/WFLY-11213
> Project: WildFly
> Issue Type: Bug
> Components: JPA / Hibernate
> Affects Versions: 14.0.1.Final
> Environment: Java 8_181
> Wildfly 14.0.1.Final
> Reporter: Cody Lerum
> Assignee: Scott Marlow
> Priority: Major
>
> After updating from Wildfly 11 (Hibernate 5.1.10) to Wildfly 14.0.1 (Hibernate 5.3.6) I've started seeing the following log messages
> I’m starting to see the log message
> {code:java}
> 2018-10-17 20:12:47,571 INFO [org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl] (default task-54) HHH000010: On release of batch it still contained JDBC statements
> 2018-10-17 20:12:47,572 ERROR [org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl] (default task-54) HHH000352: Unable to release batch statement...
> {code}
> I’ve debugged where that is getting logged and all I can find is a single statement at the time.
> insert into EventLog (entityId, entityType, ipAddress, message, time, user, id) values (?, ?, ?, ?, ?, ?, ?)
> The only insert that is being created is actually being persisted to the database so this may be a spurious message.
> From my early debugging this appears to happen when 1 entity is persisted which does not need an immediate inset (due to having a generated pk) and then in another method of the same transaction an entity is persisted that does need an immediate insert because of a auto increment pk.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 8 months
[JBoss JIRA] (WFLY-11213) On release of batch it still contained JDBC statements logged
by Scott Marlow (Jira)
[ https://issues.jboss.org/browse/WFLY-11213?page=com.atlassian.jira.plugin... ]
Scott Marlow edited comment on WFLY-11213 at 11/14/19 2:15 PM:
---------------------------------------------------------------
Closing as duplicate of [https://hibernate.atlassian.net/browse/HHH-13307]
was (Author: smarlow):
Closing as duplicate of [HHH-13307]
> On release of batch it still contained JDBC statements logged
> -------------------------------------------------------------
>
> Key: WFLY-11213
> URL: https://issues.jboss.org/browse/WFLY-11213
> Project: WildFly
> Issue Type: Bug
> Components: JPA / Hibernate
> Affects Versions: 14.0.1.Final
> Environment: Java 8_181
> Wildfly 14.0.1.Final
> Reporter: Cody Lerum
> Assignee: Scott Marlow
> Priority: Major
>
> After updating from Wildfly 11 (Hibernate 5.1.10) to Wildfly 14.0.1 (Hibernate 5.3.6) I've started seeing the following log messages
> I’m starting to see the log message
> {code:java}
> 2018-10-17 20:12:47,571 INFO [org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl] (default task-54) HHH000010: On release of batch it still contained JDBC statements
> 2018-10-17 20:12:47,572 ERROR [org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl] (default task-54) HHH000352: Unable to release batch statement...
> {code}
> I’ve debugged where that is getting logged and all I can find is a single statement at the time.
> insert into EventLog (entityId, entityType, ipAddress, message, time, user, id) values (?, ?, ?, ?, ?, ?, ?)
> The only insert that is being created is actually being persisted to the database so this may be a spurious message.
> From my early debugging this appears to happen when 1 entity is persisted which does not need an immediate inset (due to having a generated pk) and then in another method of the same transaction an entity is persisted that does need an immediate insert because of a auto increment pk.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 8 months