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!

Checkbox save issue: java.lang.String cannot be cast to oracle.jbo.RowIterator

MarkRJamiesonOct 18 2013 — edited Oct 18 2013

Hi there,

I am using JDEV 11.1.1.6.0

My objective : " Inserting two new ADF checkbox components to the user interface called Qualifications.jsff "

Assumption:

1) These check-boxes both come from a VO called LsIndividual

2) Both check-boxes save to the format VarChar2(1) and are Strings

3) Selected value is Y, unselected value is N

4) There is a save button in the same context to commit these values to the DB

Once I have these components in the interface, I deploy and run the application. When I select the check-boxes and press Save, there is an error presented and it prevents me from committing these values to the DB.

The following is displayed in a text box titled Error:

java.lang.String cannot be cast to oracle.jbo.RowIterator

And here's an excerpt from the stack:

<Utils> <buildFacesMessage> ADF: Adding the following JSF error message: java.lang.String cannot be cast to oracle.jbo.RowIterator

java.lang.ClassCastException: java.lang.String cannot be cast to oracle.jbo.RowIterator

  at au.com.lawsociety.dmm.model.core.entity.LsIndividualImpl.getLsApp(LsIndividualImpl.java:1860)

  at au.com.lawsociety.dmm.model.core.entity.LsIndividualImpl$AttributesEnum$33.get(LsIndividualImpl.java:366)

  at au.com.lawsociety.dmm.model.core.entity.LsIndividualImpl.getAttrInvokeAccessor(LsIndividualImpl.java:1834)

  at oracle.jbo.server.EntityImpl.getAttribute(EntityImpl.java:1715)

  at oracle.jbo.server.ViewRowStorage.getAttributeInternal(ViewRowStorage.java:1815)

  at oracle.jbo.server.ViewRowImpl.getAttributeValue(ViewRowImpl.java:1923)

  at oracle.jbo.server.ViewRowImpl.getAttributeInternal(ViewRowImpl.java:866)

  at au.com.lawsociety.dmm.model.core.view.LsIndividualVORowImpl.getNotaryPublicFlag(LsIndividualVORowImpl.java:1210)

  at au.com.lawsociety.dmm.model.core.view.LsIndividualVORowImpl$AttributesEnum$36.get(LsIndividualVORowImpl.java:376)

  at au.com.lawsociety.dmm.model.core.view.LsIndividualVORowImpl.getAttrInvokeAccessor(LsIndividualVORowImpl.java:1360)

  at oracle.jbo.server.ViewRowImpl.getAttribute(ViewRowImpl.java:896)

  at oracle.jbo.uicli.binding.JUCtrlListBinding.updateValuesFromRow(JUCtrlListBinding.java:2656)

  at oracle.jbo.uicli.binding.JUCtrlValueBinding.updateRow(JUCtrlValueBinding.java:372)

  at oracle.jbo.uicli.binding.JUIteratorBinding.notifyUpdateEvent(JUIteratorBinding.java:355)

  at oracle.adf.model.binding.DCIteratorBinding.rowUpdated(DCIteratorBinding.java:1190)

  at oracle.jbo.common.RowSetHelper.fireRowUpdated(RowSetHelper.java:246)

  at oracle.jbo.server.ViewRowSetIteratorImpl.fireRowUpdated(ViewRowSetIteratorImpl.java:3752)

  at oracle.jbo.server.ViewRowSetIteratorImpl.notifyRowUpdated(ViewRowSetIteratorImpl.java:3371)

  at oracle.jbo.server.ViewRowSetImpl.notifyRowUpdated(ViewRowSetImpl.java:2058)

  at oracle.jbo.server.ViewObjectImpl.notifyRowUpdated(ViewObjectImpl.java:12204)

  at oracle.jbo.server.ViewObjectImpl.notifyRowUpdated(ViewObjectImpl.java:12193)

  at oracle.jbo.server.ViewObjectImpl.notifyRowUpdated(ViewObjectImpl.java:12136)

  at oracle.jbo.server.ViewObjectImpl.afterRowUpdate(ViewObjectImpl.java:13833)

  at oracle.jbo.server.ViewObjectImpl.sourceChanged(ViewObjectImpl.java:14136)

Other check-boxes within the same application are working fine, it's just the check-boxes on this page that I am having issues with.

Any advice or help is very welcome!

Mark

Comments

Frank Nimphius-Oracle

Hi, would have been good if you could reproduce this in a test case or at least have provided some sniptes showing your implementation. From the stack trace my thinking is that the value property of the check box is bound to an iterator instead of an attribute value binding. Debugging this class may also help   at au.com.lawsociety.dmm.model.core.entity.LsIndividualImpl.getLsApp(LsIndividualImpl.java:1860)  Frank

1012433

Hi,

First check the data type of that checkbox attribute field in DB and EO,VO's after that if both are same

Go to fragment page and delete,After that drag that particular field from datacontrol and drop as checkbox in UI in that time one daiolgue is appeared

You enter selected value and and unselected value.......then you can run your page.

Thanks.

MarkRJamieson

Sorry about that Frank, I am new to the forum! I will chuck in a screen shot of the implementation and a test case for the page and what I am trying to achieve.

http://s11.postimg.org/ol8xf8jf7/Qualifications.png

The screen shot is in jdev because I can't give out a deployed image with real data in it for privacy reasons, but in the larger context outside of this jsff is the save and search buttons inside an action menu. I hope you understand.

Assumptions:

1) You are presented with a search screen to query for an Individual from a list of Individuals

2) An Individual can have many associated Qualifications

3) These Qualifications have an indId which connects them from LsQualifications to LsIndividual

Test Case for adding Qualifications to an Invdividual

1. Search for an individual

2. Select Individual

3. Select Qualifications tab

4. In Qualification tab, press 'Add Admission'

5. Enter an LPAB Number, check both checkboxes
5. Select 'Date of Admission' from date select, 'Place of Admission' from list of values, Jurisdiction if applicable, Re-Admission Date if applicable and click the Comments icon to insert comments

6. Click 'Action Options -> Save'
7. Click 'Action Options -> Search ..', screen should navigate back to 'Individual Search' screen
8. press Search, select an Individual, screen should navigate back to individual Maintenance


I hope this helps more!

MarkRJamieson

Unfortunately I have already followed that procedure a couple of times to no avail.
I have also closely traced the implementation of the other check-boxes in this application and the error remains.

1012433

Hi,

Post the "Label" and "Value" details from property inspector of particular field... and clarify one thing entire screenshot form having single vo or different?

Thanks.

1 - 5
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Nov 15 2013
Added on Oct 18 2013
5 comments
1,399 views