[Hibernate-JIRA] Created: (HHH-3069) ObjectNotFoundException when proxy exists for super class of non existant joined subclass
by dan oxlade (JIRA)
ObjectNotFoundException when proxy exists for super class of non existant joined subclass
-----------------------------------------------------------------------------------------
Key: HHH-3069
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3069
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.2.5
Reporter: dan oxlade
A proxy of an entity which has a joined subclass is loaded into the session.
If the proxy resolves to null, i.e the id of the proxy has no matching row in the database then future queries (in the same hibernate session) for any of the joined subclass entities will fail with ObjectNotFoundExceptions from the returnNarrowedProxy method of the DefaultLoadEventListener.
the following test method in JoinedSubclassTest demonstrates the failing test:
public void testProxyLoadedWhichDoesNotExist() throws Exception {
Session s = openSession();
Transaction t = s.beginTransaction();
Long id = Long.valueOf(0L);
Employee employee = (Employee) s.get(Employee.class,id);
assertNull(employee);
Person proxy = (Person) s.load(Person.class,id);
assertNotNull(proxy);
employee = (Employee) s.get(Employee.class,id);
assertNull(employee);
t.commit();
s.close();
}
--
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
17 years, 11 months
[Hibernate-JIRA] Created: (HHH-3067) Request to rename TimesTenDialect class to TimesTen5Dialect
by Jason Feldhaus (JIRA)
Request to rename TimesTenDialect class to TimesTen5Dialect
-----------------------------------------------------------
Key: HHH-3067
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3067
Project: Hibernate3
Issue Type: Improvement
Components: core
Affects Versions: 3.2.5
Environment: Hibernate 3.2.5.ga, TimesTen 5.1.x
Reporter: Jason Feldhaus
Priority: Minor
Two new TimesTen dialect classes have been submitted for inclusion into the Hibernate distribution:
1. TimesTen7Dialect (see HHH-3061)
2. TimesTen6Dialect (see HHH-3066)
In order to unambiguously identify the TimesTen version associated with the existing
org.hibernate.dialect.TimesTenDialect class that is currently included in the Hibernate
distribution we request that this existing class be renamed to the following:
org.hibernate.dialect.TimesTen5Dialect
We have discussed this change with Steve Ebersole.
Please direct any questions to Jason Feldhaus (jason.feldhaus(a)oracle.com).
Thank you,
Jason
--
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
17 years, 11 months
[Hibernate-JIRA] Created: (HHH-3066) New TimesTen6Dialect class for Oracle TimesTen In-Memory Database v 6.x
by Jason Feldhaus (JIRA)
New TimesTen6Dialect class for Oracle TimesTen In-Memory Database v 6.x
-----------------------------------------------------------------------
Key: HHH-3066
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3066
Project: Hibernate3
Issue Type: Improvement
Components: core
Affects Versions: 3.2.5
Environment: Hibernate 3.2.5.ga, TimesTen 6.0.9
Reporter: Jason Feldhaus
Priority: Minor
Attachments: TimesTen6Dialect.zip
A new TimesTen dialect class has been developed for TimesTen version 6.x releases. This
dialect reflects all of the SQL improvements made to the TimesTen 6 product since the original
TimesTenDialect class was developed for Hibernate several years ago.
After consulting with Steve Ebersole, our ultimate goal is to have this new TimesTen6Dialect
class be included in the official Hibernate distribution.
Also see issue HHH-3061 for a new dialect class for TimesTen version 7.x.
The attached zip file contains the following:
1. TimesTen6Dialect.java (A new dialect class for use with TimesTen version 6.x releases)
2. TimesTen6Dialect ChangeLog.txt (A list of changes in relation to the original TimesTenDialect currently included in the Hibernate distribution)
3. Hibernate TimesTen6Dialect Test Results.xls (A spreadsheet describing the reasons for test case failures when running this new dialect class with the Hibernate test suite.)
Please direct any questions to Jason Feldhaus (jason.feldhaus(a)oracle.com).
Thank you,
Jason
--
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
17 years, 11 months
[Hibernate-JIRA] Created: (HHH-3065) i am trying to add two fields in the my sql database and i am coming across these errors like no suitable errors and also could not find complete schema update
by isaacpradeep (JIRA)
i am trying to add two fields in the my sql database and i am coming across these errors like no suitable errors and also could not find complete schema update
---------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: HHH-3065
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3065
Project: Hibernate3
Issue Type: Task
Environment: windows ;jdk1.4;eclipse3.2;mysql;
Reporter: isaacpradeep
Attachments: student.rar
Name: isaac
Degree: be
Phone: 1234
31 [main] WARN org.hibernate.cfg.SettingsFactory - Could not obtain connection metadata
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:68)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1509)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1054)
at student.AddStudent.main(AddStudent.java:28)
719 [main] WARN net.sf.ehcache.config.Configurator - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/E:/hibernate/workspace/hibernate/lib/ehcache-1.1.jar!/ehcache-failsafe.xml
2031 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - could not get database metadata
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:118)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:263)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1055)
at student.AddStudent.main(AddStudent.java:28)
2031 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - could not complete schema update
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:118)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:263)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1055)
at student.AddStudent.main(AddStudent.java:28)
2875 [main] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 0, SQLState: 08001
2875 [main] ERROR org.hibernate.util.JDBCExceptionReporter - No suitable driver
org.hibernate.exception.GenericJDBCException: Cannot open connection
at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:92)
at org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:80)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
at org.hibernate.jdbc.AbstractBatcher.openConnection(AbstractBatcher.java:427)
at org.hibernate.jdbc.JDBCContext.connect(JDBCContext.java:168)
at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:103)
at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:49)
at org.hibernate.transaction.JDBCTransactionFactory.beginTransaction(JDBCTransactionFactory.java:24)
at org.hibernate.jdbc.JDBCContext.beginTransaction(JDBCContext.java:231)
at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1073)
at student.AddStudent.main(AddStudent.java:35)
Caused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
at org.hibernate.jdbc.AbstractBatcher.openConnection(AbstractBatcher.java:424)
... 7 more
--
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
17 years, 11 months
[Hibernate-JIRA] Created: (HSEARCH-124) Double lucene document created when inserting entities (@IndexEmbedded)
by Amin Mohammed-Coleman (JIRA)
Double lucene document created when inserting entities (@IndexEmbedded)
-----------------------------------------------------------------------
Key: HSEARCH-124
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-124
Project: Hibernate Search
Issue Type: Bug
Affects Versions: 3.0.0.cr1
Environment: Hibernate version: 3.2.5.ga
Database platform: MySQL
OS: Mac OS 10.4.10
Spring Framework 2.0
Reporter: Amin Mohammed-Coleman
Attachments: phone-app.zip
When inserting an entity using hibernate, double lucene documents are created for entities associated with the original entity. Please refer to :
http://forum.hibernate.org/viewtopic.php?t=980102
For example the below code used to populate/create a Contact entity produces two lucene documents for Address and Phone entities. The database has only entry for the Address and Phone.
[code]
Address address = new Address();
address.setAddress1("TEST1");
address.setAddress2("N/A");
address.setTown("TEST TOWN");
address.setCounty("TEST COUNTY");
address.setCountry("UK");
address.setPostcode("XXXXXXX");
address.setActive(true);
address.setCreatedOn(new Date());
address.setLastUpdatedOn(new Date());
Phone phone = new Phone();
phone.setNumber("01273234122");
phone.setType("HOME");
phone.setCreatedOn(new Date());
phone.setLastUpdatedOn(new Date());
PersonalContact contact = new PersonalContact();
contact.setFirstname("Amin");
contact.setSurname("Mohammed-Coleman");
contact.setEmail("address(a)hotmail.com");
contact.setDateOfBirth(new Date());
contact.setNotifyBirthDay(false);
contact.setCreatedOn(new Date());
contact.setLastUpdatedOn(new Date());
contact.setNotes("TEST");
contact.addAddressToContact(address);
contact.addPhoneToContact(phone);
ApplicationContext appCtx = new ClassPathXmlApplicationContext(new String[]{"/spring/context-dao.xml"});
ContactDao contactDao = (ContactDao)appCtx.getBean("contactDao");
contactDao.createContact(contact);
List<Contact> contacts = contactDao.search("address(a)hotmail.com");
System.out.println("contacts = " + contacts);
[/code]
Please find attached the entities I am using. I am not sure if there is enough information but the post provides all the information.
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
17 years, 11 months
[Hibernate-JIRA] Created: (HSEARCH-148) Hibernate Search does not integrate well with the Spring Framework - FullTextSessionImpl needs fixes
by Michael Lossos (JIRA)
Hibernate Search does not integrate well with the Spring Framework - FullTextSessionImpl needs fixes
----------------------------------------------------------------------------------------------------
Key: HSEARCH-148
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-148
Project: Hibernate Search
Issue Type: Bug
Components: engine
Affects Versions: 3.0.0.GA
Reporter: Michael Lossos
We are integrating Hibernate Search (3.0.0 GA) into an existing Hibernate / Spring Framework / Eclipse RCP configuration. Unfortunately, Hibernate Search's FullTextSessionImpl assumes that it will be passed an org.hibernate.classic.Session. When using Spring for Hibernate transaction management, Spring creates a defensive Proxy that disables the Session.close() method. This Proxy does not implement the EventSource nor classic.Session, while Hibernate Search assumes that it does and has a ClassCastException in the FullTextSessionImpl constructor.
Hibernate Search's FullTextSessionImpl does this which is wrong for the Spring Hibernate Session Proxy:
public FullTextSessionImpl(org.hibernate.Session session) {
this.session = (Session) session; // classic.Session!
this.eventSource = (EventSource) session;
this.sessionImplementor = (SessionImplementor) session;
}
It should be possible to rewrite FullTextSession and FullTextSessionImpl so that they do not use the org.hibernate.classic.Session but instead use the standard Hibernate Session, and thus avoid the unsafe casting.
The workaround for this is to use HibernateTemplate.setExposeNativeSession( true ) before executing the HibernateCallback (causing the SessionImpl to be passed directly, without a Proxy). This exposes the Session to potential close() and is *not* a good idea.
--
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
17 years, 11 months