[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, 1 month
[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, 1 month
[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, 1 month
[Hibernate-JIRA] Created: (HHH-3459) NullPointerException in Formatter.isFunctionName with certain SQL when pretty format is used
by Scott Feldstein (JIRA)
NullPointerException in Formatter.isFunctionName with certain SQL when pretty format is used
--------------------------------------------------------------------------------------------
Key: HHH-3459
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3459
Project: Hibernate3
Issue Type: Bug
Components: query-sql
Affects Versions: 3.2.6
Reporter: Scott Feldstein
A NullPointerException is thrown when hibernate.show_sql=true && hibernate.format_sql=true while exec'ing sql with quotes around the stmt:
(taken from an embedded groovy script)
---------
def sess = getSession()
def HQL = """
(select count(*) from TABLE)
"""
sess
.createSQLQuery(HQL)
.list()
------------
This is valid SQL and is typically used in my app as such:
(select count(*) from TABLE1) UNION ALL (select count(*) from TABLE2) ...
Here is the stack trace in hibernate:
java.lang.NullPointerException
at org.hibernate.pretty.Formatter.isFunctionName(Formatter.java:342)
at org.hibernate.pretty.Formatter.openParen(Formatter.java:323)
at org.hibernate.pretty.Formatter.format(Formatter.java:134)
at org.hibernate.jdbc.AbstractBatcher.format(AbstractBatcher.java:410)
at org.hibernate.jdbc.AbstractBatcher.log(AbstractBatcher.java:404)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:482)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:423)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
at org.hibernate.loader.Loader.doQuery(Loader.java:673)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.doList(Loader.java:2220)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
at org.hibernate.loader.Loader.list(Loader.java:2099)
at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:289)
at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1695)
at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:142)
at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:152)
--
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, 1 month