-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Generics with wildcard bug
PostPosted: Thu Jul 15, 2010 7:42 am 
Newbie

Joined: Mon Oct 10, 2005 6:11 am
Posts: 10
Hi,

I have the following exception on the latest release:

Code:
SEVERE: an assertion failure occured (this may indicate a bug in Hibernate)
org.hibernate.annotations.common.AssertionFailure: Fail to process type argument in a generic declaration. Member : de.lsb.sample.persistenceinfrastructure.basic.domainmodel.entity.account.implementation.AccountImplJPA#histories Type: class sun.reflect.generics.reflectiveObjects.WildcardTypeImpl
   at org.hibernate.ejb.metamodel.AttributeFactory$PluralAttributeMetadataImpl.getClassFromGenericArgument(AttributeFactory.java:846)
   at org.hibernate.ejb.metamodel.AttributeFactory$PluralAttributeMetadataImpl.<init>(AttributeFactory.java:756)
   at org.hibernate.ejb.metamodel.AttributeFactory$PluralAttributeMetadataImpl.<init>(AttributeFactory.java:731)
   at org.hibernate.ejb.metamodel.AttributeFactory.determineAttributeMetadata(AttributeFactory.java:518)
   at org.hibernate.ejb.metamodel.AttributeFactory.buildAttribute(AttributeFactory.java:93)
   at org.hibernate.ejb.metamodel.MetadataContext.wrapUp(MetadataContext.java:183)
   at org.hibernate.ejb.metamodel.MetamodelImpl.buildMetamodel(MetamodelImpl.java:66)
   at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:84)
   at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:891)
   at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:57)
   at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:48)
   at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:32)
   at de.lsb.sample.persistenceinfrastructure.basic.infrastructure.EntityManagerFactory.getCurrentEntityManager(EntityManagerFactory.java:138)
   at de.lsb.sample.persistenceinfrastructure.basic.infrastructure.EntityManagerFactory.getCurrentEntityManager(EntityManagerFactory.java:95)
   at de.lsb.sample.persistenceinfrastructure.basic.application.PISSample.clearTables(PISSample.java:92)
   at de.lsb.sample.persistenceinfrastructure.basic.application.PISSample.run(PISSample.java:236)
   at de.lsb.sample.persistenceinfrastructure.basic.application.PISSample.main(PISSample.java:43)


I get this only when my mapping look like this:

Code:
    @OneToMany(targetEntity = AccountImplJPA.class)
    private Collection<? extends Account> accounts;

    public Collection<? extends Account> getAccounts() {
        return this.accounts;
    }


Any idea?


Top
 Profile  
 
 Post subject: Re: Generics with wildcard bug
PostPosted: Tue Nov 02, 2010 5:53 am 
Newbie

Joined: Tue Nov 02, 2010 5:23 am
Posts: 1
I ran into the same problem today. I've created an issue here: HHH-5712


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.