users@jersey.java.net

Re: [Jersey] Exact Criteria to avoid: "Some Selected Entity Classes are not valid"??

From: Peter Liu <Peter.Liu_at_Sun.COM>
Date: Thu, 15 May 2008 11:53:31 -0700

Hi Louis,

The issue you encountered should have been fixed with the latest REST
plugin update for NB 6.0.1. (From your other email, it looks like you
are using 6.0.1)
This issue should definitely be fixed in NB 6.1 (Note: The REST plugin
is now part of the 6.1 standard distribution.) I would recommend that
you switch
to NB 6.1 (which will also allow you to upgrade to Jersey 0.7 release.)

Peter

Louis Alexander wrote:
> To be honest im not sure, i havent browsed the issues (maybe a good
> place to start). I was following the programming style laid out in
> _Enterprise JavaBeans 3.0_ (Burke), but the key was to apply my
> annotations to the member variables, and not the getters/setters as
> shown in the text.
>
> Thanks for the reply!
>
> On Thu, May 15, 2008 at 2:19 PM, Peter Liu <Peter.Liu_at_sun.com
> <mailto:Peter.Liu_at_sun.com>> wrote:
>
> Hi Louis,
>
> Are you referring to the issue #135082 logged against NetBeans? I
> tried to reproduce that issue with NB 6.1 and it works fine for me.
> Which version of NetBeans are you using?
>
> Thanks.
>
> Peter
>
> Louis Alexander wrote:
>
> All,
> Forgive me if this is a newbie question, but i was unable to
> find any information in the list archive. What exactly do i
> have to do to my entity bean to avoid the error mentioned in
> my subject when using the "New RESTful WebServices from Entity
> Classes" wizard. I have of course, pasted my code below.
> Thanks in advance
>
> --
> Thanks,
>
> Louis
>
> File: ConversionJob.java....
>
> import javax.persistence.*;
>
> /**
> *
> * @author alexanderl
> */
> @Entity
> public class ConversionJob implements java.io.Serializable {
> private Long id;
> private byte[] rawAudioData;
> private String telephoneNumber;
> private String pin;
> private String email;
>
> @Column( name="RAW_AUDIO_BYTES" )
> @Lob
> public byte[] getRawAudioData() { return rawAudioData; }
> public void setRawAudioData(byte[] rawAudioData) {
> this.rawAudioData = rawAudioData; }
>
> @Column( name="EMAIL" )
> public String getEmail() { return email; }
> public void setEmail(String email) { this.email = email; }
>
> @Id
> @Column( name="ID" )
> public long getId() { return id; }
> public void setId(long id) { this.id <http://this.id>
> <http://this.id> = id; }
>
>
> @Column( name="PIN" )
> public String getPin() { return pin; }
> public void setPin(String pin) { this.pin = pin; }
>
> @Column( name="TELEPHONE_NUMBER")
> public String getTelephoneNumber() { return telephoneNumber; }
> public void setTelephoneNumber(String telephoneNumber) {
> this.telephoneNumber = telephoneNumber; }
> @Override
> public int hashCode() {
> int hash = 0;
> hash += (id != null ? id.hashCode() : 0);
> return hash;
> }
>
> @Override
> public boolean equals(Object object) {
> // TODO: Warning - this method won't work in the case
> the id fields are not set
> if (!(object instanceof NewEntity)) {
> return false;
> }
> ConversionJob other = (ConversionJob) object;
> if ((this.id <http://this.id> <http://this.id> == null
> && other.id <http://other.id> <http://other.id> != null) ||
> (this.id <http://this.id> <http://this.id> != null &&
> !this.id.equals(other.id <http://other.id> <http://other.id>))) {
>
> return false;
> }
> return true;
> }
>
> @Override
> public String toString() {
> return "com.xyz.ConversionJob[id=" + id + "]";
> }
>
> public void submitJob(){
> } }
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> <mailto:users-unsubscribe_at_jersey.dev.java.net>
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
> <mailto:users-help_at_jersey.dev.java.net>
>
>
>
>
> --
> Thanks,
>
> Louis