Hector object mapper issue

23 views
Skip to first unread message

VB

unread,
Mar 29, 2014, 7:55:10 PM3/29/14
to hector...@googlegroups.com

I am using hector API (with JPA annotations) and I keep getting message : me.prettyprint.hom.cache.HectorObjectMapperException: Property, User.UserId, does not have proper setter/getter. There is not users column family. I have also added @AnonymousPropertyAddHandler and @AnonymousPropertyCollectionGetter annotated functions to handle unknow property, I still get this exception.    

Code snippet 
    @Id
    @Column(name="UserId")
    public String UserId;

    public String getUserId() {
        return this.UserId;
    }

    public void setUserId(String userId) {
        this.UserId = userId;
    }

Cassandra type for UserId
    "UserId" text PRIMARY KEY



Exception in thread "main" me.prettyprint.hom.cache.HectorObjectMapperException: Property, User.UserId, does not have proper setter/getter
at me.prettyprint.hom.ClassCacheMgr.initializePropertiesMapDef(ClassCacheMgr.java:196)
at me.prettyprint.hom.ClassCacheMgr.initializeCacheForClass(ClassCacheMgr.java:123)
at me.prettyprint.hom.EntityManagerImpl.initializeClasspath(EntityManagerImpl.java:93)
at me.prettyprint.hom.EntityManagerImpl.initialize(EntityManagerImpl.java:79)
at me.prettyprint.hom.EntityManagerImpl.<init>(EntityManagerImpl.java:64)
at me.prettyprint.hom.EntityManagerImpl.<init>(EntityManagerImpl.java:41)
at com.coupons.nextgen.dao.OffersDaoImpl.main(OffersDaoImpl.java:18)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)


Any clue what is wrong?

Reply all
Reply to author
Forward
0 new messages