-->
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.  [ 1 post ] 
Author Message
 Post subject: No PropertyTypeExtractor for type void (collections problem)
PostPosted: Wed May 16, 2007 12:02 pm 
Newbie

Joined: Tue May 15, 2007 11:06 am
Posts: 1
Using Hibernate 3.2, I get the following error:

javax.persistence.PersistenceException: java.lang.IllegalArgumentException: No PropertyTypeExtractor available for type void

After some debugging, I was able to narrow it down to the following method declaration that is inside an entity class:
protected ArrayList<Integer[][]> splitEventTimes(Integer[][] eventTimes)
The exception is thrown as well for the following declaration:
protected ArrayList<Integer[]> splitEventTimes(Integer[][] eventTimes)
The exception is not thrown for the following declarations:
protected ArrayList<Integer> splitEventTimes(Integer[][] eventTimes)
protected ArrayList<ArrayList<Integer>> splitEventTimes(Integer[][] eventTimes)

It appears that when the EntityManagerFactory is being initialized and "visiting" each entity class, it does not recognize collections of arrays. I don't know whether this qualifies as a bug or not, but is there any way I can force the reflector to ignore or skip over this particular method declaration? I could rewrite it to do a three-dimensional array instead if necessary, but would appreciate advice first.

I also notice there are a few other people who seem to have had this problem when I googled for this exception, but none of them were able to resolve it. It would probably be nice to add a more informative error message if you decide this is not a "bug" so that they know what needs to be done to fix it.

If you need additional information, please let me know!


The stacktrace is as follows:

javax.persistence.PersistenceException: java.lang.IllegalArgumentException: No PropertyTypeExtractor available for type void
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:258)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:120)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)
at epl.physiology.TCTest.persist(TCTest.java:82)
at epl.physiology.TCTest.testPersistence(TCTest.java:75)
Caused by: java.lang.IllegalArgumentException: No PropertyTypeExtractor available for type void
at org.hibernate.annotations.common.reflection.java.JavaReflectionManager.toXType(JavaReflectionManager.java:164)
at org.hibernate.annotations.common.reflection.java.JavaXMethod.create(JavaXMethod.java:18)
at org.hibernate.annotations.common.reflection.java.JavaReflectionManager.getXMethod(JavaReflectionManager.java:128)
at org.hibernate.annotations.common.reflection.java.JavaXClass.getDeclaredMethods(JavaXClass.java:114)
at org.hibernate.ejb.event.CallbackResolver.resolveCallback(CallbackResolver.java:56)
at org.hibernate.ejb.event.EntityCallbackHandler.addCallback(EntityCallbackHandler.java:92)
at org.hibernate.ejb.event.EntityCallbackHandler.add(EntityCallbackHandler.java:37)
at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:158)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:888)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:186)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:246)


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

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.