[Hibernate-JIRA] Created: (HSEARCH-233) Only one @IndexedEmbedded collection working in my entity.
by sam doyle (JIRA)
Only one @IndexedEmbedded collection working in my entity.
----------------------------------------------------------
Key: HSEARCH-233
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-233
Project: Hibernate Search
Issue Type: Bug
Affects Versions: 3.0.1.GA
Environment: JBoss AS 4.2.2 Windows
Reporter: sam doyle
Attachments: jiraFiles.tar.gz
This is supposedly pretty basic functionality so perhaps it is my particular case that it is causing it.
In the attachment files the EmtVenue class is the root of the indexing.
It contains two @IndexedEmbedded
@OneToMany( cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "emtVenue" )
@IndexedEmbedded
public Set<ClientGroupVenue> getClientGroupVenues()
@Embedded
@ManyToOne( fetch = FetchType.LAZY )
@JoinColumns( { @JoinColumn( nullable = false, name = "HOST", referencedColumnName = "HOST" ),
@JoinColumn( nullable = false, name = "zone", referencedColumnName = "ZONE" ) } )
@NotNull
@IndexedEmbedded
public Zones getZones()
In this case when I index EmtVenue the resulting index contains only values that correspond to Zones and no ClientGroupVenues.
When I comment out the @IndexedEmbedded on the Zones the resulting index does show the categories.
One side note that might be of interest is indexing of Zones results in referencing some entities which don't exist that I'm catching due to the data not being in sync.
--
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
15 years, 5 months
[Hibernate-JIRA] Created: (HHH-2354) Schema validation too rigid for MySql enums
by Zeljko Trogrlic (JIRA)
Schema validation too rigid for MySql enums
-------------------------------------------
Key: HHH-2354
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2354
Project: Hibernate3
Type: Bug
Components: metamodel
Environment: jboss-seam-1.1.0.GA, MySQL 5
Reporter: Zeljko Trogrlic
Enum column type in MySQL is handled as CHAR in their JDBC driver and should be mapped to String Java type.
However, Hibernate expects varchar(n) and fails to do the validation.
This is how DatabaseMetaData.getColumns describes it:
DATA_TYPE=1
TYPE_NAME=enum
Note that although TYPE_NAME is enum, DATA_TYPE represents CHAR.
Hibernate reports following exception:
13:49:31,397 INFO [TableMetadata] table found: configuration.userdb_domain_acl
13:49:31,397 INFO [TableMetadata] columns: [id, enabled, tablename, domain]
13:49:31,397 WARN [ServiceController] Problem starting service persistence.units:ear=msmgui.ear,unitName=msmgui
javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong column type: enabled, expected: varchar(
2)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:698)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:127)
at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:264)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Validation should be fixed/relaxed to avoid this problem.
--
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
15 years, 5 months
[Hibernate-JIRA] Created: (HHH-3481) JTATransactionFactory bug when Transaction cannot be found in JNDI
by Steve Ebersole (JIRA)
JTATransactionFactory bug when Transaction cannot be found in JNDI
------------------------------------------------------------------
Key: HHH-3481
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3481
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.3.0.CR2
Reporter: Steve Ebersole
Assignee: Steve Ebersole
Fix For: 3.2.x, 3.3.x, 3.4
This is the code after linked patch:
protected UserTransaction getUserTransaction() {
log.trace( "Attempting to locate UserTransaction via JNDI [{}]", getUserTransactionName() );
try {
UserTransaction ut = ( UserTransaction ) getInitialContext().lookup( getUserTransactionName() );
if ( ut == null ) {
throw new TransactionException( "Naming service lookup for UserTransaction returned null [" + getUserTransactionName() +"]" );
}
log.trace( "Obtained UserTransaction" );
return ut;
}
catch ( NamingException ne ) {
throw new TransactionException( "Could not find UserTransaction in JNDI [" + getUserTransaction() + "]", ne );
}
}
Notice that in catch of NamingException we try to build a TransactionException. It is supposed to embed the JNDI namespace where we attempted to resolve the Transaction; but rather than getUserTransactionName() we are instead calling back into this same exact method getUserTransaction().
--
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
15 years, 5 months
[Hibernate-JIRA] Created: (ANN-791) Variation on 509, can't find join columns in key
by harry clark (JIRA)
Variation on 509, can't find join columns in key
------------------------------------------------
Key: ANN-791
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-791
Project: Hibernate Annotations
Issue Type: Bug
Components: binder
Affects Versions: 3.4.0.GA
Environment: Windows XP, DB2 (AS400), Hib 3.3.1
Reporter: harry clark
Attachments: hibfiles.rtf
I have what appears to be a reprise of issue 509, about finding join columns in keys. This occurs with one to many, not many to one. It occurs on the second pass over the configuration, and varies with order, as the earlier issue. When I move the class where the issue first occurs to be the first class in the config, the error occurs in another class, also in the second pass. That is, the file which raised the exception in the first example is processed successfully in the second, apparently.
I cannot reproduce this in a simple example; there is no simple example with this database, or on this server for admin reasons. I did try on MSSQL. There are ~1360 persistent classes in the ORM, and ~1100 compound key classes. This is a legacy database, obviously, but the ORM is generated from a data modeling tool which has enforced correct key relations, not a hand-written, hand-modified, buggy schema. The join columns are correct. I would very much like to eat humble pie and get on with this project, but doesn't the order variation suggest a Hibernate problem? Has Hib processed this many compound keys? Here is the stack trace. The persistent classes are in an attached file. Thanks.
Initial SessionFactory creation failed.Unable to find column with logical name: THAZCD in org.hibernate.mapping.Table(DBAFREP) and its related supertables and secondary tables
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.kve.util.HibernateUtil.<clinit>(HibernateUtil.java:1360)
at com.kve.main.Main.main(Main.java:22)
Caused by: org.hibernate.MappingException: Unable to find column with logical name: THAZCD in org.hibernate.mapping.Table(DBAFREP) and its related supertables and secondary tables
at org.hibernate.cfg.Ejb3JoinColumn.checkReferencedColumnsType(Ejb3JoinColumn.java:396)
at org.hibernate.cfg.BinderHelper.createSyntheticPropertyReference(BinderHelper.java:102)
at org.hibernate.cfg.annotations.CollectionBinder.bindCollectionSecondPass(CollectionBinder.java:1321)
at org.hibernate.cfg.annotations.CollectionBinder.bindOneToManySecondPass(CollectionBinder.java:654)
at org.hibernate.cfg.annotations.CollectionBinder.bindStarToManySecondPass(CollectionBinder.java:589)
at org.hibernate.cfg.annotations.CollectionBinder$1.secondPass(CollectionBinder.java:543)
at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:66)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1163)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:329)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1319)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
at com.kve.util.HibernateUtil.<clinit>(HibernateUtil.java:1356)
... 1 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
15 years, 5 months
[Hibernate-JIRA] Created: (EJB-277) allow string values for query hints
by Norman Richards (JIRA)
allow string values for query hints
-----------------------------------
Key: EJB-277
URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-277
Project: Hibernate Entity Manager
Type: Improvement
Reporter: Norman Richards
It seems that some string values are not accepted as query hint values in hibernate. In specific, I was trying to convert a simple query that uses setHint("org.hibernate.cacheable", true) to use an XML-defined EntityQuery that uses
<framework:entity-query name="allCategories"
ejbql="select c from Category c"
order="c.name">
<framework:hints>
<key>org.hibernate.cacheable</key>
<value>true</value>
</framework:hints>
</framework:entity-query>
Unfortunately, this fails with an IllegalArgumentException:
Caused by: java.lang.IllegalArgumentException: Value for hint
at org.hibernate.ejb.QueryImpl.setHint(QueryImpl.java:160)
at org.jboss.seam.framework.EntityQuery.createQuery(EntityQuery.java:114)
at org.jboss.seam.framework.EntityQuery.getResultList(EntityQuery.java:41)
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)
...
Although I didn't try it, I would assume this would also fail from a @QueryHint in on a named query since that annotation only accepts a string
value.
I don't think this is technically a bug, but it would be very convenient if all the hints could accept string values.
--
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
15 years, 5 months