[Hibernate-JIRA] Created: (HHH-3159) Oracle 11g - desupport of oracle.jdbc.driver
by D. S. (JIRA)
Oracle 11g - desupport of oracle.jdbc.driver
--------------------------------------------
Key: HHH-3159
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3159
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.2.5
Environment: Hibernate 3.2.5GA, Oracle 11.1.0.6.0.
Reporter: D. S.
With Oracle 11g, the deprecated package oracle.jdbc.driver no longer exists and this causes issues with all OracleDialect classes making it impossible to use Hibernate.
This issue affects all of the following classes:
Oracle9iDialect.java
Oracle9Dialect.java
Oracle10gDialect.java
The line error in question is:
Class types = ReflectHelper.classForName("oracle.jdbc.driver.OracleTypes");
This simply needs to be changed to:
Class types = ReflectHelper.classForName("oracle.jdbc.OracleTypes");
>From the Oracle 11g readme.txt
"In Oracle JDBC release 9.0.1 customer use of the classes
in that package was deprecated. A new package, oracle.jdbc, was
introduced and customers were advised to begin using the
interfaces and classes defined in oracle.jdbc. In every release
since 9.0.1 we have encouraged customers to switch to oracle.jdbc
and stated that oracle.jdbc.driver would be desupported. The time
has come. Customer code that references oracle.jdbc.driver will
not compile and will not execute in this and future releases of
the Oracle JDBC drivers. Please use oracle.jdbc instead."
Thanks.
--
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
14 years, 9 months
[Hibernate-JIRA] Created: (HHH-3682) OracleDialect with oracle 11g
by akash (JIRA)
OracleDialect with oracle 11g
-----------------------------
Key: HHH-3682
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3682
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.2.5
Environment: Oracle 10.2, weblogic 10.3 , java 1.6 , spring 2.0
Reporter: akash
We are calling sql procedures using Hiberante and I have used OracleDialect9 as my hiberante dialect.
These configuration is working fine in weblogic 8.1 but it's failing in weblogic 10.3 with exception "Caused by: java.lang.IllegalAccessException: Class org.hibernate.dialect.Oracle9Dialect can not access a member of class oracle.jdbc.driver.OracleTypes with modifiers ""
" .
I went through the dialect code and found that here is one line "Class types = ReflectHelper.classForName("oracle.jdbc.driver.OracleTypes");" to load OracleTypes where in oracle 11g they have depricated oracle.jdbc.driver package. Now since weblogic 10.3 internally comes with oracle 11g thin driver, hibernate is not able to find OracleTypes class.
So what do u think what i should do to make this work ? Is there any dialect available which can support oracle 11g and solve this problem ? So should i created my own dialect and handle this issue ?
--
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
14 years, 9 months
[Hibernate-JIRA] Created: (HHH-2575) Query results are mapped to object array incorrectly when there is column ambiguity and aliases are not used
by Mike Hoeffner (JIRA)
Query results are mapped to object array incorrectly when there is column ambiguity and aliases are not used
------------------------------------------------------------------------------------------------------------
Key: HHH-2575
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2575
Project: Hibernate3
Issue Type: Bug
Components: query-sql
Affects Versions: 3.2.2
Environment: Hibernate 3.2.2 + MySQL 5.0.22 + MySQL Connector/J 5.0.5. Reproduced with HSQLDB 1.8.0.7.
Reporter: Mike Hoeffner
Priority: Minor
Attachments: ResultsNotEffectedByAliasesTest.java
I had a SQL (not HQL) query that basically looked like this:
select a.name, a.seq, b.name, b.seq from foo a, foo b;
and I noticed that the results obtained through list() -> (Object[]) get(i) -> row[0], row[1], row[2], row[3]
did not correspond to what I saw when manually running the query without Hibernate involved. row[2] always had the same values as row[0] and row[3] always had the same values as row[1].
When I tried adding aliases so that it became:
select a.name as a_name, a.seq as a_seq, b.name as b_name, b.seq as b_seq from foo a, foo b;
then the results matched what I expected. So having aliases in the SQL modified the results that were returned even though I was looking up the value from each column by its index / position instead of by its name / alias.
Attached is a test case that will reproduce this.
--
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
14 years, 9 months
[Hibernate-JIRA] Created: (HHH-2661) Second-level cache is used after Session.setCacheMode(CacheMode.IGNORE)
by Anders Wallgren (JIRA)
Second-level cache is used after Session.setCacheMode(CacheMode.IGNORE)
-----------------------------------------------------------------------
Key: HHH-2661
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2661
Project: Hibernate3
Issue Type: Bug
Components: caching (L2)
Affects Versions: 3.2.4.sp1
Environment: Windows Vista
MySQL 5.0
Reporter: Anders Wallgren
I'm doing some bulk importing and want to disable the L2 cache, so I call Session.setCacheMode(CacheMode.IGNORE) before doing any work.
However, the entities I'm creating still end up in the cache. It seems that org.hibernate.action.CollectionAction isn't doing the correct check to determine when to cache -- it only check for the existence of a configured cache, but doesn't check whether caching is enabled in the session.
For example, from CollectionAction.beforeExecutions:
public final void beforeExecutions() throws CacheException {
// we need to obtain the lock before any actions are
// executed, since this may be an inverse="true"
// bidirectional association and it is one of the
// earlier entity actions which actually updates
// the database (this action is resposible for
// second-level cache invalidation only)
if ( persister.hasCache() ) {
final CacheKey ck = new CacheKey(
key,
persister.getKeyType(),
persister.getRole(),
session.getEntityMode(),
session.getFactory()
);
lock = persister.getCache().lock(ck, null);
}
}
Shouldn't "if ( persister.hasCache() )" be persistence.hasCache && getSession.getCacheMode.isPutEnabled(), or something along those lines?
--
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
14 years, 9 months
[Hibernate-JIRA] Created: (HHH-3278) JPA query does not work on Derby when more than one entity has a column named DATE
by Felipe Leme (JIRA)
JPA query does not work on Derby when more than one entity has a column named DATE
----------------------------------------------------------------------------------
Key: HHH-3278
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3278
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.2.6
Environment: Hibernate 3.2.6, Hibernate Annotations 3.3.0, Hibernate Entity Manager 3.3.1, Derby 10.4.1.3
Reporter: Felipe Leme
I have a relationship that is more like this (sorry, didn't have time to provide a simpler scenario):
- MP has a field/column called date
- MPHistory also have the same field
- there is a 1-N relationship between MP -> MPHistory
- the relationship has a @OrderBy("date") clause
When Hibernate starts using H2, everything works fine. But if I use Derby, I get the following exception:
Caused by: java.sql.SQLException: Column name 'DATE' appears more than once in the result of the query expression.
The bad SQL is the following:
Hibernate: select distinct agententit0_.id as id1_0_, mps1_.id as id0_1_, history2_.id as id3_2_, agententit0_.connected as connected1_0_, agententit0_.jmx_name as jmx4_1_0_, agententit0_.status as status1_0_, agententit0_.host_id as host10_1_0_, agententit0_.host as host1_0_, agententit0_.local as local1_0_, agententit0_.port as port1_0_, agententit0_.type as type1_0_, mps1_.date as date0_1_, mps1_.name as name0_1_, mps1_.value as value0_1_, mps1_.frequency_type as frequency5_0_1_, mps1_.is_full_mode as is6_0_1_, mps1_.is_historical as is7_0_1_, mps1_.is_normal_mode as is8_0_1_, mps1_.tolerance as tolerance0_1_, mps1_.is_summary_mode as is10_0_1_, mps1_.value_class as value11_0_1_, mps1_.info_id as info12_0_1_, mps1_.obj_id as obj13_0__, mps1_.id as id0__, history2_.date as date3_2_, history2_.value as value3_2_, history2_.value_class as value4_3_2_, history2_.mp_id as mp5_1__, history2_.id as id1__ from ggs_objects agententit0_ left outer join mps mps1_ on agententit0_.id=mps1_.obj_id left outer join mps_history history2_ on mps1_.id=history2_.mp_id where agententit0_.type in (108, 8) order by date asc
More specifically, the final 'order by date asc' should be 'order by history2_.date asc'.
Doing some debugging, I found the problem at org.hibernate.sql.Template, method isFunctionOrKeyword (line 304), which returns:
"(".equals(nextToken) ||
KEYWORDS.contains(lcToken) ||
functionRegistry.hasFunction(lcToken) ||
dialect.getKeywords().contains(lcToken) ||
FUNCTION_KEYWORDS.contains(lcToken);
The 3rd check ( dialect.getKeywords().contains(lcToken) ) returns true for Derby, then the whole method returns true, which in turns does not prepend the "$PlaceHolder$ (history2_, in this case), in the query:
else if (
isIdentifier(token, dialect) &&
!isFunctionOrKeyword(lcToken, nextToken, dialect, functionRegistry) // <<<<< THIS IS THE ISSUE >>>>
) {
result.append(TEMPLATE)
.append('.')
.append( dialect.quote(token) );
}
For now, I just removed the @OrderBy from my query (it's not really important in my case), but it looks like the Template method logic is wrong in this case.
PS: I initially open the same ticket at JBoss' site (http://jira.jboss.org/jira/browse/HIBERNATE-95) - my mistake, I guess I should have opened it here instead...
--
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
14 years, 9 months
[Hibernate-JIRA] Created: (HHH-3576) out of memory
by sridhar (JIRA)
out of memory
-------------
Key: HHH-3576
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3576
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.2.2
Environment: windows 2003 Standard edition SP2
Reporter: sridhar
Attachments: hibernate.zip
Hibernate unable to use scrollable results and running out of memory for MS SQL Server 2005 and MySQL 5.0.
But it is working fine for Oracle 10G.
Problem Description:
===================
I have a table with 10 columns and one of them is blob field. this blob field contains binary information about 33KB.
I have 70,000 rows in database.
When I read the complete data using scrollable results implementation of hibernate, for Oracle 10G, the process completeed in 10 Seconds.
But when run the same program for MS SQL Server 2005 and MySQL 5.0 its running out of memory.
Steps to reproduc the problem:
=========================
I am enclosing the eclipse project. In the lib folder it contains the JDBC drivers for Oracle 10G, Mysql 5, MS SQL Server2005.
Remaing jar files will come with standard Springs distribution of 2.5.
import the project into eclipse.
Please configure the database details in jdbc.properties
now run the DBRead.java.
This will populate the 68828 records in the configured database and reads complete data from the database.
For MySQL and MS SQl Server it will give out of memory error while reading.
--
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
14 years, 9 months