[Hibernate-JIRA] Created: (HHH-5731) Javassist Enhancement fails when JPA Entity has an attribute named "handler"
by Jan Van Bulck (JIRA)
Javassist Enhancement fails when JPA Entity has an attribute named "handler"
----------------------------------------------------------------------------
Key: HHH-5731
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5731
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.5.5
Environment: Hibernate 3.5.5 (I observed the problem in JBoss AS 6 M4 and M5)
(Database MySQL)
Reporter: Jan Van Bulck
I have an Entity called {{HandlerError}}, refering to another Entity called {{Handler}}
The getter {{getHandler()}} causes following problem when I deploy the application to JBoss 6 AS *M4*
{code}
15:49:37,306 ERROR [BasicLazyInitializer] Javassist Enhancement failed: c.u.p.model.HandlerError: java.lang.RuntimeException: duplicate method: getHandler in c.u.p.model.HandlerError_$$_javassist_11
at javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:509) [javassist.jar:6.0.0.20100721-M4]
at javassist.util.proxy.ProxyFactory.createClass2(ProxyFactory.java:486) [javassist.jar:6.0.0.20100721-M4]
at javassist.util.proxy.ProxyFactory.createClass1(ProxyFactory.java:422)
...
Caused by: javassist.bytecode.DuplicateMemberException: duplicate method: getHandler in c.u.p.model.HandlerError_$$_javassist_11
at javassist.bytecode.ClassFile.testExistingMethod(ClassFile.java:637) [javassist.jar:6.0.0.20100721-M4]
...
15:49:37,311 WARN [PojoEntityTuplizer] could not create proxy factory for:com.unifiedpost.payments.model.HandlerError: org.hibernate.HibernateException: Javassist Enhancement failed: c.u.p.model.HandlerError
at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxyFactory(JavassistLazyInitializer.java:170) [:3.5.2-Final]
at org.hibernate.proxy.pojo.javassist.JavassistProxyFactory.postInstantiate(JavassistProxyFactory.java:66) [:3.5.2-Final]
{code}
The same code works well in JBoss 6 AS *M3*.
||JBoss 6 Release||Javassist dependency||
|M3 |javassist-3.11.0.GA.jar|
|M4 |javassist-3.12.1.GA.jar|
|M5 |javassist-3.12.1.GA.jar|
|20101112 |javassist-3.12.1.GA.jar|
In between M3 and M4, following issue has been 'fixed': [JASSIST-97|https://jira.jboss.org/browse/JASSIST-97]
Not sure if it's related, but it looks close given the [patch|https://jira.jboss.org/secure/attachment/12332449/JASSIST-97.patch]
--
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, 2 months
[Hibernate-JIRA] Created: (HHH-5789) Hibernate 3.5.4 doesn't build with OpenJDK 6b18-1.8.2 or greater
by Miguel Landaeta (JIRA)
Hibernate 3.5.4 doesn't build with OpenJDK 6b18-1.8.2 or greater
----------------------------------------------------------------
Key: HHH-5789
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5789
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.6.0, 3.6.0.CR2, 3.6.0.CR1, 3.5.6, 3.6.0.Beta4, 3.6.0.Beta3, 3.5.5, 3.6.0.Beta2, 3.6.0.Beta1, 3.5.4
Environment: Linux fiona 2.6.32-5-amd64 #1 SMP Thu Nov 25 18:02:11 UTC 2010 x86_64 GNU/Linux
java version "1.6.0_18"
OpenJDK Runtime Environment (IcedTea6 1.8.3) (6b18-1.8.3-2)
OpenJDK 64-Bit Server VM (build 16.0-b13, mixed mode)
Reporter: Miguel Landaeta
Attachments: hibernate3_3.5.4.Final.buildlog
Hi,
In the BTS of Debian it was reported[1] that Hibernate 3.5.4 can not be built with recent versions of OpenJDK6.
The compilation fails with a message similar to this one:
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
/build/user-libhibernate3-java_3.5.4.Final-4-amd64-X7BsRy/libhibernate3-java-3.5.4.Final/entitymanager/src/main/java/org/hibernate/ejb/criteria/path/AbstractPathImpl.java:[194,39] invalid inferred types for M; inferred type does not conform to declared bound(s)
inferred: java.util.Map<K,V>
bound(s): java.util.Map<capture#829 of ?,capture#332 of ?>
This is due to more strict type inference checks in OpenJDK6 1.8.2 and greater.
Debian is going to release a stable version of their distribution soon with OpenJDK6 1.8.3, so it's required to be able to compile Hibernate with that JDK version.
Any help to fix this problem is very welcomed.
The full build log is attached.
Thanks,
1. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=606295
--
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, 2 months
[Hibernate-JIRA] Created: (HHH-2225) NPE when eager fetching joined component with native SQL query
by Christian Bauer (JIRA)
NPE when eager fetching joined component with native SQL query
--------------------------------------------------------------
Key: HHH-2225
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2225
Project: Hibernate3
Type: Bug
Components: query-sql
Versions: 3.2.0.ga
Reporter: Christian Bauer
Priority: Minor
Item -> many-to-one -> User -> joined component -> billingAddress
This:
result = session.createSQLQuery("select {i.*}, {u.*}, {ba.*} from ITEM i" +
" join USERS u on i.SELLER_ID = u.USER_ID" +
" left join BILLING_ADDRESS ba on u.USER_ID = ba.USER_ID" +
" where u.USERNAME = :uname")
.addEntity("i", Item.class)
.addJoin("u", "i.seller")
.addJoin("ba", "u.billingAddress")
fails with:
java.lang.NullPointerException
at org.hibernate.loader.DefaultEntityAliases.<init>(DefaultEntityAliases.java:37)
at org.hibernate.loader.custom.sql.SQLQueryReturnProcessor.generateCustomReturns(SQLQueryReturnProcessor.java:283)
at org.hibernate.loader.custom.sql.SQLCustomQuery.<init>(SQLCustomQuery.java:129)
at org.hibernate.engine.query.NativeSQLQueryPlan.<init>(NativeSQLQueryPlan.java:43)
at org.hibernate.engine.query.QueryPlanCache.getNativeSQLQueryPlan(QueryPlanCache.java:114)
at org.hibernate.impl.AbstractSessionImpl.getNativeSQLQueryPlan(AbstractSessionImpl.java:137)
at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:142)
at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:150)
--
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, 2 months
[Hibernate-JIRA] Created: (HHH-5297) Hibernate JPA closes XAConnection on Glassfish v3 with JDBC Wrapping
by Radosław Smogura (JIRA)
Hibernate JPA closes XAConnection on Glassfish v3 with JDBC Wrapping
--------------------------------------------------------------------
Key: HHH-5297
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5297
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.5.0-Final
Environment: Glassfish v 3
Reporter: Radosław Smogura
Priority: Critical
In EJB application at 90% the Hibernate closes original physicall connectiont o XA database. This problem occurs when JDBC Object wrapping is turned on in Glassfiah admin console.
This bug is "upstream" of this https://glassfish.dev.java.net/issues/show_bug.cgi?id=11846.
Orginal initial comment, and some comments:
----------------------
I use PostgreSQL 8.4 with trunk and stable driver. When I use statement caching
with wrapping original objects I got exception that statement is closed. My
investigation shwn close of original Polled Connection in
com.sun.gjc.spi.ManagedConnection.transactionCompleted. Problem disappears
after few calls of same statement. This problem doesn't occurs when wrapping is
turned off. In both cases I use XA poll.
Caused by: org.postgresql.util.PSQLException: Statement has been closed.
at
org.postgresql.ds.jdbc23.AbstractJdbc23PooledConnection$StatementHandler.invoke(AbstractJdbc23PooledConnection.java:448)
at $Proxy227.clearParameters(Unknown Source)
at
com.sun.gjc.spi.base.PreparedStatementWrapper.clearParameters(PreparedStatementWrapper.java:380)
at
com.sun.gjc.spi.base.PreparedStatementWrapper.close(PreparedStatementWrapper.java:755)
at
org.hibernate.jdbc.AbstractBatcher.closePreparedStatement(AbstractBatcher.java:563)
-----------------
This problem isn't visible if PooligDatasource is used.
-----------------
I used 3.5.2 Release and it's looks same. Before 1st submiting bug I
thought that this is GF problem, becasue in EJB I was trying to get
XAConnection by resource injection and same problem occured (this EJB was mixed
Hibernate + JDBC), but now i'm going to point that this is Hibernate problem.
I'll do some other checks, and if this will be Hibernate problem I'll fill bug
in Hib.
I created application without Hibernate (old plain JNDI) and it looks that
there is no error - so this coud be hibernate. But i want to do more test,
about this (eg. take XAConnection from server global JNDI, without
java:comp/env).
-----------------
---
Kind regards,
Radosław Smogura
http://www.softperience.eu
--
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, 2 months
[Hibernate-JIRA] Created: (EJB-385) JPA method of merge failed to insert deleted records from database
by Hari (JIRA)
JPA method of merge failed to insert deleted records from database
-------------------------------------------------------------------
Key: EJB-385
URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-385
Project: Hibernate Entity Manager
Issue Type: Improvement
Components: EntityManager
Affects Versions: 3.2.0.ga
Environment: 3.2.6.ga, Weblogic,JPA, Windows
Reporter: Hari
The following is my requirement.
Suppose i have a record in database with id say, 12.
i have retrieved this using a JPQL query and convert it into a transfer object ,done some processing and going to remerge this after converting it to a new entity but the id set in the new entity is same as old one ie 12.
Now just before calling entityManger.merge i have deleted the record with id 12 from database.
The issue is the merge opeartion is not inserting the record in database at all.
But if the id set in the entity is one which is never occured in the database,the merge operation will insert the record with the id set from teh application.
Is there any work around/fix for this issue.
Regards
Harikrishnan R
--
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, 2 months
[Hibernate-JIRA] Created: (HHH-4066) JPA compatibility problem
by Albert Kurucz (JIRA)
JPA compatibility problem
-------------------------
Key: HHH-4066
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4066
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.3.2
Environment: Hibernate Core 3.3.2, problem is independent from database type (actually appeared with Derby 10.4.2)
Reporter: Albert Kurucz
POJO Entity with 100% JPA annotations, as long as the Class did not implement the Map interface everything worked fine (save to and load from database).
After the Class implemented the Map interface, during object persistence, 'get' was called with '$type$' parameter, and 'get' responded with IllegalArgumentException (in accordance to its design).
Workaround implemented: get now responds to this call by returning getClass().getName()
BUT Hibernate should not need this workaround if it is 100% JPA compliant.
On the above example the Map interface of the Entity Class had no connection with persisted variables, only transients.
In the JPA spec there is no restriction what I know of, which would disallow the implementation of Map by an Entity Class.
In the JPA spec there is no requirement what I know of, which would require and Entity Class which implement the Map interface to implement the Map interface in any special way (like 'get' responding to '$type$').
Correct me if I am wrong.
--
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, 2 months