[Hibernate-JIRA] Created: (HHH-3467) Constraint Violation Exception while inserting clob data in multiple iteration
by Maruthi S (JIRA)
Constraint Violation Exception while inserting clob data in multiple iteration
------------------------------------------------------------------------------
Key: HHH-3467
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3467
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.2.4
Environment: Hibernate 3.2.4 ga , Oracle 10g
Reporter: Maruthi S
Following Exception occurs while inserting clob data into a table with high number of iterations. The primary key violation mentioned in the exception is a sequence where it can be never duplicated. As a temporary work around, when Constraint violation exception occurs, I used JDBC connection to insert the data. Kindly treat this bug as a very critical bug.
org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize database state with session
org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:253)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:237)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at com.citi.cmb.gce.admin.db.daoimpl.InterfaceDaoImpl.insertInterfaceDetails(InterfaceDaoImpl.java:333)
at com.citi.cmb.gce.admin.pojo.InterfaceService.insertInterfaceDetails(InterfaceService.java:118)
at com.citi.cmb.gce.admin.ejbs.InterfaceMDBBean.onMessage(InterfaceMDBBean.java:62)
at com.ibm.ejs.container.MessageEndpointHandler.invokeMdbMethod(MessageEndpointHandler.java:1014)
at com.ibm.ejs.container.MessageEndpointHandler.invoke(MessageEndpointHandler.java:747)
at $Proxy8.onMessage(Unknown Source)
at com.ibm.ws.sib.api.jmsra.impl.JmsJcaEndpointInvokerImpl.invokeEndpoint(JmsJcaEndpointInvokerImpl.java:201)
at com.ibm.ws.sib.ra.inbound.impl.SibRaDispatcher.dispatch(SibRaDispatcher.java:768)
at com.ibm.ws.sib.ra.inbound.impl.SibRaSingleProcessListener$SibRaWork.run(SibRaSingleProcessListener.java:584)
at com.ibm.ejs.j2c.work.WorkProxy.run(WorkProxy.java:419)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
Caused by: java.sql.BatchUpdateException: ORA-00001: unique constraint (ADMIN.INTERFACE_PK) violated
at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:367)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:8739)
at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.pmiExecuteBatch(WSJdbcPreparedStatement.java:808)
at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.executeBatch(WSJdbcStatement.java:612)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 4 months
[Hibernate-JIRA] Created: (HHH-3451) Boss / sub-ordinate relation
by PANDITHA L (JIRA)
Boss / sub-ordinate relation
----------------------------
Key: HHH-3451
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3451
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.3.0.GA
Environment: JSF JBOSS Hibernate
Reporter: PANDITHA L
Priority: Trivial
I have an employee table and corresponding Class defined with hbm.xml file. I am using a uniq column (user_id) which is not primary key as my requirement demands it.
The problem is this table contains a filed boss_01 which references to user_id so making it one-to-many (i.e user_id to boss_01) mapping on self table.
Now how can I access the sub-ordinates(childs) of a given employee? I tried in the below fashion.
<class name="mfhr.tables.Employee" table="user">
<id name="id" column="ID_" type="java.lang.Long">
<generator class="increment"/>
</id>
<property name="user_id" column="user_id" type="java.lang.String" />
<many-to-one name="boss_01"
column="boss_01"
class="mfhr.tables.Employee"
property-ref="user_id"
not-null="true" />
<set name="children">
<key column="boss_01" property-ref="user_id" />
<one-to-many class="mfhr.tables.Employee" />
</set>
</class>
but, When checked in db logs sql is trying to select childs with primary key column rather than user_id.
Any help in this regard.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 4 months
[Hibernate-JIRA] Created: (HHH-3469) Prepared Statement Handling Different Between 3.2.6 and 3.3 SP1
by Shawn Clowater (JIRA)
Prepared Statement Handling Different Between 3.2.6 and 3.3 SP1
---------------------------------------------------------------
Key: HHH-3469
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3469
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.3.0.SP1
Environment: Hib 3.3.0 SP1, Oracle 9i with Oracle 11g JDBC driver (11.1.0.6)
Reporter: Shawn Clowater
Priority: Minor
Attachments: StatementLeakTest.patch
I'm not sure if this is really a bug per se but when upgrading our code from Hibernate 3.2.6 to 3.3 SP1 I suddenly started to encounter the following exception from Oracle:
java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
ORA-01000: maximum open cursors exceeded
At first I thought it was directly related to the deprecation of the connection() method as we're doing some manual JDBC access piggybacked off the connection from the currentSession(). After digging around quite a bit and trying to isolate it to a specific location it turned out that we have at least one case where a PreparedStatement that we manually create wasn't being closed which is definitely a bug on our side. What struck me as funny as we hadn't encountered any issue with it previously.
I've attached a simple test case that is simply opening a session and prepared statement, executing it and then not closing it. I can run the test all day long (well, for 1000000+ iterations) w/o a blip with the 3.2.6 release. With 3.3 it maxes out at 500 (our current cursor configuration).
I'm not sure what is different across the 2 versions but you can see from the test, the hold on the cursor exists past the transaction commit and also the close of the session. Closing the statement (the proper thing to do anyways) allows the test to run w/o a hitch.
I just wanted to illustrate that the behavior is different between the 2 releases and ensure that it was intentional and isn't a result of some bug in the internals that I haven't been able to pinpoint.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 4 months
[Hibernate-JIRA] Assigned: (HBX-524) Reverse of one-to-one relationships
by Max Rydahl Andersen (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-524?page=co... ]
Max Rydahl Andersen reassigned HBX-524:
---------------------------------------
Assignee: Anthony Patricio (was: Max Rydahl Andersen)
> Reverse of one-to-one relationships
> -----------------------------------
>
> Key: HBX-524
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-524
> Project: Hibernate Tools
> Issue Type: Bug
> Components: reverse-engineer
> Affects Versions: 3.1beta2
> Environment: HIbernate 3.1, Oracle 9i
> Reporter: Andrea Cattani
> Assignee: Anthony Patricio
> Attachments: one-to-one-marcio.patch, patch.txt
>
>
> Hi,
> I've posted this issue to the forum and got this response from Max, Hibernate Team:
> "the reveng tools does not detect this as a one-to-one. it probably could, so add a request/patch to jira."
> The problem I've faced is the following:
> I have two tables, let's say
> - table A with column ID (PK) and other fields
> - table B with column ID (PK) and other fields
> table B has a foreign key constraint against table A, from column ID to column ID (one-to-one)
> When I reverese the tables with the HibernateTools I have such a resultant mapping for table B:
> <class name="B" table="B" schema="SCHEMA">
> <id name="id" type="string">
> <column name="ID" length="12" />
> <generator class="assigned" />
> </id>
> <[b]many-to-one name[/b]="a" class="A" update="false" insert="false" fetch="select">
> <column name="ID" length="12" not-null="true" unique="true" />
> </many-to-one>
> ....
> And this one for table A:
> <class name="A" table="A" schema="SCHEMA">
> <id name="id" type="string">
> <column name="ID" length="12" />
> <generator class="assigned"/>
> </id>
> <set name="b" inverse="true">
> <key>
> <column name="ID" length="12" not-null="true" unique="true" />
> </key>
> <[b]one-to-many[/b] class="B" />
> </set>
> </class>
> while I was expecting something like:
> [i]<one-to-one name="a" class="A" constrained="true"/>[/i]
> in table B, and the same (or nothing) in table A
> Thank you
> Andi
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 4 months