[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, 10 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, 10 months
[Hibernate-JIRA] Created: (HHH-4112) HibernateProxy enhanced POJOs lose method annotations
by David Green (JIRA)
HibernateProxy enhanced POJOs lose method annotations
-----------------------------------------------------
Key: HHH-4112
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4112
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.2.0.ga
Reporter: David Green
Using FetchType.LAZY on an association can result in POJO entities being enhanced via JavassistProxyFactory or CGLIBProxyFactory. The resulting class overrides all declared accessors and mutators (get/set methods) in the original POJO. Those overridden methods lose any annotations that were specified on the original POJO.
The result is that unsuspecting code looking for annotations on POJO accessors won't find any annotations.
For example, if I have an @Entity POJO called Resident, the following JUnit test will fail for both CGLIBProxyFactory and JavassistProxyFactory:
{code:Java}
public void testCGLibProxy() throws HibernateException, SecurityException, NoSuchMethodException {
doTest(new CGLIBProxyFactory());
}
public void testJavassistProxy() throws HibernateException, SecurityException, NoSuchMethodException {
doTest(new JavassistProxyFactory());
}
private void doTest(ProxyFactory proxyFactory) throws NoSuchMethodException {
HashSet proxyInterfaces = new HashSet();
proxyInterfaces.add( HibernateProxy.class );
proxyFactory.postInstantiate("Resident", Resident.class, proxyInterfaces, Resident.class.getDeclaredMethod("getId"), Resident.class.getDeclaredMethod("setId",Long.class), null);
HibernateProxy hibernateProxy = proxyFactory.getProxy(resident.getId(), session);
assertTrue(hibernateProxy instanceof Resident);
System.out.println("Hibernate proxy name: "+hibernateProxy.getClass().getName());
assertNotNull(Resident.class.getDeclaredMethod("getMaritalStatus").getAnnotation(Required.class));
assertNotNull(hibernateProxy.getClass().getDeclaredMethod("getMaritalStatus").getAnnotation(Required.class));
}
{code}
--
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, 10 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, 10 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, 10 months
[Hibernate-JIRA] Created: (HHH-3899) Inconsistencies when processing changes to read-only and immutable entities
by Gail Badner (JIRA)
Inconsistencies when processing changes to read-only and immutable entities
---------------------------------------------------------------------------
Key: HHH-3899
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3899
Project: Hibernate Core
Issue Type: Bug
Reporter: Gail Badner
I've noticed that there are inconsistencies when read-only and immutable entities are modified. I've added some unit tests to org.hibernate.test.immutable.ImmutableTest and created org.hibernate.test.readonly.ReadOnlyVersionedNodesTest which show the inconsistencies.
The same behavior is seen in Branch_3_2, Branch_3_3, and trunk.
The inconsistencies in org.hibernate.test.immutable.ImmutableTest are:
ImmutableTest.testImmutable():
If an immutable entity with an immutable collection is associated with the session, an addition to the immutable collection is ignored
ImmutableTest.testImmutableCollectionWithUpdate:
If Session.update() is used to associate an immutable entity with an addition made to its immutable collection, then Hibernate detects that the reassociated entity has a dirty collection and HibernateException is thrown
ImmutableTest.testImmutableCollectionWithMerge:
If Session.merge() is used to associate an immutable entity with an addition made to its immutable collection, then, later when the transaction is committed, Hibernate detects that an immutable collection was changed and HibernateException is thrown
The inconsistencies in org.hibernate.test.readonly.ReadOnlyVersionedNodesTest are:
ReadOnlyVersionedNodesTest.testAddNewChildToReadOnlyParent():
If a read-only entity is associated with the session and a new child entity is added to collection, the new child entity is not persisted when the transaction is committed
ReadOnlyVersionedNodesTest.testUpdateParentWithNewChildCommitWithReadOnlyParent():
ReadOnlyVersionedNodesTest.testMergeDetachedParentWithNewChildCommitWithReadOnlyParent():
ReadOnlyVersionedNodesTest.testGetParentMakeReadOnlyThenMergeDetachedParentWithNewChildC():
If Session.merge() or Session.update() is used to associate a parent entity with a new child entity in its collection, and that parent entity is made read-only, then, later when the transaction is committed, the new child entity is persisted and it is associated with the parent
ReadOnlyVersionedNodesTest.testAddNewParentToReadOnlyChild():
If a read-only entity is associated with the session and a new parent entity is assigned, the new parent entity is not persisted when the transaction is committed
ReadOnlyVersionedNodesTest.testUpdateChildWithNewParentCommitWithReadOnlyChild():
If Session.update() is used to associate a child entity with a new parent entity, and the child entity is made read-only, later, when the transaction is committed, the new parent entity is persisted, but it is not associated with the child
ReadOnlyVersionedNodesTest.testMergeDetachedChildWithNewParentCommitWithReadOnlyChild():
ReadOnlyVersionedNodesTest.testGetChildMakeReadOnlyThenMergeDetachedChildWithNewParent():
If Session.merge() is used to associate a child entity with a new parent entity, and the child entity is made read-only, later, when the transaction is committed, the new parent entity is persisted, but it is not associated with the child; in addition the version on the parent is incremented.
If any of these results appear to be due to a bug, the test name should be changed to end in FailureExpected until the bug is fixed.
--
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, 10 months
[Hibernate-JIRA] Created: (HCANN-7) Hibernate interprets relation as embedding
by Lucius Gregory Meredith (JIRA)
Hibernate interprets relation as embedding
------------------------------------------
Key: HCANN-7
URL: http://opensource.atlassian.com/projects/hibernate/browse/HCANN-7
Project: Hibernate Commons Annotations
Issue Type: Bug
Affects Versions: 3.2
Environment: Mac OS X (leopard); Java 1.5 or 1.6; MySQL, HSQLDB
Reporter: Lucius Gregory Meredith
Hibernate interprets JPA annotations
@Entity
...
public class ... {
...
@OneToOne
@JoinColumn
<MethodDecl>
...}
as indication to embed the referenced entity, rather than use the key.
For code sample see http://svn.biosimilarity.com/src/open/codesamples/trunk/hibernate
Instructions for use:
i included the target dir in the repo to speed up investigation, but you can just blow that away and build from scratch. The example is currently written to Java1.6, but also exhibits the same behavior under Java1.5. To run the example
> svn co http://svn.biosimilarity.com/src/open/codesamples/trunk/hibernate
...
> env PATH=<path-to-java1.6>:$PATH JAVA_HOME=<path-to-java1.6> mvn clean compile process-classes
If you switch comment and decl at line 22 in src/main/java/maxb/hbex2/MySampleFuContainer.java then you see the error. The schema goes from
create table lingo_production.MySampleFuContainer_table (
id_AbstractContainer varchar(255) not null,
varchar(255) not null,
uuid varchar(255),
mysamplingmumble__idSuper varchar(255),
primary key (id),
unique (uuid)
);
to
create table lingo_production.MySampleFuContainer_table (
id_AbstractContainer varchar(255) not null,
id varchar(255),
mysamplingmumble_ tinyblob,
uuid varchar(255),
primary key (id_AbstractContainer),
unique (id_AbstractContainer)
);
--
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, 10 months
[Hibernate-JIRA] Created: (HCANN-8) Hibernate allow to embed non embeddable class
by Maillefer Jean-David (JIRA)
Hibernate allow to embed non embeddable class
---------------------------------------------
Key: HCANN-8
URL: http://opensource.atlassian.com/projects/hibernate/browse/HCANN-8
Project: Hibernate Commons Annotations
Issue Type: Bug
Environment: JBoss-5.1.0.GA, postgresql 8.4.0
Reporter: Maillefer Jean-David
Priority: Minor
Hibernate allows to embed (successfully !) a non embeddable class (if it was embeddable, it would throw a compiler exception)
@Entity
public class BanqueId {
@Id
int id;
}
public class Compte{
@ManyToOne
@JoinColumn(name = "compte_banqueId_id", insertable = false, updatable = false)
private BanqueId banqueId;
@Column(name = "compte_iban", length = 30)
private String iban;
}
@Entity
public class Cotisation {
@Id
int id;
@Embedded
private Compte compte;
}
In this case, using @Embeddable on Compte yields the following compiler error: "Attribute "banqueId" has invalid mapping type in this context"
Not using this annotation (as in this example) generates (at least partially) working code, but seems not to follow the specification (ejb 3.0 spec persistance, 9.1.35) !
--
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, 10 months