Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

oracle.jbo.server.ViewRowSetImpl cannot be cast to oracle.jbo.Row

3226374May 22 2016 — edited May 23 2016

please what can be the cause of my error.

i have OneToMany realtionship between my documentVo and aclPublic,

This is the error:

java.lang.ClassCastException: oracle.jbo.server.ViewRowSetImpl cannot be cast to oracle.jbo.Row

  at tn.ooredoo.helpdsk.model.view.DocumentsViewRowImpl.getAclpublicView(DocumentsViewRowImpl.java:747)

  at tn.ooredoo.helpdsk.model.view.DocumentsViewRowImpl.isPublicReadWrite(DocumentsViewRowImpl.java:408)

  at tn.ooredoo.helpdsk.model.view.DocumentsViewRowImpl.isDocReadWrite(DocumentsViewRowImpl.java:421)

  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 oracle.adf.model.binding.DCInvokeMethod.invokeMethod(DCInvokeMethod.java:690)

  at oracle.adf.model.binding.DCDataControl.invokeMethod(DCDataControl.java:2181)

so this is the code that i have wrote in documentRowImpl:

public oracle.jbo.Row getAclpublicView() {

    return (oracle.jbo.Row)getAttributeInternal(ACLPUBLICVIEW);//(DocumentsViewRowImpl.java:747)

  }

public Boolean isPublicReadWrite() {

    Boolean bp = new Boolean(Boolean.FALSE);

     oracle.jbo.Row rowPub = getAclpublicView();//(DocumentsViewRowImpl.java:408)

         if (rowPub.getAttribute("Privilege")=="rw") {

        bp=true;

    } else {

        bp=false;

    }

        return bp;

  }

  public Boolean isDocReadWrite(Number id) {

    Boolean b = new Boolean(Boolean.FALSE);

    if (isPrivate()) {

      b = true;

    } else if (isPublic()) {

      b = isPublicReadWrite();//(DocumentsViewRowImpl.java:421)

    }

     return b;

    }

This post has been answered by Timo Hahn on May 22 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 20 2016
Added on May 22 2016
17 comments
4,617 views