-->
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.  [ 3 posts ] 
Author Message
 Post subject: No PropertyTypeExtractor available for type void
PostPosted: Mon Nov 12, 2007 3:30 pm 
Newbie

Joined: Wed Nov 07, 2007 3:58 pm
Posts: 15
Hi,

today i have added some new field definitions to my entities which hibernate doesn't like:

Code:
Caused by: java.lang.IllegalArgumentException: No PropertyTypeExtractor available for type void
   at org.hibernate.annotations.common.reflection.java.JavaReflectionManager.toXType(JavaReflectionManager.java:164)


First example: (WORKS)
Code:
private java.lang.Byte[] hasTest19;

I have not mentioned the set / get / and add methods here.

Second ERRONEOUS example:
Code:
@javax.persistence.Column(columnDefinition = "BLOB")
private java.util.HashSet<java.lang.Byte[]> hasTest19a = new java.util.HashSet<java.lang.Byte[]>();


I don't think that the problem results of using arrays in HashSet - but why - BigInteger[] doesn't work either. I tried a lot of classes that all work fine in context of example one. But using them in a HashSet will cause the error.

I'd like to save these values in the database definition BLOB, so i used HashSet and added the @Column annotation, because some databases will use TINYBLOB (was used automatically at hibernate auto dll generation in example one) instead which is to small.

Regards,
Tobias



@20:30 added the set / get and add method :)

Code:
  public void setHasTest19a(java.util.HashSet<java.lang.Byte[]> hasTest19a) {
    this.hasTest19a = hasTest19a;
  }
  public java.util.Set<java.lang.Byte[]> getHasTest19a() {
    return this.hasTest19a;
  }

  public void addHasTest19a(java.lang.Byte[] value) {
        hasTest19a.add(value);
  }



@20:45 changed the get Method from Set to HashSet - NO DIFFERENCE
Code:
  public java.util.HashSet<java.lang.Byte[]> getHasTest19a() {
    return this.hasTest19a;
  }


Last edited by anstetts on Fri Nov 16, 2007 12:01 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 14, 2007 3:09 am 
Newbie

Joined: Wed Nov 07, 2007 3:58 pm
Posts: 15
Come on - this is an urgent problem


Top
 Profile  
 
 Post subject: Re: No PropertyTypeExtractor available for type void
PostPosted: Thu Feb 28, 2013 12:32 pm 
Newbie

Joined: Wed Nov 17, 2010 4:18 am
Posts: 1
I will be too late now, but in case anyone else faces this problem, here is what I think is the solution.

I had a method using an array, like this:
Code:
public List<MyBean[]> getStuff ()
.
The Problem is, that an array is not serializable, but Collections are. Therefor I changed it into
Code:
public List<Collection<MyBean>> getStuff ()
and it worked.

Hope this helps.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.