[Hibernate-JIRA] Created: (HV-26) Which version of Hibernate Annotations does ClassValidator depend on?
by Steven Devijver (JIRA)
Which version of Hibernate Annotations does ClassValidator depend on?
---------------------------------------------------------------------
Key: HV-26
URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-26
Project: Hibernate Validator
Issue Type: Bug
Components: validators
Affects Versions: 3.0.0.ga
Reporter: Steven Devijver
According to the Compatibility Matrix on the Hibernate website (http://www.hibernate.org/6.html) Hiberbate Validator 3.3.0 GA depends on Hibernate Annotations 3.3.x.
The only 3.3.x release of Hibernate Annotations is 3.3.0 GA. However, the dependency in the compatibility matrix does not seem to be correct.
When I load ClassValidator in my project I get this error:
The type org.hibernate.annotations.common.reflection.ReflectionManager cannot be resolved. It
is indirectly referenced from required .class files
Version 3.3.0 GA of Hibernate Annotations however does not have the class org.hibernate.annotations.common.reflection.ReflectionManager. It does however contain org.hibernate.annotations.common.reflection.EJB3ReflectionManager.
So, which version of Hibernate Annotations should be used with Hibernate Validator 3.0.0 GA?
--
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
18 years, 2 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
18 years, 2 months
[Hibernate-JIRA] Created: (EJB-285) EJB3 compliant default settings override hibernate.cfg.xml
by Rodolfo Federico Gamarra (JIRA)
EJB3 compliant default settings override hibernate.cfg.xml
----------------------------------------------------------
Key: EJB-285
URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-285
Project: Hibernate Entity Manager
Issue Type: Bug
Components: EntityManager
Affects Versions: 3.3.1.GA
Environment: Hibernate 3.2.1
Hibernate EntityManager 3.3.1.GA
Reporter: Rodolfo Federico Gamarra
Priority: Minor
Attachments: entitymanager-configuration.zip
Hi, I think I've found a little bug in org.hibernate.ejb.Ejb3Configuration ($Id: Ejb3Configuration.java 11344 2007-03-25 18:24:01Z epbernard $) class.
Hopefully the title is clear enough to describe what's happening:
- I've a persitence.xml which references (via "hibernate.ejb.cfgfile") a hibernate.cfg.xml, in the way that's described, for example, in the Entity Manager User Guide (Version: 3.3.1.GA. Page 8, below "Here is a typical configuration in a J2SE environment").
- In the referenced xml I set the auto commmit property in false and in persistence.xml nothing it's said about that property.
- What I see at the end of the startup is that the value is true.
Posible explanation:
- Take a look at Ejb3Configuration, specially the methods:
- configure(Properties properties, Map workingVars)
- prepareProperties(Properties properties, Map workingVars)
- A pseudo-code for the first may be:
1) Prepare properties (load persistence.xml):
//settings that always apply to a compliant EJB3
preparedProperties.setProperty( Environment.AUTOCOMMIT, "true" );
2) Load the referenced "hibernate.ejb.cfgfile".
I saw in debugging that the actual false value gets loaded.
3) Priorize persistence.xml over hibernate.cfg.xml:
cfg.addProperties( preparedProperties ); //persistence.xml has priority over hibernate.Cfg.xml
The problem with the last line (besides the typo in the comment, in the extension :-)) is that, I think, that priorization doesn't consider that maybe the values in the prepared properties are there because a default (and not because they were acctually configured in the xml).
After reading "READ THIS BEFORE USING JIRA!", I took a look in the already reported things but didn't get to the problem (In fact, I was using an older verion and, so, I made an update and tried with the lattest one). Also, as you say "Don't attach your project folder as a Zip file, but only the relevant files. Please don't upload them one-by-one, but packaged in a Zip": I made a dummy project (Eclipse 3.2) which shows the problem. I setup log4j properties into debug mode, where the beforementioned can be saw. Also I added some reflection code in order to see the configuration values after the startup process has finished. I also used some other properties in order to have some combinations: a property defined in both xmls (persistence wins), just in persistence, just in hibernate and gets overrided (autocommit), just in hibernate but doesn't get overrided (user name). I hope that I didn't misundertood "...don't attach your project...", what I attached is a tiny-example-oriented project; from which the relevant files are "persistence.xml" and "hibernate.cfg.xml".
In the heading of the log (which is in root of the project in console.txt) you can see the versions of Hibernate, in particular Hibernate EntityManager 3.3.1.GA.
--
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
18 years, 3 months
[Hibernate-JIRA] Created: (HHH-2677) Not loading the ORM.xml file
by Adi (JIRA)
Not loading the ORM.xml file
----------------------------
Key: HHH-2677
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2677
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.2.0.ga
Environment: Windows XP,MySQL5.0,Hibernate3.2.0
Reporter: Adi
Priority: Minor
Attachments: persistence.zip
IF the name of the orm.xml is anything different, then Hibernate is not loading the orm file.
Following is the error I am getting:
java.lang.ExceptionInInitializerError
at com.iChieve.domain.entity.ProductCategoryUnitTest.testSave(ProductCategoryUnitTest.java:16)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: simpleJPA-PersistenceUnit] Unable to find XML mapping file in classpath: /META-INF/myorm.xml
at org.hibernate.ejb.Ejb3Configuration.addClassesToSessionFactory(Ejb3Configuration.java:914)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:772)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:183)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:240)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:120)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)
at com.iChieve.dao.EntityManagerHelper.<clinit>(EntityManagerHelper.java:20)
... 17 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
18 years, 3 months
[Hibernate-JIRA] Created: (EJB-283) Ejb3Configuration can't read Jar file OC4J
by Roman Legat (JIRA)
Ejb3Configuration can't read Jar file OC4J
-------------------------------------------
Key: EJB-283
URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-283
Project: Hibernate Entity Manager
Issue Type: Bug
Components: EntityManager
Affects Versions: 3.3.1.GA
Environment: EM 3.3.1.GA,
Core 3.2.0 GA
Reporter: Roman Legat
Priority: Minor
The "Find-the-entities-yourself"-Feature doesn't work with OC4J, since walking over the jar fails.
This is similar to #174, but the problem is not in JarVisitor, but in
org.jboss.util.file.ArchiveBrowser.getBrowser:
When deploying to OC4J, the Jar URLs start with "code-source" instead of "file"
(See PU root URL below for example).
Hence the Archive-Browser throws a RuntimeException.
Solution should be similar as in #174.
2007-04-01 22:13:38,390 DEBUG Ejb3Configuration - Processing PersistenceUnitInfo [
name: MyService
persistence provider classname: org.hibernate.ejb.HibernatePersistence
classloader: mis_client.web.mis_client:0.0.0
Temporary classloader: org.springframework.instrument.classloading.SimpleThrowawayClassLoader@106ef07
excludeUnlistedClasses: false
JTA datasource: null
Non JTA datasource: org.springframework.jdbc.datasource.DriverManagerDataSource@36eb76
Transaction type: RESOURCE_LOCAL
PU root URL: code-source:/C:/Programs/dev/oracle/jdev-10132/j2ee/home/applications/mis_client/mis_client/WEB-INF/lib/mis_model.jar!/
Jar files URLs []
Managed classes names []
Mapping files names []
Properties []
java.lang.RuntimeException: error trying to scan <jar-file>: code-source:/C:/Programs/dev/oracle/jdev-10132/j2ee/home/applications/mis_client/mis_client/WEB-INF/lib/mis_model.jar!/
at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:635)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:350)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:126)
...
Caused by: java.lang.RuntimeException: Archive browser cannot handle protocol: code-source:/C:/Programs/dev/oracle/jdev-10132/j2ee/home/applications/mis_client/mis_client/WEB-INF/lib/mis_model.jar!/
at org.jboss.util.file.ArchiveBrowser.getBrowser(ArchiveBrowser.java:93)
Regards,
Roman
--
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
18 years, 3 months