[Hibernate-JIRA] Created: (HHH-5019) @TableGenerator throws Unsupported exception - error performing isolated work
by Rohini (JIRA)
@TableGenerator throws Unsupported exception - error performing isolated work
-----------------------------------------------------------------------------
Key: HHH-5019
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5019
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.3.1, 3.3.0.SP1, 3.3.0.GA, 3.3.0.CR2, 3.3.0.CR1, 3.2.7, 3.2.6, 3.2.5, 3.2.4.sp1, 3.2.4, 3.2.3, 3.2.2, 3.2.1
Environment: Hibernate Core 3.3.1, MySQL, Websphere 6.1 with EJB3.0 Feature pack
Reporter: Rohini
While implementing GenerationType.TABLE strategy with Hibernate as the persistence provider, id generation throws
javax.persistence.PersistenceException: org.hibernate.HibernateException: error performing isolated work
[3/18/10 14:40:41:533 IST] 0000002d SystemErr R at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614)
--------------------------------------------------------------
3/18/10 14:40:41:533 IST] 0000002d SystemErr R Caused by: org.hibernate.HibernateException: error performing isolated work
at org.hibernate.engine.transaction.Isolater$JtaDelegate.delegateWork(Isolater.java:166)
at org.hibernate.engine.transaction.Isolater.doIsolatedWork(Isolater.java:64)
at org.hibernate.engine.TransactionHelper.doWorkInNewTransaction(TransactionHelper.java:74)
at org.hibernate.id.MultipleHiLoPerTableGenerator.generate(MultipleHiLoPerTableGenerator.java:210)
Looking at the
Isolater.doIsolatedWork( work, session );, implementation
try {
// First we need to suspend any current JTA transaction and obtain
// a JDBC connection
surroundingTransaction = transactionManager.suspend();
if ( log.isDebugEnabled() ) {
log.debug( "surrounding JTA transaction suspended [" + surroundingTransaction + "]" );
}
This happnes only with WebsphereExtendedTransactionManagerLookup as the hibernate.transaction.manager_lookup_class.
--
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
13 years, 8 months
[Hibernate-JIRA] Created: (HHH-5566) Clob column are not getting updated, even if there is real updated in the Clob data, when we do merge operation
by Srinivasa Rao Yedluri (JIRA)
Clob column are not getting updated, even if there is real updated in the Clob data, when we do merge operation
---------------------------------------------------------------------------------------------------------------
Key: HHH-5566
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5566
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.3.2
Environment: Spring2.5.6, Hibernate3.3.2, Weblogic10.3.1, Red Hat Linux, Oracle10G
Reporter: Srinivasa Rao Yedluri
Below is the hbm file snippet
<hibernate-mapping>
<class name="......OrderLineDTO"
table="ORDER_LINES" dynamic-update="true">
<id name="lineId" type="long" column="LINE_ID" length="15">
<generator class="sequence">
<param name="sequence">xyz</param>
</generator>
</id>
..................................
..................................
..................
<property name="installationDetailClob" type="clob" column="ORDER_LINE_ATTRIBUTES_MAP"
not-null="false" lazy="true" />
<property name="attathmentMetadataClob" type="clob" column="ORDER_ATTACHMENT_METADATA"
not-null="false" lazy="true"/>
<!-- Associations -->
<!-- bi-directional many-to-one association to OrderHeader -->
<many-to-one name="orderHeader"
class="......"
fetch="select">
<column name="HEADER_ID" not-null="true" length="15" />
</many-to-one>
<!--
bi-directional many-to-one association to SmartHand
-->
<set name="smartHands" inverse="true" lazy="false"
cascade="all,delete-orphan">
<key>
<column name="LINE_ID" /><!-- a foreign key in SMART_HANDS referencing the primary key of this table.
-->
</key>
<one-to-many
class="...................SmartHandDTO" />
</set>
</class>
</hibernate-mapping>
DAO Code snippet:
public void update(OrderHeaderDTO orderHeaderDTO)
throws DataAccessException {
getOrdersHibernateTemplate().merge(orderHeaderDTO);
}
1. Create a table with clob column and have some other columns. Have one column with timestamp.
2. Insert a record in to it.
3. Now create detached object with new operator and populate all the information programatically including pk. Populate clob column and timestamp with different data than already persisted data.
3. Now do merg operation on this object, we find only timestamp column is part of update query but not clob column.
Please let me know if you need any more details.
--
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
13 years, 8 months
[Hibernate-JIRA] Created: (HV-376) validateValue() and validateProperty() are too restrictive regarding processable property names
by Gunnar Morling (JIRA)
validateValue() and validateProperty() are too restrictive regarding processable property names
-----------------------------------------------------------------------------------------------
Key: HV-376
URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-376
Project: Hibernate Validator
Issue Type: Bug
Components: engine
Affects Versions: 4.1.0.Final
Reporter: Gunnar Morling
Assignee: Hardy Ferentschik
Priority: Minor
The methods Validator#validateValue() and Validator#validateProperty() expect the name of a bean property, for which constraint validation should be performed.
Currently not all valid Java property (field/method) identifiers are supported here, as the specified property name is processed in PathImpl with a regular expression, that matches only the word character class (A-Za-z0-9_), causing the evaluation of uncommon but yet valid property names such as the following ones to fail:
* private String höchstBetrag; // German Umlaute such as "ö" are allowed in Java identifiers
* private String €Amount; // some currency signs such as "€" are allowed, sigh
* private String höchst\u00f6Betrag; // specifying letters such as "ö" using Unicode is allowed
Trying to do so results in the following exception:
{code:java}
java.lang.IllegalArgumentException: Unable to parse property path ö
at org.hibernate.validator.engine.PathImpl.parseProperty(PathImpl.java:216)
at org.hibernate.validator.engine.PathImpl.createPathFromString(PathImpl.java:64)
at org.hibernate.validator.engine.ValidatorImpl.validateValue(ValidatorImpl.java:152)
{code}
More information on the identifiers allowed in the Java language can be found in [JLS, chapter 3.8|http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#3.8].
--
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
13 years, 8 months
[Hibernate-JIRA] Created: (HHH-5057) ScrollableResults does not fetch many-to-many collections
by Jérôme Van Der Linden (JIRA)
ScrollableResults does not fetch many-to-many collections
---------------------------------------------------------
Key: HHH-5057
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5057
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.3.2
Reporter: Jérôme Van Der Linden
Priority: Blocker
I have a many-to-many relation between two objects :
{code:title=Project.java|borderStyle=solid}
@Entity
public class Project {
private List<Viperson> managers;
@ManyToMany(targetEntity = Viperson.class)
@JoinTable(name = "PRJMANAGER", joinColumns = @JoinColumn(name = "PROJECTID", nullable = false), inverseJoinColumns = @JoinColumn(name = "VIPID", nullable = false))
public List<Viperson> getManagers() {
return managers;
}
}
{code}
{code:title=Viperson.java|borderStyle=solid}
@Entity
public class Viperson {
private List<Project> projects;
@ManyToMany(mappedBy = "managers", targetEntity = Project.class)
public List<Project> getProjects() {
return projects;
}
}
{code}
And the following test (actually, it is a code from spring batch HibernateCursorItemReader I put in a testcase) :
{code}
@Test
public void testSelectAll() {
StatelessSession statelessSession = sessionFactory.openStatelessSession();
ScrollableResults cursor = statelessSession.createQuery("from Project").scroll();
Object[] data = null;
if (cursor.next()) {
data = cursor.get();
}
}
{code}
data contains a {{Project}} but {{managers}} field is *null*, +even if I add eager fetching+. I have also a {{OneToMany}} in the {{Project}} class. This one is well loaded (i have a {{PersistentBag}}).
Is there anything I miss ? I suspect a bug on that.
--
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
13 years, 8 months
[Hibernate-JIRA] Created: (ANN-843) Version increment not triggered on @OneToOne property modification having inverse owner
by Guenther Demetz (JIRA)
Version increment not triggered on @OneToOne property modification having inverse owner
---------------------------------------------------------------------------------------
Key: ANN-843
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-843
Project: Hibernate Annotations
Issue Type: Bug
Affects Versions: 3.4.0.GA
Environment: Hibernate 3.3.1.GA , Microsoft SQL Server
Reporter: Guenther Demetz
Priority: Minor
Attachments: Testcase.jar
In the revised "Java Persistence with Hibernate" book by Christian Bauer and Gavin King on page 464
there's written following about versioning:
"If you use Hibernate as JPA provider ... every value-typed property modification .. triggers a version increment."
Now I saw that Version increment indeed is not triggered on @OneToOne properties having an inverse owner (= mappedBy setted).
This allows several concurrent transactions to set the association from same object towards different targets without having a OptimistickLockException at commit.
This violates the ToOne policy! (Hibernate detects the inconsistency later when loading the property from database:
org.hibernate.HibernateException: More than one row with the given identifier was found)
Please see attached junit-testcase for reproducing the problem.
regards
Guenther Demetz
--
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
13 years, 8 months