ObjectDB ObjectDB

Issue #1112: ObjectDb Doctor : Failed to locate set method for field property com.test.Video$VideoId.sourceId using reflection (error 316)

Type: Bug ReoprtVersion: 2.4.6Priority: NormalStatus: ActiveReplies: 2
#1

Hello everyone !

I have just launched the ObjectDb Doctor for testing purposes.

But while inspecting my base, the Doctor throws me a strange error :

[ObjectDB 2.4.6] Invalid ID class com.test.Video$VideoId for type com.test.Video

(Failed to locate set method for field property com.test.Video$VideoId.sourceId using reflection) (error 316)

It seems that the Doctor can't find the SourceId, that is a part of my primary key.

There is a description of my Video bean :

 


@Entity(name = "Video")

@IdClass(Video.VideoId.class)
public class Video {

    protected String provider;
    protected String sourceId;

    @Id
    public String getSourceId() {
        return sourceId;
    }

    public void setSourceId(String value) {
        this.sourceId = value;
    }

    @Id
    public String getProvider() {
        return provider;
    }

    public void setProvider(String value) {
        this.provider = value;
    }

    public static class VideoId {

        protected String provider;
        protected String sourceId;

        public String getSourceId() {
            return sourceId;
        }

        public void setSourceId(String value) {
            this.sourceId = value;
        }

        public String getProvider() {
            return provider;
        }

        public void setProvider(String value) {
            this.provider = value;
        }
    }
}

FIY : I can't change the objectdb version in my server. :(

edit
delete
#2

Thank you for this report.

As a workaround, try to run the Doctor with your classes in the classpath.

ObjectDB Support
edit
delete
#3

Just tried running the Doctor on a database with your model (a Video instance) and it worked.

If you can share a database that has this problem, it would help.

ObjectDB Support
edit
delete

Reply

To post on this website please sign in.