[Hibernate-JIRA] Created: (HV-532) Remove package cycle between "core" and "descriptor" packages
by Gunnar Morling (JIRA)
Remove package cycle between "core" and "descriptor" packages
-------------------------------------------------------------
Key: HV-532
URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-532
Project: Hibernate Validator
Issue Type: Task
Components: engine
Affects Versions: 4.2.0.Final
Reporter: Gunnar Morling
Fix For: 4.3.0.next
There is a cyclic dependency between the packages {{org.hibernate.validator.metadata.core}} and {{org.hibernate.validator.metadata.descriptor}} which should be removed.
I think the general problem is that {{ConstraintDescriptorImpl}} (which is now part of the "descriptor" model) is used globally in HV. Probably there should be a corresponding node in the internal model (actually we already have this with {{MetaConstraint}}), of which {{ConstraintDescriptorImpl}} would only be a light-weight view for external meta-model users.
In {{ConstraintDescriptorImpl}} there is also a lot of logic related to annotation retrieval, which we now might move into the provider hierarchy similar to {{BeanMetaDataImpl}}.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 11 months
[Hibernate-JIRA] Created: (HHH-7242) referenced attributes (property-ref) need to be resolved into relational Value references
by Steve Ebersole (JIRA)
referenced attributes (property-ref) need to be resolved into relational Value references
-----------------------------------------------------------------------------------------
Key: HHH-7242
URL: https://hibernate.onjira.com/browse/HHH-7242
Project: Hibernate ORM
Issue Type: Task
Components: metamodel
Reporter: Steve Ebersole
Assignee: Hardy Ferentschik
Fix For: 5.0.0
hbm and annotations both have this same concept, but each does it very differently. Ultimately both need to affect the {{ForeignKey}} target columns. After discussion on IRC (http://transcripts.jboss.org/channel/irc.freenode.org/%23hibernate-dev/20...) the proposed solution is essentially:
1) Change {{org.hibernate.metamodel.spi.source.ToOneAttributeSource#getReferencedEntityAttributeName}} to instead be:
{code:title=ToOneAttributeSource.java|borderStyle=solid}
public interface ToOneAttributeSource ... {
public String getReferencedEntityName();
public JoinColumnResolutionSource getJoinColumnResolutionSource();
public String getForeignKeyName();
}
{code}
Specifically note that {{getReferencedEntityAttributeName}} becomes {{getJoinColumnResolutionSource}}
2) Define the JoinColumnResolutionSource abstraction:
{code:title=JoinColumnResolutionSource.java|borderStyle=solid}
public interface JoinColumnResolutionSource {
public static interface JoinColumnResolutionContext {
public List<org.hibernate.metamodel.spi.relational.Value> resolveRelationalValuesForAttribute(String attributeName);
public Column resolveColumn(String logicalTableName, String logicalColumnName);
public DerivedValue resolveFormula(String logicalTableName, String formula);
}
public List<org.hibernate.metamodel.spi.relational.Value> getJoinColumns(JoinColumnResolutionContext context);
}
{code}
As well as the hbm and annotation variants...
{code:borderStyle=solid}
public class HbmJoinColumnResolutionSource implements JoinColumnResolutionSource {
@Override
public List<org.hibernate.metamodel.spi.relational.Value> getJoinColumns(JoinColumnResolutionContext context) {
return context.resolveRelationalValuesForAttribute( referencedPropertyName );
}
}
public class AnnotationsJoinColumnResolutionSource implements JoinColumnResolutionSource {
@Override
public List<org.hibernate.metamodel.spi.relational.Value> getJoinColumns(JoinColumnResolutionContext context) {
List<org.hibernate.metamodel.spi.relational.Value> values = ...;
for ( attributesWithJoinColumns ... ) {
values.add( context.resolveColumn( joinTableName, joinColumnName ) );
}
return values;
}
}
{code}
3) Update Binder to use this new API. Currently this is limited to just {{org.hibernate.metamodel.internal.Binder#bindManyToOneAttribute}}
4) Update binding classes to no longer expect to be passed the referenced attribute. Identify what, if any, problems that introduces in consumers of the binding classes.
5) Identify all other places where {{JoinColumnResolutionSource}} could be used. Secondary table. Collection keys. Others?
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 11 months
[Hibernate-JIRA] Created: (HBX-1201) Adding an new dialect to hibernate-core.jar 3.4.0
by Bety Annaf (JIRA)
Adding an new dialect to hibernate-core.jar 3.4.0
-------------------------------------------------
Key: HBX-1201
URL: https://hibernate.onjira.com/browse/HBX-1201
Project: Hibernate Tools
Issue Type: Task
Components: eclipse
Environment: JBoss EAP 5.1.0 EAP, JAVA 6 and SQL Server 2008
Reporter: Bety Annaf
Priority: Blocker
Hello,
I need to add MS SQL Server 2008 Dialect to my application. I work in Hibernate Version 3.4.0, I can't upgrade this version of hibernate because it's included in JBoss EAP Distribution.
For this need I have two questions :
1. I should create my own dialect or can I use the SQLserver2008Dialect.java, Copy/Past from later versions of hibernate to my envronement?
2. Can I change my hibernatee-core.jar to insert my new dialect MS SQL Server 2008 ?
Regards
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 11 months
[Hibernate-JIRA] Created: (ANN-728) @NaturalId doesn't work with @Embeddable/@Embedded
by Kenny MacLeod (JIRA)
@NaturalId doesn't work with @Embeddable/@Embedded
--------------------------------------------------
Key: ANN-728
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-728
Project: Hibernate Annotations
Issue Type: Bug
Affects Versions: 3.3.1.GA
Reporter: Kenny MacLeod
Attachments: BugTestCase.java
If I try to annotate an @Entity's field with @NaturalId, and that field happens to be @Embedded or @Embeddable, then hibernate barfs with
org.hibernate.MappingException: Unable to find logical column name from physical name component in table BugTestCase$MyEntity
at org.hibernate.cfg.Mappings.getLogicalColumnName(Mappings.java:514)
at org.hibernate.cfg.IndexOrUniqueKeySecondPass.doSecondPass(IndexOrUniqueKeySecondPass.java:61)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1136)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:324)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:859)
See attached unit test as a demonstration.
Surely this is not an exotic scenario?
Tested with Hibernate Core 3.2.6-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
13 years, 11 months
[Hibernate-JIRA] Created: (HSEARCH-1091) ClassNotFoundException on startup
by Bozhidar Bozhanov (JIRA)
ClassNotFoundException on startup
---------------------------------
Key: HSEARCH-1091
URL: https://hibernate.onjira.com/browse/HSEARCH-1091
Project: Hibernate Search
Issue Type: Bug
Affects Versions: 4.1.0.Final
Reporter: Bozhidar Bozhanov
I just upgraded hibernate search from 4.0.0 to 4.1.0. On my windows machine it works fine, but on the servier (EC2 default linux), it fails with:
Caused by: java.lang.NoClassDefFoundError: org/jgroups/Receiver
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406)
at java.lang.Class.getConstructor0(Class.java:2716)
at java.lang.Class.getConstructor(Class.java:1674)
at org.hibernate.search.util.impl.ClassLoaderHelper.checkHasNoArgConstructor(ClassLoaderHelper.java:213)
at org.hibernate.search.util.impl.ClassLoaderHelper.instanceFromClass(ClassLoaderHelper.java:104)
at org.hibernate.search.util.impl.ClassLoaderHelper.instanceFromName(ClassLoaderHelper.java:85)
at org.hibernate.search.engine.ServiceManager.listAndInstantiateServiceProviders(ServiceManager.java:54)
at org.hibernate.search.engine.ServiceManager.<init>(ServiceManager.java:37)
at org.hibernate.search.spi.SearchFactoryBuilder.createCleanFactoryState(SearchFactoryBuilder.java:312)
at org.hibernate.search.spi.SearchFactoryBuilder.buildNewSearchFactory(SearchFactoryBuilder.java:204)
at org.hibernate.search.spi.SearchFactoryBuilder.buildSearchFactory(SearchFactoryBuilder.java:142)
at org.hibernate.search.event.impl.FullTextIndexEventListener.initialize(FullTextIndexEventListener.java:129)
at org.hibernate.search.hcore.impl.HibernateSearchIntegrator.integrate(HibernateSearchIntegrator.java:82)
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:302)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1740)
at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:88)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:889)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:268)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:310)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
... 33 more
Caused by: java.lang.ClassNotFoundException: org.jgroups.Receiver
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523)
... 57 more
java -version:
OpenJDK Runtime Environment (IcedTea6 1.9.1) (amazon-44.1.9.1.18.amzn1-i386)
OpenJDK Client VM (build 19.0-b06, mixed mode)
I don't reference jgroups anywhere in the project. My cache provider is EhCache, but no use of jgroups. And the issue did not occur with Hibernate Search 4.0.0
The only Lucene configuration is:
<property name="hibernate.search.default.directory_provider"
value="org.hibernate.search.store.impl.FSDirectoryProvider" />
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 12 months
[Hibernate-JIRA] Created: (HHH-2085) org.hibernate.event.def.DefaultLoadEventListener logs exception at info level
by Don Smith (JIRA)
org.hibernate.event.def.DefaultLoadEventListener logs exception at info level
-----------------------------------------------------------------------------
Key: HHH-2085
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2085
Project: Hibernate3
Type: Bug
Components: core
Versions: 3.2.0.cr2
Environment: Hibernate 3.2.0.cr2, MySQL 4.0.18
Reporter: Don Smith
Priority: Minor
Prior to schema generation, accessing a persistent object throws an exception, as expected. The org.hibernate.event.def.DefaultLoadEventListener logs the exception at the info level, which just adds noise to the application console, and prevents application exception handling (in my case it's valid if the table doesn't exist, so I just want to catch the exception and continue). This log statement should be removed, or moved to a debug or trace level, so it won't show up in normal execution.
Code, from line 94 of org.hibernate.event.def.DefaultLoadEventListener:
catch(HibernateException e) {
log.info("Error performing load command", e);
throw e;
}
--
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, 12 months
[Hibernate-JIRA] Created: (HHH-5964) IllegalArgumentException (Parameter value ... was not matching type ...) for JPA-Query: Worked with 3.3.1.GA
by Sebastian Hasait (JIRA)
IllegalArgumentException (Parameter value ... was not matching type ...) for JPA-Query: Worked with 3.3.1.GA
------------------------------------------------------------------------------------------------------------
Key: HHH-5964
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5964
Project: Hibernate Core
Issue Type: Bug
Components: entity-manager
Affects Versions: 3.6.1
Reporter: Sebastian Hasait
We have switched from core-3.3.1.GA and entity-manager-3.4.0.GA to 3.6.1.Final.
Now some queries stopped working.
This is caused by an additional type check in org.hibernate.ejb.AbstractQueryImpl#registerParameterBinding@359 which does not care about hibernate-proxies. This method is called from QueryImpl#setParameter(...). This call doesn't exist in 3.4.0.GA.
I think the proxies should be as transparent as possible. So if I get a proxy from some relation getter and put this into a query as parameter, there should be no exception.
Because the proxy cannot know the concrete type without initializing the proxy-target (reading discriminator from database) there remain four solutions:
1.) Hibernate is not checking the type for proxies OR only ensures expected type and proxy-type are related.
2.) Hibernate initializes the parameter and the type checking works without exception.
3.) Our DAO initializes the parameter before passing.
4.) We rewrite our queries to pass only the PK
I would prefer 1 or 2. :-)
Will attach test case asap.
--
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, 12 months