[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4870) Cannot determine java-type from given member [null]
Andreas Joseph Krogh (JIRA)
noreply at atlassian.com
Mon Mar 22 16:40:31 EDT 2010
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=35916#action_35916 ]
Andreas Joseph Krogh commented on HHH-4870:
-------------------------------------------
Hi.
I'm having this issue too, using 3.5-CR2.
I should mention that I'm coding all my JPA2-entities in Scala-2.8.0-Beta1.
Here's the TRACE-log:
2010-03-22 21:20:35,792 | TRACE | main | org.hibernate.ejb.metamodel.AttributeFactory | Starting attribute metadata determination [visitZipCode]
2010-03-22 21:20:35,792 | TRACE | main | org.hibernate.ejb.metamodel.AttributeFactory | Determined member [private java.lang.String no.officenet.origo.core.domain.model.company.Company.visitZipCode]
2010-03-22 21:20:35,792 | TRACE | main | org.hibernate.ejb.metamodel.AttributeFactory | determined type [name=string, class=org.hibernate.type.StringType]
2010-03-22 21:20:35,792 | TRACE | main | org.hibernate.ejb.metamodel.AttributeFactory | Building attribute [no.officenet.origo.core.domain.model.company.Company._no_officenet_origo_core_domain_model_calendarentry_CalendarEntry_company]
2010-03-22 21:20:35,792 | TRACE | main | org.hibernate.ejb.metamodel.AttributeFactory | Starting attribute metadata determination [_no_officenet_origo_core_domain_model_calendarentry_CalendarEntry_company]
2010-03-22 21:20:35,792 | TRACE | main | org.hibernate.ejb.metamodel.AttributeFactory | Determined member [null]
2010-03-22 21:20:35,793 | TRACE | main | org.hibernate.ejb.metamodel.AttributeFactory | determined type [name=component[companyId], class=org.hibernate.type.EmbeddedComponentType]
2010-03-22 21:20:35,793 | TRACE | main | org.hibernate.ejb.metamodel.MetadataContext | Completed entity [no.officenet.origo.core.domain.model.company.Company]
...
...<lots of Spring-messages "Destroying singletons in ..."
...
Caused by: java.lang.IllegalArgumentException: Cannot determine java-type from given member [null]
at org.hibernate.ejb.metamodel.AttributeFactory$BaseAttributeMetadata.<init>(AttributeFactory.java:605)
at org.hibernate.ejb.metamodel.AttributeFactory$SingularAttributeMetadataImpl.<init>(AttributeFactory.java:685)
at org.hibernate.ejb.metamodel.AttributeFactory$SingularAttributeMetadataImpl.<init>(AttributeFactory.java:675)
at org.hibernate.ejb.metamodel.AttributeFactory.determineAttributeMetadata(AttributeFactory.java:547)
at org.hibernate.ejb.metamodel.AttributeFactory.buildAttribute(AttributeFactory.java:90)
at org.hibernate.ejb.metamodel.MetadataContext.wrapUp(MetadataContext.java:183)
I have a unidirectional, @ManyToOne mappimg from CalendarEntry to Company:
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "relation_id", referencedColumnName = "id")
@BeanProperty
var company:Company = null
The referencedColumnName is the following in Company:
@Column(name = "id", nullable = false, unique = true, updatable = false, insertable = false)
@org.hibernate.annotations.Generated(org.hibernate.annotations.GenerationTime.INSERT)
@BeanProperty
var companyId: java.lang.Long = null
I don't know if this is valuable information to anyone...
I can work around it by setting hibernate.ejb.metamodel.generation=disabled but it seems pretty hackish...
This exact same code worked fine using Hibernate-core 3.3.2.GA, Hibernate-entitymanager 3.4.0.GA (JPA1)
> Cannot determine java-type from given member [null]
> ---------------------------------------------------
>
> Key: HHH-4870
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4870
> Project: Hibernate Core
> Issue Type: Bug
> Components: entity-manager
> Affects Versions: 3.5.0-Beta-4
> Environment: jdk 6u18
> glassfishv3
> Reporter: Marcial Atienzar
> Assignee: Steve Ebersole
> Attachments: eclipse.debug, Empre.java, hibernate.cfg.xml, hibernateTest.ear, persistence.xml, Prcontra.java, PrcontraPK.java
>
>
> I've tested to migrate from hibernate 3.3.2 to 3.5.0 Beta4.
> I've remove all hibernate*.jar from classpath and add only de hibernate3.jar
> I've downloaded the source off hibernate-entitymanager to debug from eclipse. I've reached the class that has the error, but I don't know what can I do to resolve it.
> I'm doing something wrong?
> I attatch the sources of the classes that takes part on eclipse debug.
> I don't know how to attach a testcase. The project has more than 200 entities.
> I've post previously in hibernate forums:
> https://forum.hibernate.org/viewtopic.php?f=1&t=1002363&p=2424419#p2424419
--
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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list