Current Position:Home > Dynamic view object loses bind variables after passivation

Dynamic view object loses bind variables after passivation

Update:10-11Source: network consolidation
Advertisement
I am creating a view object definition/view object programmatically in Jdev 11.1.1.2.0. The query requires a named bind parameter. All was working fine but now I am testing with app module pooling disabled and the bind variable is not being restored after passivation -- it's like the definition has disappeared or something.
Here is my VO creation code:
ViewObject vo = findViewObject("FinalistsWithEvalDataVO");
if (vo != null){
vo.remove();
ViewDefImpl voDef = new ViewDefImpl("FinalistsWithEvalDataVODef");
     // I add a bunch of viewAttrs here...
voDef.setQuery(fullQuery);
voDef.setFullSql(true);
voDef.setBindingStyle(SQLBuilder.BINDING_STYLE_ORACLE_NAME);
voDef.resolveDefObject();
voDef.registerDefObject();
vo = createViewObject("FinalistsWithEvalDataVO", voDef);
vo.defineNamedWhereClauseParam("Bind_SchlrAyId", null, new int[] {0});
vo.setNamedWhereClauseParam("Bind_SchlrAyId", new Number(1)); //For testing
vo.executeQuery();
The query executes fine right there and then the VO seems to passivate fine. I even see the bind var in passivation:
<exArgs count="1">
<arg name="Bind_SchlrAyId" type="oracle.jbo.domain.Number">
<![CDATA[1]]>
</arg>
</exArgs>
But then when it reactivates prior to rendering the page, it invariably throws a missing parameter exception and this in the log:
<ViewUsageHelper><createViewAttributeDefImpls> [7409] *** createViewAttributeDefImpls: [email protected]
<ViewUsageHelper><createViewAttributeDefImpls> [7410] Bind params for ViewObject: [FinalistsWithEvalDataVO]AwardViewingServiceAM.FinalistsWithEvalDataVO
<ViewUsageHelper><createViewAttributeDefImpls> [7411] ViewUsageHelper.createViewAttributeDefImpls failed...
<ViewUsageHelper><createViewAttributeDefImpls> [7412] java.sql.SQLException: Missing IN or OUT parameter at index:: 1
I have worked on this for hours and can't see anything wrong. Like I said, it works fine when not forcing passivation...
Any help would be appreciated.
Thanks.
-Ed

The Best Answer

Advertisement
@Jobinesh - Thanks for the suggestions. I have read all the documentation I can find. Everything works fine without passivation. Everything still breaks with passivation. I have given up on trying to get the bind variable to restore after passivation and am currently just building the query with all values embedded in the query rather than bind variables. This is bad practice but avoids the problem. However, now that I avoided that obstacle, I'm on to the next issue with passivation of this dynamic view object, which is that the current row primary key apparently cannot be reset after activation. I get the following error:
<Key><parseBytes> [7244] Key(String, AttributeDef[]): Invalid Key String found. AttributeCount:1 does not match Key attributes
<DCBindingContainer><reportException> [7254] oracle.jbo.InvalidParamException: JBO-25006: Value 00010000000A30303033383133343734 passed as parameter String to method Constructor:Key is invalid: {3}.
     at oracle.jbo.Key.parseBytes(Key.java:537)
     at oracle.jbo.Key.<init>(Key.java:179)
     at oracle.jbo.server.IteratorStateHolder.getCurrentRowKey(IteratorStateHolder.java:34)
     at oracle.jbo.server.ViewRowSetIteratorImpl.activateIteratorState(ViewRowSetIteratorImpl.java:3877)
I've been trying various workarounds for over a day now with no luck. Very frustrating.
Thanks for trying to help.
-Ed
  • Dynamic view object loses bind variables after passivation Update:10-11

    I am creating a view object definition/view object programmatically in Jdev 11.1.1.2.0. The query requires a named bind parameter. All was working fine but now I am testing with app module pooling disabled and the bind variable is not being restored

  • How to bind the value of textbox with View object's bind variable? Update:11-30

    Hi all, In my use case I need to pass the value of textbox in the jsf page to the View Object's bind variable. I should not hard code this in my backing bean. I need to configure in the Jdeveloper itself. I am using Jdeveloper 11.1.1.4.0 version. Kin

  • View object query bind variable Update:10-11

    I have a bind variable in my view object query and "Required" is unchecked for it. Due to this JUnits are failing with the Missing IN or OUT parameter error. If I set the bind variable as required, the JUnits run fine. But this bind variable is

  • View link accessor for master view object with bind variables Update:11-30

    Is there a way to set bind variables for a view object to which a view link accessor is used to retrieve a view row from a detail view row in a master-detail relationship ? I understand that RowSet (or Row) returned by a view link accessor originates

  • View object with bind variables in subqueries Update:11-30

    Hi, i create view object with this query: Select /*+ use_nl(p p2) */ 'F' tipo_persona, p.ID_PERSONA, p.TDOC, p.NDOC, p.DENO From SINT_PERSONA p, ( Select /*+ index(a SINT_PERSONA_IX2) */ a.ID_PERSONA From SINT_PERSONA_DOCUMENTO a where ( NDOC = :p_cu

  • View object with bind variables on jsf page Update:11-30

    I have jsf page with selectoncechoice field and the list is populated with view object query. I would like to change the page to include another text field before the selectonechoice and add where clasue to my view object to use this field value so i

  • Get bind variables of a dynamic view object Update:10-11

    I seem unable to retrieve the bind variables for a dynamically created view object, even though I can do the same thing for a regular view object. Here is the code: newVO = repServ.createViewObjectFromQueryStmt("newQry",strSql); VariableValueMan

  • Creating and Accessing a Dynamic View Object Update:10-11

    Hi, I'm needing to create a Dynamic View Object so to have the ability to modify the FROM and WHERE clauses in an SQL statement. I then need to view all the columns and rows in an adf table or something similar. I've read up a fair bit on similar sit

  • How to create dynamic View Object and Dynamic Table Update:10-11

    Dear ll I want to create a dynamic view object and display the output in a dynamic table on the page. I am using Jdeveloper 12c "Studio Edition Version 12.1.2.0.0" This what I did: 1- I created a read only view object with this query "Selec

  • Master-detail with dynamic view object Update:10-11

    How can you create a view link with a view object that is dynamic? I have created a master-detail relationship on a UIX page. I change the master view object at runtime using a view definition and SQL and then I bind the view object to an iterator on