[Hibernate-JIRA] Created: (ANN-798) TransactionTest is leaving some transaction opened after its execution, causing DB2 to hang
by Juraci Paixao Krohling (JIRA)
TransactionTest is leaving some transaction opened after its execution, causing DB2 to hang
-------------------------------------------------------------------------------------------
Key: ANN-798
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-798
Project: Hibernate Annotations
Issue Type: Bug
Environment: DB2 and Annotations branch v3_2_1_GA_CP
Reporter: Juraci Paixao Krohling
The first test to be executed after TransactionTest hangs forever, waiting for some transaction to be closed.
The line 32 for org.hibernate.test.annotations.TestCase is the place where it hangs, so, you can add "getSessions().close()" to the end of testTransactionCommit from TransactionTest to simulate this problem without running multiple tests.
As far as I could find, the transaction is not explicit and is "opened" in the last block of assertions in the test testTransactionCommit, between lines 43 and 50 of TransactionTest. If this part is commented out (or skipped) for DB2, everything else works fine.
I suspect this is a problem with the test case, and that this last part of the test should be skipped for DB2, but as I could not find the exact root cause of this failure, I'll leave this as a bug for now.
--
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, 6 months
[Hibernate-JIRA] Created: (HHH-3621) Assertion failure in MigrationTest
by Juraci Paixao Krohling (JIRA)
Assertion failure in MigrationTest
----------------------------------
Key: HHH-3621
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3621
Project: Hibernate Core
Issue Type: Bug
Components: testsuite
Affects Versions: 3.3.x
Environment: Oracle 9i/Oracle 10g/Sybase 12/MySQL and Branch_3_3
Reporter: Juraci Paixao Krohling
The test testSimpleColumnAddition (org.hibernate.test.schemaupdate.MigrationTest) fails due to an assertion failure.
It seems something related to the environment, but as the tests are running without changes from SVN, it needs to be fixed. The tests are running using to the profiles specified in the "testsuite" maven configuration file.
Stack trace:
junit.framework.AssertionFailedError: expected:<0> but was:<1>
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.failNotEquals(Assert.java:277)
at junit.framework.Assert.assertEquals(Assert.java:64)
at junit.framework.Assert.assertEquals(Assert.java:195)
at junit.framework.Assert.assertEquals(Assert.java:201)
at org.hibernate.test.schemaupdate.MigrationTest.testSimpleColumnAddition(MigrationTest.java:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at org.hibernate.junit.UnitTestCase.runBare(UnitTestCase.java:63)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
--
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, 6 months
[Hibernate-JIRA] Created: (HHH-3719) Javassist fails to instrument valid classes in certain cases
by Paul Pogonyshev (JIRA)
Javassist fails to instrument valid classes in certain cases
------------------------------------------------------------
Key: HHH-3719
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3719
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.3.1
Environment: Javassist 3.4.GA (also tested with 3.9.GA)
Reporter: Paul Pogonyshev
Priority: Minor
In certain cases Javassist fails with the following message: "duplicate method: getId in org.hibernate.proxy.HibernateProxy_$$_javassist_0".
I was able to trace the problem down to the following simple case.
public interface Identifiable <Type>
{ Type getId (); }
public interface Entity extends Identifiable <Long>
{ Long getId (); }
public class EntityImpl implements Entity
{
private Long id;
public Long getId ()
{ return id; }
void setId (Long id)
{ this.id = id; }
}
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="EntityImpl"
proxy="Entity">
<id name="id"/>
</class>
</hibernate-mapping>
Note that at least generics in definition of Identifiable interface and specifying proxy interface in the mapping seems important. Easy workaround seems to just not explicitly redefine getId() in Entity interface, i.e. just keep the one (same one) gotten from Identifiable. However, _finding_ this workaround was by no means easy.
As I know, Java compiler removes generics information from compiled code, so the two methods might indeed appear different (i.e. as Objecte getId() and Long getId() correspondingly). Maybe Javassist could just disable duplicate method checks in generated classes for the cases when _both_ methods come from the wrapped class?
I'm not sure this is the right tracker, but I couldn't find one for Javassist.
--
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, 6 months