Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IllegalAccessException on listAll method #804

Open
ajinkyaw opened this issue Aug 2, 2018 · 1 comment
Open

IllegalAccessException on listAll method #804

ajinkyaw opened this issue Aug 2, 2018 · 1 comment

Comments

@ajinkyaw
Copy link

ajinkyaw commented Aug 2, 2018

I am trying to show the stored values in the table, but unfortunately i am facing this exception.

java.lang.IllegalAccessException: Class java.lang.Class<com.orm.SugarRecord> cannot access method void com.tranquil.bioattendance.models.PRIME_APPUSER.<init>() of class java.lang.Class<com.tranquil.bioattendance.models.PRIME_APPUSER>

the line where it is occurring is

//Here the record is getting stored successfully
PRIME_APPUSER loginUserModel = new PRIME_APPUSER ();
//setter methods
loginUserModel.save();
List<PRIME_APPUSER> loginUserList = PRIME_APPUSER.listAll(PRIME_APPUSER.class);

Here is my class :

public class PRIME_APPUSER extends SugarRecord {

    PRIME_APPUSER() {

    }

    @SerializedName("FormId")
    @Expose
    private Integer FormId;

    @SerializedName("Role")
    @Expose
    private String Role;

    @SerializedName("FormDate")
    @Expose
    private String FormDate;

    @SerializedName("UserName")
    @Expose
    private String UserName;

    @SerializedName("PassWord")
    @Expose
    private String PassWord;

    @SerializedName("SecurityQue")
    @Expose
    private String SecurityQue;

    @SerializedName("Answer")
    @Expose
    private String Answer;

    public Integer getFormId() {
        return FormId;
    }

    public void setFormId(Integer formId) {
        FormId = formId;
    }


    public String getRole() {
        return Role;
    }

    public void setRole(String role) {
        Role = role;
    }

    public String getFormDate() {
        return FormDate;
    }

    public void setFormDate(String formDate) {
        FormDate = formDate;
    }


    public String getUserName() {
        return UserName;
    }

    public void setUserName(String userName) {
        UserName = userName;
    }

    public String getPassWord() {
        return PassWord;
    }

    public void setPassWord(String passWord) {
        PassWord = passWord;
    }

    public String getSecurityQue() {
        return SecurityQue;
    }

    public void setSecurityQue(String securityQue) {
        SecurityQue = securityQue;
    }

    public String getAnswer() {
        return Answer;
    }

    public void setAnswer(String answer) {
        Answer = answer;
    }

}

I am initiating the SugarContext in application class too. My other tables doesnt have any issue only this one is giving error.
any suggestion,

@dbrw
Copy link

dbrw commented Jun 28, 2019

Did you find work around on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants