Bug 1028628

Summary: Cannot determine java-type from given member [null] with "properties" - HHH-8689
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Gary Hu <ghu>
Component: HibernateAssignee: Brett Meyer <brmeyer>
Status: CLOSED WORKSFORME QA Contact: Zbyněk Roubalík <zroubali>
Severity: unspecified Docs Contact: Russell Dickenson <rdickens>
Priority: unspecified    
Version: 6.1.0CC: theute
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-19 15:04:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Gary Hu 2013-11-08 22:03:11 UTC
When a "properties" element is defined in the mapping file, for example:
<properties name="refkey">
<property name="field1" type="java.lang.String" column="column3" not-null="true" length="20" />
<property name="field2" type="java.lang.String" column="column4" not-null="true" />
</properties>
The system throws errors:
14:36:32,052 TRACE [org.hibernate.ejb.metamodel.AttributeFactory] (ServerService Thread Pool – 48) Starting attribute metadata determination [refkey]
14:36:32,052 TRACE [org.hibernate.ejb.metamodel.AttributeFactory] (ServerService Thread Pool – 48) Determined member [null]
14:36:32,052 TRACE [org.hibernate.ejb.metamodel.AttributeFactory] (ServerService Thread Pool – 48) Determined type [name=component[field1,field2], class=org.hibernate.type.EmbeddedComponentType]
14:36:32,053 TRACE [org.hibernate.ejb.metamodel.MetadataContext] (ServerService Thread Pool – 48) Completed entity [org.hibernate.issue.EntityClass1]
14:36:32,053 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool – 48) MSC000001: Failed to start service jboss.persistenceunit."hibernateissue-jar-0.0.1-SNAPSHOT.jar#myPU": org.jboss.msc.service.StartException in service jboss.persistenceunit."hibernateissue-jar-0.0.1-SNAPSHOT.jar#myPU": java.lang.IllegalArgumentException: Cannot determine java-type from given member [null]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:103) [jboss-as-jpa-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_37]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_37]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_37]
at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.0.Final-redhat-1.jar:2.1.0.Final-redhat-1]
Caused by: java.lang.IllegalArgumentException: Cannot determine java-type from given member [null]
at org.hibernate.ejb.metamodel.AttributeFactory$BaseAttributeMetadata.<init>(AttributeFactory.java:589)
at org.hibernate.ejb.metamodel.AttributeFactory$SingularAttributeMetadataImpl.<init>(AttributeFactory.java:677)
at org.hibernate.ejb.metamodel.AttributeFactory$SingularAttributeMetadataImpl.<init>(AttributeFactory.java:667)
at org.hibernate.ejb.metamodel.AttributeFactory.determineAttributeMetadata(AttributeFactory.java:531)
at org.hibernate.ejb.metamodel.AttributeFactory.buildAttribute(AttributeFactory.java:98)
at org.hibernate.ejb.metamodel.MetadataContext.wrapUp(MetadataContext.java:212)
at org.hibernate.ejb.metamodel.MetamodelImpl.buildMetamodel(MetamodelImpl.java:88)
at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:104)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:920)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:92)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:200) [jboss-as-jpa-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.access$600(PersistenceUnitServiceImpl.java:57) [jboss-as-jpa-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:99) [jboss-as-jpa-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
... 4 more
This issue is very similar to https://hibernate.atlassian.net/browse/HHH-4870

Please check https://hibernate.atlassian.net/browse/HHH-8689 for more details.

Comment 1 Brett Meyer 2013-11-19 15:04:53 UTC
The test case fails on ORM 4.2.0 (EAP 6.1), but passes on 4.2.1.  It appears that https://hibernate.atlassian.net/browse/HHH-7714 implicitly fixed this in ORM 4.2.1 and is therefore already corrected in EAP 6.2.