ViewObject.setWhereClause() strangeness.

I've had an interesting problem when using ViewObjects:
A JSP page uses a ViewObject, and sets the where clause as follows:
view.setWhereClause("Vendorid = :0");
view.setWhereClauseParam(0,anId);
view.executeQuery();
The query executes just fine. A subsequent JSP page uses the same ViewObject, and sets the where clause as follows:
view.setWhereClause("Id = :0");
view.setWhereClauseParam(0,anId);
view.executeQuery();
The problem occurs on the second use of the ViewObject: the row is not found! Upon investigation (Using Diagnostic.properties) I discovered that remenants of the where clause from the first use of the ViewObject remain. The query that actually gets executed is as follows:
[169] jbo.server(int) SELECT Ricscontent.ID, Ricscontent.PARENTID, Ricscontent.VENDORID, ...cut... FROM RICSCONTENT Ricscontent WHERE (Id = :0) AND Ricscontent.VENDORID = :1
As you can see, the where clause includes the Vendorid. When executing the second query first, it works just fine.
Am I doing something wrong, or is this a defect? Is there a work-around to this problem? Any help would be greatly appreciated.
Thanks,
David
I've included the diagnostic log below:
"C:\Program Files\Oracle\JDeveloper 3.1\java1.2\jre\bin\javaw.exe" -mx50m -classpath "O:\\_pages;O:\;C:\Program Files\Oracle\JDeveloper 3.1\lib\webtogo.jar;C:\Program Files\Oracle\JDeveloper 3.1\lib\xmlparser.jar;C:\Program Files\Oracle\JDeveloper 3.1\lib\jdev-rt.zip;C:\Program Files\Oracle\JDeveloper 3.1\lib\jbcl2.0.zip;C:\Program Files\Oracle\JDeveloper 3.1\lib\jdev-rt.zip;C:\Program Files\Oracle\JDeveloper 3.1\lib\connectionmanager.zip;C:\Program Files\Oracle\JDeveloper 3.1\lib\jbohtml.zip;C:\Program Files\Oracle\JDeveloper 3.1\lib\jbojdbcpatch.zip;C:\Program Files\Oracle\JDeveloper 3.1\jdbc\lib\oracle8.1.6\classes12.zip;C:\Program Files\Oracle\JDeveloper 3.1\lib\jbomt.zip;C:\Program Files\Oracle\JDeveloper 3.1\lib\jboorasql.zip;C:\Program Files\Oracle\JDeveloper 3.1\lib\jboremote.zip;C:\Program Files\Oracle\JDeveloper 3.1\lib\jndi.jar;C:\Program Files\Oracle\JDeveloper 3.1\lib\xmlparserv2.jar;C:\Program Files\Oracle\JDeveloper 3.1\lib\ojsp.jar;C:\Program Files\Oracle\JDeveloper 3.1\lib\ojc.jar;C:\Program Files\Oracle\JDeveloper 3.1\jswdk-1.0.1\lib\servlet.jar;C:\Program Files\Oracle\JDeveloper 3.1\java1.2\jre\lib\rt.jar" oracle.jdeveloper.debugger.ServletMain \RICSJsp_html\RICSFindVendor.jsp "L:\htmlroot" "C:\Program Files\Oracle\JDeveloper 3.1\lib"
log3: oracle.jsp.JspServlet: init
log3: Loading from CLASSPATH com_luxurydomain_rics_dal_DalModule.properties
log3: Diagnostics: Routing diagnostics to standard output (use -Djbo.debugoutput=silent to remove)
[00] oracle.jbo(init) Diagnostic Properties: Timing:false Functions:true Linecount:true Threshold:6log3:
[01] JboInitialContextFactory.getInitialContext(Hashtable) BC4JDeployPlatform: LOCALlog3:
[02] PropertyManager.loadProperties(Hashtable) {{ begin Loading BC4J properties
log3:
[03] PropertyManager.loadProperties(Hashtable) -----------------------------------------------------------log3:
[04] util.Properties,(Properties) BC4J Property DeployPlatform='LOCAL' -->(SessionImpl) from Client Environmentlog3:
[05] util.Properties,(Properties) BC4J Property ConnectionMode='0' -->(SessionImpl) from System Defaultlog3:
[06] util.Properties,(Properties) BC4J Property jbo.fetch.mode='AS.NEEDED' -->(MetaObjectManager) from System Defaultlog3:
[07] util.Properties,(Properties) Skipping empty Property JBODynamicObjectsPackage from System Defaultlog3:
[08] util.Properties,(Properties) BC4J Property MetaObjectContextFactory='oracle.jbo.server.xml.DefaultMomContextFactory' -->(MetaObjectManager) from /oracle/jbo/server/jboserver.properties resourcelog3:
[09] util.Properties,(Properties) BC4J Property java.naming.factory.initial='oracle.jbo.common.JboInitialContextFactory' -->(MetaObjectManager) from Client Environmentlog3:
[10] util.Properties,(Properties) BC4J Property MetaObjectContext='oracle.jbo.server.xm l.XMLContextImpl' -->(MetaObjectManager) from /oracle/jbo/server/jboserver.properties resourcelog3:
[11] util.Properties,(Properties) BC4J Property IsLazyLoadingTrue='true' -->(MetaObjectManager) from /oracle/jbo/server/jboserver.properties resource
log3:
[12] util.Properties,(Properties) BC4J Property ActivateSharedDataHandle='false' -->(MetaObjectManager) from System Defaultlog3:
[13] util.Properties,(Properties) Skipping empty Property HandleName from System Defaultlog3:
[14] util.Properties,(Properties) Skipping empty Property Factory-Substitution-List from System Defaultlog3:
[15] util.Properties,(Properties) Skipping empty Property jbo.project from System Defaultlog3:
[16] util.Properties,(Properties) BC4J Property jbo.max.cursors='50' -->(MetaObjectManager) from System Defaultlog3:
[17] util.Properties,(Properties) BC4J Property jbo.assoc.consistent='true' -->(MetaObjectManager) from System Defaultlog3:
[18] util.Properties,(Properties) BC4J Property jbo.default.language='en' -->(MetaObjectManager) from System Defaultlog3:
[19] util.Properties,(Properties) BC4J Property jbo.default.country='US' -->(MetaObjectManager) from System Defaultlog3:
[20] util.Properties,(Properties) BC4J Property jbo.SQLBuilder='Oracle' -->(MetaObjectManager) from /oracle/jbo/server/jboserver.properties resourcelog3:
[21] util.Properties,(Properties) BC4J Property jbo.jdbc.trace='false' -->(MetaObjectManager) from System Defaultlog3:
[22] util.Properties,(Properties) BC4J Property jbo.debug.prefix='DBG' -->(Diagnostic) from /oracle/jbo/common/Diagnostic.properties resourcelog3:
[23] util.Properties,(Properties) BC4J Property jbo.debugoutput='console' -->(Diagnostic) from /oracle/jbo/common/Diagnostic.properties resourcelog3:
[24] util.Properties,(Properties) BC4J Property jbo.logging.show.timing='false' -->(Diagnostic) from /oracle/jbo/common/Diagnostic.properties resourcelog3:
[25] util.Properties,(Properties) BC4J Property jbo.logging.show.function='true' -->(Diagnostic) from /oracle/jbo/common/Diagnostic.properties resourcelog3:
[26] util.Properties,(Properties) BC4J Property jbo.logging.show.level='false' -->(Diagnostic) from /oracle/jbo/common/Diagnostic.properties resourcelog3:
[27] util.Properties,(Properties) BC4J Property jbo.logging.show.linecount='true' -->(Diagnostic) from /oracle/jbo/common/Diagnostic.properties resourcelog3:
[28] util.Properties,(Properties) BC4J Property jbo.logging.trace.threshold='6' -->(Diagnostic) from /oracle/jbo/common/Diagnostic.properties resourcelog3:
[29] util.Properties,(Properties) BC4J Property jbo.jdbc.driver.verbose='false' -->(Diagnostic) from System Default
log3:
log3: Diagnostics: Routing diagnostics to standard output (use -Djbo.debugoutput=silent to remove)
[30] oracle.jbo(init) Diagnostic Properties: Timing:false Functions:true Linecount:true Threshold:6log3:
[31] util.Properties,(String) WARNING: Unused property: LC='Calling Function' found in /oracle/jbo/common/Diagnostic.properties resourcelog3:
[32] PropertyManager.loadProperties(Hashtable) {{ finished loading BC4J properties log3:
[33] PropertyManager.loadProperties(Hashtable) -----------------------------------------------------------log3:
[34] oracle.jbo(reportVMProperties) JavaVMVersion: 1.2.280 odvlog3:
[35] oracle.jbo(reportVMProperties) JavaVMVendor: Oracle Corp.log3:
[36] oracle.jbo(reportVMProperties) JavaVMName: OJVM VMlog3:
[37] oracle.jbo(reportVMProperties) OperatingSystemName: Windows NTlog3:
[38] oracle.jbo(reportVMProperties) OperatingSystemVersion: 5.0log3:
[39] oracle.jbo(reportVMProperties) OperatingSystemUsername: dgreenlog3:
[40] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/dal.xml file
log3:
[41] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/DalModule.xml file
log3:
[42] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/RicsannotationView.xml file
log3:
[43] oracle.jbo(<init>) ViewObject Impl's default fetch mode = 0log3:
[44] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/Ricsannotation.xml file
log3:
[45] oracle.jbo(getInterface) Reached getInterface
log3:
[46] oracle.jbo(getInterface) Oracle SQL Builder Version 3.0.0.0.0log3:
[47] oracle.jbo(populateJboTypeMapEntries) OracleSQLBuilder: populating ORACLE TypeMap entrieslog3:
[48] jbo.server(<clinit>) UtilMessageBundle (language base) being initialized
log3:
[49] Locale,.java(boolean) Stringmanager using default locale: 'null'log3:
[50] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/RicscategoryView.xml file
log3:
[51] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/Ricscategory.xml file
log3:
[52] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/RicscontentView.xml file
log3:
[53] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/Ricscontent.xml file
log3:
[54] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/RicscontentcategoryView.xml file
log3:
[55] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/Ricscontentcategory.xml file
log3:
[56] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/RicsratingView.xml file
log3:
[57] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/Ricsrating.xml file
log3:
[58] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/RicsthemesView.xml file
log3:
[59] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/Ricsthemes.xml file
log3:
[60] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/RicsurlView.xml file
log3:
[61] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/Ricsurl.xml file
log3:
[62] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/RicsvendorView.xml file
log3:
[63] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/Ricsvendor.xml file
log3:
[64] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/SysC001386Link.xml file
log3:
[65] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/SysC001386Assoc.xml file
log3:
[66] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/SysC001383Link.xml file
log3:
[67] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/SysC001383Assoc.xml file
log3:
[68] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/SysC001368Link.xml file
log3:
[69] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/SysC001368Assoc.xml file
log3:
[70] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/SysC001370Link.xml file
log3:
[71] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/SysC001370Assoc.xml file
log3:
[72] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/SysC001371Link.xml file
log3:
[73] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/SysC001371Assoc.xml file
log3:
[74] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/SysC001390Link.xml file
log3:
[75] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/SysC001390Assoc.xml file
log3:
[76] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/SysC001391Link.xml file
log3:
[77] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/SysC001391Assoc.xml file
log3:
[78] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/SysC001379Link.xml file
log3:
[79] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/SysC001379Assoc.xml file
log3:
[80] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/SysC001374Link.xml file
log3:
[81] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/SysC001374Assoc.xml file
log3:
[82] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/SysC001375Link.xml file
log3:
[83] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/SysC001375Assoc.xml file
log3:
[84] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/SysC001369Link.xml file
log3:
[85] oracle.jbo(boolean) Loading from /com/luxurydomain/rics/dal/SysC0013 69Assoc.xml file
log3:
[86] lang.String,(Session) Created root application module: 'com.luxurydomain.rics.dal.DalModule'log3:
[87] lang.String,(Session) Locale is: 'en_US'
log3:
[88] oracle.jbo(create) Connected to Oracle JBO Server - Version: 3.1.6.81.0log3:
[89] oracle.jbo(loadImpl) Using DatabaseTransactionFactory implementation oracle.jbo.server.DatabaseTransactionFactorylog3:
[90] oracle.jbo(initTransaction) DBTransactionImpl Max Cursors is 50log3:
[91] oracle.jbo(doRegisterDefaultDriver) OracleSQLBuilder: Registered Oracle JDBC driverlog3:
[92] oracle.jbo(initTransaction) Trying connection/1: url='jdbc:oracle:thin:RICS/riCs236@localhost:1521:DEVELOP4'...log3:
[93] oracle.jbo(initTransaction) Successfully logged in
log3:
[94] oracle.jbo(initTransaction) JDBCDriverVersion: 8.1.6.0.0
log3:
[95] oracle.jbo(initTransaction) DatabaseProductName: Oraclelog3:
[96] oracle.jbo(initTransaction) DatabaseProductVersion: Oracle8i Enterprise Edition Release 8.1.6.0.0 - Production With the Partitioning option JServer Release 8.1.6.0.0 - Productionlog3:
[97] oracle.jbo(getDefaultMode) EntityRowSetImpl's jbo.assoc.consistent = true (1)
log3:
[98] oracle.jbo(createColumnList) Column count: 12log3:
[99] jbo.server(int) ViewObject: RicsvendorView Query Statement: log3:
[100] jbo.server(int) SELECT Ricsvendor.ID, Ricsvendor.VENDORNAME, Ricsvendor.ADDRESS1, Ricsvendor.ADDRESS2, Ricsvendor.CITY, Ricsvendor.STATE, Ricsvendor.COUNTRY, Ricsvendor.ZIP, Ricsvendor.DESCRIPTION, Ricsvendor.KEYWORDS, Ricsvendor.NOTES FROM RICSVENDOR Ricsvendor WHERE (Ricsvendor.ID IS NOT NULL )log3:
[101] executeQuery.java(int) QueryCollection: Created new QUERY statementlog3:
[102] afterRollback.oracle(TransactionEvent) RicsvendorView notify ROLLBACK ...
log3:
[103] oracle.jbo(clearQueryCollectionCache) Clear QueryCollection in cache...log3:
[104] oracle.jbo(createColumnList) Column count: 12log3:
[105] jbo.server(int) ViewObject: RicsvendorView Query Statement: log3:
[106] jbo.server(int) SELECT Ricsvendor.ID, Ricsvendor.VENDORNAME, Ricsvendor.ADDRESS1, Ricsvendor.ADDRESS2, Ricsvendor.CITY, Ricsvendor.STATE, Ricsvendor.COUNTRY, Ricsvendor.ZIP, Ricsvendor.DESCRIPTION, Ricsvendor.KEYWORDS, Ricsvendor.NOTES FROM RICSVENDOR Ricsvendor WHERE (Ricsvendor.ID IS NOT NULL )
log3:
[107] executeQuery.java(int) QueryCollection: Created new QUERY statementlog3:
[108] afterRollback.oracle(TransactionEvent) Ricscontent_SysC001369Assoc_RicscontentView notify ROLLBACK ... log3:
[109] oracle.jbo(clearQueryCollectionCache) Clear QueryCollection in cache...
log3:
[110] oracle.jbo(createColumnList) Column count: 17log3:
[111] jbo.server(int) ViewObject: Ricscontent_SysC001369Assoc_RicscontentView Query Statement: log3:
[112] jbo.server(int) SELECT Ricscontent.ID, Ricscontent.PARENTID, Ricscontent.VENDORID, Ricscontent.CONTENTTYPE, Ricscontent.TITLE, Ricscontent.DESCRIPTION, Ricscontent.KEYWORDS, Ricscontent.PREVVERSION, Ricscontent.NEXTVERSION, Ricscontent.SUBMITTEDBY FROM RICSCONTENT Ricscontent WHERE (Ricscontent.VENDORID = :1)log3:
[113] executeQuery.java(int) QueryCollection: Created new QUERY statementlog3:
[114] lang.Object[],(PreparedStatement) Binding param 1: 3log3:
[115] postChanges.oracle(TransactionEvent) Saving transaction changes...log3:
[116] jbo.server(int) ViewObject: RicsvendorView Query Statement:
log3:
[117] jbo.server(int) SELECT Ricsvendor.ID, Ricsvendor.VENDORNAME, Ricsvendor.ADDRESS1, Ricsvendor.ADDRESS2, Ricsvendor.CITY, Ricsvendor.STATE, Ricsvendor.COUNTRY, Ricsvendor.ZIP, Ricsvendor.DESCRIPTION, Ricsvendor.KEYWORDS, Ricsvendor.NOTES FROM RICSVENDOR Ricsvendor WHERE (Id = :0)log3:
log3: QUERY: SELECT Ricsvendor.ID, Ricsvendor.VENDORNAME, Ricsvendor.ADDRESS1, Ricsvendor.ADDRESS2, Ricsvendor.CITY, Ricsvendor.STATE, Ricsvendor.COUNTRY, Ricsvendor.ZIP, Ricsvendor.DESCRIPTION, Ricsvendor.KEYWORDS, Ricsvendor.NOTES FROM RICSVENDOR Ricsvendor WHERE (Id = :0)
[118] oracle.jbo(createColumnList) Column count: 12log3:
[119] jbo.server(int) ViewObject: RicsvendorView Query Statement: log3:
[120] jbo.server(int) SELECT Ricsvendor.ID, Ricsvendor.VENDORNAME, Ricsvendor.ADDRESS1, Ricsvendor.ADDRESS2, Ricsvendor.CITY, Ricsvendor.STATE, Ricsvendor.COUNTRY, Ricsvendor.ZIP, Ricsvendor.DESCRIPTION, Ricsvendor.KEYWORDS, Ricsvendor.NOTES FROM RICSVENDOR Ricsvendor WHERE (Id = :0)log3:
[121] executeQuery.java(int) QueryCollection: Created new QUERY statementlog3:
[122] lang.Object[],(PreparedStatement) Binding param 1: 3log3:
[123] oracle.jbo(createColumnList) Column count: 17log3:
[124] jbo.server(int) ViewObject: RicscontentView Query Statement: log3:
[125] jbo.server(int) SELECT Ricscontent.ID, Ricscontent.PARENTID, Ricscontent.VENDORID, Ricscontent.CONTENTTYPE, Ricscontent.TITLE, Ricscontent.DESCRIPTION, Ricscontent.KEYWORDS, Ricscontent.PREVVERSION, Ricscontent.NEXTVERSION, Ricscontent.SUBMITTEDBY FROM RICSCONTENT Ricscontent WHERE (Vendorid = :0 AND Contenttype = 'restaurant') AND Ricscontent.VENDORID = :1log3:
[126] executeQuery.java(int) QueryCollection: Created new QUERY statementlog3:
[127] lang.Object[],(PreparedStatement) Binding param 1: 3log3:
[128] lang.Object[],(PreparedStatement) Binding param 2: 3log3:
[129] oracle.jbo(createColumnList) Column count: 17log3:
[130] jbo.server(int) ViewObject: RicscontentView Query Statement: log3:
[131] jbo.server(int) SELECT Ricscontent.ID, Ricscontent.PARENTID, Ricscontent.VENDORID, Ricscontent.CONTENTTYPE, Ricscontent.TITLE, Ricscontent.DESCRIPTION, Ricscontent.KEYWORDS, Ricscontent.PREVVERSION, Ricscontent.NEXTVERSION, Ricscontent.SUBMITTEDBY FROM RICSCONTENT Ricscontent WHERE (Vendorid = :0 AND Contenttype = 'hotel') AND Ricscontent.VENDORID = :1log3:
[132] executeQuery.java(int) QueryCollection: Created new QUERY statementlog3:
[133] lang.Object[],(PreparedStatement) Binding param 1: 3log3:
[134] lang.Object[],(PreparedStatement) Binding param 2: 3log3:
[135] afterRollback.oracle(TransactionEvent) RicsvendorView notify ROLLBACK ... log3:
[136] oracle.jbo(clearQueryCollectionCache) Clear QueryCollection in cache...log3:
[137] oracle.jbo(createColumnList) Column count: 12log3:
[138] jbo.server(int) ViewObject: RicsvendorView Query Statement: log3:
[139] jbo.server(int) SELECT Ricsvendor.ID, Ricsvendor.VENDORNAME, Ricsvendor.ADDRESS1, Ricsvendor.ADDRESS2, Ricsvendor.CITY, Ricsvendor.STATE, Ricsvendor.COUNTRY, Ricsvendor.ZIP, Ricsvendor.DESCRIPTION, Ricsvendor.KEYWORDS, Ricsvendor.NOTES FROM RICSVENDOR Ricsvendor WHERE (Id = :0)log3:
[140] executeQuery.java(int) QueryCollection: Created new QUERY statementlog3:
[141] lang.Object[],(PreparedStatement) Binding param 1: 3log3:
[142] afterRollback.oracle(TransactionEvent) Ricscontent_SysC001369Assoc_RicscontentView notify ROLLBACK ...
log3:
[143] oracle.jbo(clearQueryCollectionCache) Clear QueryCollection in cache...log3:
[144] oracle.jbo(createColumnList) Column count: 17log3:
[145] jbo.server(int) ViewObject: Ricscontent_SysC001369Assoc_RicscontentView Query Statement: log3:
[146] jbo.server(int) SELECT Ricscontent.ID, Ricscontent.PARENTID, Ricscontent.VENDORID, Ricscontent.CONTENTTYPE, Ricscontent.TITLE, Ricscontent.DESCRIPTION, Ricscontent.KEYWORDS, Ricscontent.PREVVERSION, Ricscontent.NEXTVERSION, Ricscontent.SUBMITTEDBY FROM RICSCONTENT Ricscontent WHERE (Ricscontent.VENDORID = :1)log3:
[147] executeQuery.java(int) QueryCollection: Created new QUERY statementlog3:
[148] lang.Object[],(PreparedStatement) Binding param 1: 3log3:
[149] afterRollback.oracle(TransactionEvent) RicscontentView notify ROLLBACK ... log3:
[150] oracle.jbo(clearQueryCollectionCache) Clear QueryCollection in cache...log3:
[151] afterRollback.oracle(TransactionEvent) RicsvendorView notify ROLLBACK ...
log3:
[152] oracle.jbo(clearQueryCollectionCache) Clear QueryCollection in cache...log3:
[153] oracle.jbo(createColumnList) Column count: 12log3:
[154] jbo.server(int) ViewObject: RicsvendorView Query Statement: log3:
[155] jbo.server(int) SELECT Ricsvendor.ID, Ricsvendor.VENDORNAME, Ricsvendor.ADDRESS1, Ricsvendor.ADDRESS2, Ricsvendor.CITY, Ricsvendor.STATE, Ricsvendor.COUNTRY, Ricsvendor.ZIP, Ricsvendor.DESCRIPTION, Ricsvendor.KEYWORDS, Ricsvendor.NOTES FROM RICSVENDOR Ricsvendor WHERE (Id = :0)log3:
[156] executeQuery.java(int) QueryCollection: Created new QUERY statementlog3:
[157] lang.Object[],(PreparedStatement) Binding param 1: 3log3:
[158] afterRollback.oracle(TransactionEvent) Ricscontent_SysC001369Assoc_RicscontentView notify ROLLBACK ... log3:
[159] oracle.jbo(clearQueryCollectionCache) Clear QueryCollection in cache...log3:
[160] oracle.jbo(createColumnList) Column count: 17log3:
[161] jbo.server(int) ViewObject: Ricscontent_SysC001369Assoc_RicscontentView Query Statement: log3:
[162] jbo.server(int) SELECT Ricscontent.ID, Ricscontent.PARENTID, Ricscontent.VENDORID, Ricscontent.CONTENTTYPE, Ricscontent.TITLE, Ricscontent.DESCRIPTION, Ricscontent.KEYWORDS, Ricscontent.PREVVERSION, Ricscontent.NEXTVERSION, Ricscontent.SUBMITTEDBY FROM RICSCONTENT Ricscontent WHERE (Ricscontent.VENDORID = :1)log3:
[163] executeQuery.java(int) QueryCollection: Created new QUERY statementlog3:
[164] lang.Object[],(PreparedStatement) Binding param 1: 3log3:
[165] afterRollback.oracle(TransactionEvent) RicscontentView notify ROLLBACK ... log3:
[166] oracle.jbo(clearQueryCollectionCache) Clear QueryCollection in cache...log3:
[167] postChanges.oracle(TransactionEvent) Saving transaction changes...log3:
[168] jbo.server(int) ViewObject: RicscontentView Query Statement: log3:
[169] jbo.server(int) SELECT Ricscontent.ID, Ricscontent.PARENTID, Ricscontent.VENDORID, Ricscontent.CONTENTTYPE, Ricscontent.TITLE, Ricscontent.DESCRIPTION, Ricscontent.KEYWORDS, Ricscontent.PREVVERSION, Ricscontent.NEXTVERSION, Ricscontent.SUBMITTEDBY FROM RICSCONTENT Ricscontent WHERE (Id = :0) AND Ricscontent.VENDORID = :1log3:
log3: QUERY: SELECT Ricscontent.ID, Ricscontent.PARENTID, Ricscontent.VENDORID, Ricscontent.CONTENTTYPE, Ricscontent.TITLE, Ricscontent.DESCRIPTION, Ricscontent.KEYWORDS, Ricscontent.PREVVERSION, Ricscontent.NEXTVERSION, Ricscontent.SUBMITTEDBY FROM RICSCONTENT Ricscontent WHERE (Id = :0) AND Ricscontent.VENDORID = :1
[170] oracle.jbo(createColumnList) Column count: 17log3:
[171] jbo.server(int) ViewObject: RicscontentView Query Statement:
log3:
[172] jbo.server(int) SELECT Ricscontent.ID, Ricscontent.PARENTID, Ricscontent.VENDORID, Ricscontent.CONTENTTYPE, Ricscontent.TITLE, Ricscontent.DESCRIPTION, Ricscontent.KEYWORDS, Ricscontent.PREVVERSION, Ricscontent.NEXTVERSION, Ricscontent.SUBMITTEDBY FROM RICSCONTENT Ricscontent WHERE (Id = :0) AND Ricscontent.VENDORID = :1log3:
[173] executeQuery.java(int) QueryCollection: Created new QUERY statement
log3:
[174] lang.Object[],(PreparedStatement) Binding param 1: 14log3:
[175] lang.Object[],(PreparedStatement) Binding null for 2log3:
[176] afterRollback.oracle(TransactionEvent) RicsvendorView notify ROLLBACK ... log3:
[177] oracle.jbo(clearQueryCollectionCache) Clear QueryCollection in cache...log3:
[178] oracle.jbo(createColumnList) Column count: 12log3:
[179] jbo.server(int) ViewObject: RicsvendorView Query Statement: log3:
[180] jbo.server(int) SELECT Ricsvendor.ID, Ricsvendor.VENDORNAME, Ricsvendor.ADDRESS1, Ricsvendor.ADDRESS2, Ricsvendor.CITY, Ricsvendor.STATE, Ricsvendor.COUNTRY, Ricsvendor.ZIP, Ricsvendor.DESCRIPTION, Ricsvendor.KEYWORDS, Ricsvendor.NOTES FROM RICSVENDOR Ricsvendor WHERE (Id = :0)log3:
[181] executeQuery.java(int) QueryCollection: Created new QUERY statementlog3:
[182] lang.Object[],(PreparedStatement) Binding param 1: 3log3:
[183] afterRollback.oracle(TransactionEvent) Ricscontent_SysC001369Assoc_RicscontentView notify ROLLBACK ... log3:
[184] oracle.jbo(clearQueryCollectionCache) Clear QueryCollection in cache...log3:
[185] oracle.jbo(createColumnList) Column count: 17log3:
[186] jbo.server(int) ViewObject: Ricscontent_SysC001369Assoc_RicscontentView Query Statement: log3:
[187] jbo.server(int) SELECT Ricscontent.ID, Ricscontent.PARENTID, Ricscontent.VENDORID, Ricscontent.CONTENTTYPE, Ricscontent.TITLE, Ricscontent.DESCRIPTION, Ricscontent.KEYWORDS, Ricscontent.PREVVERSION, Ricscontent.NEXTVERSION, Ricscontent.SUBMITTEDBY FROM RICSCONTENT Ricscontent WHERE (Ricscontent.VENDORID = :1)log3:
[188] executeQuery.java(int) QueryCollection: Created new QUERY statementlog3:
[189] lang.Object[],(PreparedStatement) Binding param 1: 3log3:
[190] afterRollback.oracle(TransactionEvent) RicscontentView notify ROLLBACK ... log3:
[191] oracle.jbo(clearQueryCollectionCache) Clear QueryCollection in cache...log3:
log3: RicscontentView row with Id=14 not found!
log3: java.lang.RuntimeException: RicscontentView row with Id=14 not found!
void ricsjsp_html.RICSContent._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)log3:
void oracle.jsp.runtime.HttpJsp.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)log3:
void oracle.jsp.app.JspApplication.dispatchRequest(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)log3:
void oracle.jsp.JspServlet.doDispatch(oracle.jsp.app.JspRequestContext)
log3:
void oracle.jsp.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)log3:
void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)log3:
void oracle.lite.web.JupServlet.service(oracle.lite.web.JupRequest, oracle.lite.web.JupResponse)log3:
void oracle.lite.web.MimeServletHandler.handle(oracle.lite.web.JupApplication, java.lang.String, int, oracle.lite.web.JupRequest, oracle.lite.web.JupResponse)log3:
void oracle.lite.web.JupApplication.service(oracle.lite.web.JupRequest, oracle.lite.web.JupResponse)log3:
void oracle.lite.web.JupAppHandler.handle(oracle.lite.web.JupRequest, oracle.lite.web.JupResponse)log3:
void oracle.lite.web.HTTPServer.include(javax.servlet.ServletRequest, javax.servlet.ServletResponse)log3:
void oracle.lite.web.HTTPServer.forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse)log3:
boolean oracle.lite.web.HTTPServer.handleRequest(oracle.lite.web.JupInputStream, java.io.OutputStream)log3:
boolean oracle.lite.web.JupServer.handle(oracle.lite.web.JupInputStream, java.io.OutputStream)log3:
void oracle.lite.web.JupHTTPListener$JupHTTP.run()log3:
null

I've discovered that if I call
ApplicationModule.remove();
at the end of every JSP page, and I prevent JSPApplicationRegistry.returnAppModuleInstance(); from being called, it works. Obviously this is not a longterm solution.
null

Similar Messages

  • BC4J, ViewObject: setWhereClause vs ViewCriteria

    1.What is the difference between using setWhereClause and ViewCriteria object?
    2.When is better to use the first one and when the second?
    3.When used both, which one has priority, or are they anded together?
    Could anybody answer these questions?
    Thanks, Tom

    Manuel,
    There is also another method, getEstimatedRowCount(), which is the most efficient. It will perform a
    SELECT COUNT(*) FROM (your query with conditions)
    which puts all the work in the database and just returns the count.
    getFetchedRowCount() just tells you how many have been fetched so far and getRowCount() actually fetches all the rows into view/entity cache and then returns the total.

  • OAF, View object used with the clausule setWhereClause, show the error  not have been properly initialized.

    Hi to all,
    I'm new with oaf and in mi AM i have to VO that I use to find relative information to the one is shown to the user on a query region, after the user pressed the go buton  the CO request the AM tho load both VO and those information are used to show in a popup region to display and update. the main problem is when the popup region closes it send a submit to the server an the error "View object may not have been properly initialized during Update." is displayed
    The main page and the popup uses the same AM, the initM2mVo() and initTavleVo() are  called by the CO at the processRequest of the main PG, the popup dosen´t have a CO.
    This the AM that uses the main PG and the popup region
    package tasc.oracle.apps.tasc.m2m.imei.server;
    import oracle.apps.fnd.framework.OAViewObject;
    import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
    import oracle.apps.fnd.framework.server.OAViewObjectImpl;
    import oracle.jbo.Row;
    import oracle.jbo.ViewObject;
    // ---    File generated by Oracle ADF Business Components Design Time.
    // ---    Custom code may be added to this class.
    // ---    Warning: Do not modify method signatures of generated methods.
    public class ActualizarImeiAMImpl extends OAApplicationModuleImpl {
        /**This is the default constructor (do not remove)
        public ActualizarImeiAMImpl() {
        /*******************************USE FOR CUSTOM CODE****************************/
         * Inicializa el vo a través del cual se ejecutara la actualización del IMEI.
         * @param taskNumber
        public void loadImeiVo(String taskNumber) {
            OAViewObject voTableQry = getTableQryVO1();
            if (voTableQry != null) {
                voTableQry.reset();
                voTableQry.setWhereClause(null);
                voTableQry.setWhereClauseParams(null);
                voTableQry.setWhereClause("TASK_NUMBER = :1");
                voTableQry.setWhereClauseParam(0, taskNumber);
                voTableQry.executeQuery();
                if (voTableQry.hasNext()) {
                    voTableQry.next();
                    String idActuacion =
                        (String)voTableQry.getCurrentRow().getAttribute("IdActuacion");
                    String dsM2m =
                        (String)voTableQry.getCurrentRow().getAttribute("DsM2m");
                    String imei =
                        (String)voTableQry.getCurrentRow().getAttribute("Imei");
                    if (idActuacion != null) {
                        OAViewObjectImpl m2mVo = (OAViewObjectImpl)this.getTascTransEqInstM2mVO1();
                        m2mVo.reset();
                        if (!m2mVo.isPreparedForExecution()) {
                            m2mVo.setMaxFetchSize(0);
                            m2mVo.executeQuery();
                        m2mVo.setWhereClause(null);
                        m2mVo.setWhereClauseParams(null);
                        m2mVo.setWhereClause("ID_ACTUACION = :1 AND DS_M2M = :2 AND IMEI = :3 ");
                        m2mVo.setWhereClauseParam(0, idActuacion);
                        m2mVo.setWhereClauseParam(1, dsM2m);
                        m2mVo.setWhereClauseParam(2, imei);
                        m2mVo.executeQuery();
                        if(m2mVo.hasNext()){
                            m2mVo.next();
         * Carga los valores disponibles de IMEI según el taskNumber al cual pertenezca
         * el  IMEI seleccionado.
        public void loadImeiValuesList(String taskNumber) {
            ViewObject viewobject = this.getImeiListVO1();
            OAViewObject voTableQry = getTableQryVO1();
            if (voTableQry != null && voTableQry.getCurrentRow() != null) {
                String imeiType =
                    (String)voTableQry.getCurrentRow().getAttribute("Attribute17");
                if (viewobject != null & imeiType != null) {
                    viewobject.setWhereClause(null);
                    viewobject.setWhereClauseParams(null);
                    viewobject.setWhereClause("TASK_NUMBER = :1 AND ATTRIBUTE17 = :2");
                    viewobject.setWhereClauseParam(0, taskNumber);
                    viewobject.setWhereClauseParam(1, imeiType);
                    viewobject.executeQuery();
        /*******************************USE FOR CUSTOM CODE****************************/
        /**Container's getter for TableVO1
        public OAViewObjectImpl getTableVO1() {
            return (OAViewObjectImpl)findViewObject("TableVO1");
        /**Sample main for debugging Business Components code using the tester.
        public static void main(String[] args) { /* package name */
            /* Configuration Name */launchTester("tasc.oracle.apps.tasc.m2m.imei.server",
                                                 "ActualizarImeiAMLocal");
        /**Container's getter for TascTransEqInstM2mVO1
        public OAViewObjectImpl getTascTransEqInstM2mVO1() {
            return (OAViewObjectImpl)findViewObject("TascTransEqInstM2mVO1");
        /**Container's getter for ImeiListVO1
        public OAViewObjectImpl getImeiListVO1() {
            return (OAViewObjectImpl)findViewObject("ImeiListVO1");
        /**Container's getter for TableQryVO1
        public OAViewObjectImpl getTableQryVO1() {
            return (OAViewObjectImpl)findViewObject("TableQryVO1");
    this is the CO of the main PG
    /*===========================================================================+
    |   Copyright (c) 2001, 2005 Oracle Corporation, Redwood Shores, CA, USA    |
    |                         All rights reserved.                              |
    +===========================================================================+
    |  HISTORY                                                                  |
    +===========================================================================*/
    package tasc.oracle.apps.tasc.m2m.imei.webui;
    import java.io.Serializable;
    import oracle.apps.fnd.common.VersionInfo;
    import oracle.apps.fnd.framework.OAApplicationModule;
    import oracle.apps.fnd.framework.webui.OAControllerImpl;
    import oracle.apps.fnd.framework.webui.OAPageContext;
    import oracle.apps.fnd.framework.webui.TransactionUnitHelper;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    import oracle.apps.fnd.framework.webui.beans.layout.OAQueryBean;
    * Controller for ...
    public class ActualizarImeiCO extends OAControllerImpl {
        public static final String RCS_ID = "$Header$";
        public static final boolean RCS_ID_RECORDED =
            VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
         * Layout and page setup logic for a region.
         * @param pageContext the current OA page context
         * @param webBean the web bean corresponding to the region
        public void processRequest(OAPageContext pageContext, OAWebBean webBean) {
            super.processRequest(pageContext, webBean);
            //get the handle to AM Attached to our Simple Page Region MainRegionRN
            //The page is passed as parameter to this method, hence we can get handle
            //to the AM quite easily
            OAApplicationModule am = pageContext.getApplicationModule(webBean);
            //verifica si la transaccion de creacion esta activa todavia
            if (TransactionUnitHelper.isTransactionUnitInProgress(pageContext,"ActualizarImeiM2m", false))
                // deshace cambios y finaliza Txn
                am.invokeMethod("rollback");
                TransactionUnitHelper.endTransactionUnit(pageContext, "ActualizarImeiM2m");
         * Procedure to handle form submissions for form elements in
         * a region.
         * @param pageContext the current OA page context
         * @param webBean the web bean corresponding to the region
        public void processFormRequest(OAPageContext pageContext,
                                       OAWebBean webBean) {
            super.processFormRequest(pageContext, webBean);
            //get the handle to AM Attached to our Simple Page Region MainRegionRN
            //The page is passed as parameter to this method, hence we can get handle
            //to the AM quite easily
            OAApplicationModule am = pageContext.getApplicationModule(webBean);
            //Detección del botón go de la región de query.
            this.queryButonGO(pageContext, webBean, am);
            this.updateImei(pageContext, am);
         * Detección del botón go de la región de query
         * @param pageContext
         * @param webBean
         * @param am
        public void queryButonGO(OAPageContext pageContext, OAWebBean webBean,
                                 OAApplicationModule am) {
            OAQueryBean queryBean =
                (OAQueryBean)webBean.findIndexedChildRecursive("QueryRN");
            String idGo = queryBean.getGoButtonName();
            if (pageContext.getParameter(idGo) != null) {
                String tareaId = pageContext.getParameter("TaskNumberLovInput");
                //Inicializa el vo a través del cual se ejecutara la actualización del IMEI.
                Serializable[] parameters2 = { tareaId };
                Class[] paramTypes2 = { String.class };
                am.invokeMethod("loadImeiVo", parameters2, paramTypes2);
                //Carga los valores disponibles de IMEI según el taskNumber al cual pertenezca  el  IMEI seleccionado.
                Serializable[] parameters = { tareaId };
                Class[] paramTypes = { String.class };
                am.invokeMethod("loadImeiValuesList", parameters, paramTypes);
        public void updateImei(OAPageContext pageContext, OAApplicationModule am){
            if (pageContext.getParameter("ActualizarImei") != null){
                String imei = pageContext.getParameter("ImeiPopup");
                //TODO......
    thanks to all.

    I thing I got the problem.
    I have the following configuration:
    One Main Page and external RN that is call as popup in main page
    2 VO, queries by java code, one to capture some information that is used to query the 2 VO that I use to update information by the popup.
    One AM that is map only in the Main Page. (Initially I had the external RN mapped to same AM as the main PG, but I remove it).
    The solution was remove the mapping of the AM from the external region and in the messageimput of the external region set the View instance and view Attribute manually in this fields (http://screencast.com/t/uDTALEedCh do not use the wizard ) as the one instanced am the AM, so the problem it seem that was that defining an AM to the external region create a new instance, causing that it can not see the information that I load manually in the VO by query it them.
    for this case there is not need to use the next code, because the Rows are load with information by the query in the java code, this only will have to be made when inserting a new row .
        public void initM2mVo(){
            //get a handle to the View Object that we wish to initialize
            OAViewObject vo = (OAViewObject)this.getTascTransEqInstM2mVO1();
            if (!vo.isPreparedForExecution()) {
                vo.setMaxFetchSize(0);
                vo.executeQuery();
            //Create a blank Row
            Row row = vo.createRow();
            //Attach that blank row to the VO. Data will be fed into this row, when the user types into the fields
            vo.insertRow(row);
            //Set the status of the blank row to initialized. This tells OA Framework that record is blank and must not be included in DML
            //Operations until    changes are made to its underlying VO [via screen fields]
            row.setNewRowState(Row.STATUS_INITIALIZED);

  • Dynamic view object

    Hello,
    I need to have a view object which should work for both parameterized and non parameterized. It works fine with parameterized using setWhereClauseParam, but in the case of returning all items, can I use the same view object?
    Thanks,
    Setareh

    hi Setareh;
    the parameterized view object is build on the concept of preparedStatement, so you can't execute the view object untell you pass the parameter. one way to avoid is to override the existing whereclause to ViewObject.setWhereClause("1=1").
    other solution is to make the view object in runtime.
    String sqlstr = "select empno,ename from emp where deptno=" + 10;
    ViewObject temp = applicationModule1.createViewObjectFromQueryStmt("newViewObject",sqlstr );

  • How can you add a where clause using "OR" with applied ViewCriteria?

    [JDeveloper 10.1.3 SU4]
    [JHeadstart 10.1.3 build 78]
    I am using JHeadstart, but have a question probably more in the ADF area. On the JHeadstart forum I asked:
    "I am overriding JhsApplicationModule's advancedSearch in order to be able to search in childtables. I created transient attributes, display those in advanced search and in the overridden method I check if any of these are filled by the user and create a where clause like 'EXISTS (SELECT 1 FROM <childtable> WHERE <column in childtable> = <column in EO's table> AND <another column in childtable> LIKE '<value supplied by user>)'. I add this whereclause using ViewObject.setWhereClause.
    So far so good and it works. However, if the user selects 'Result matches any criteria', combining setWhereClause and the normal advancedSearch QueryByExample implementation using ViewCriteriaRow do not provide the desired result, since the ViewCriteria and the setWhereClause are AND-ed together, which is fine if the user selects the (default) "Results match all criteria" (everything is AND-ed) but not the "Result matches any criteria", since then every criterium is OR-ed together, except for the setwhereclause criteria and the set of ViewCriteriaRows, they are AND-ed.
    I looked if I could specify that a WhereClause will be OR-ed to existing applied ViewCriteria, but no luck. Do I have to rewrite also advancedSearch's ViewCriteria implementation and write an entire setWhereClause implementation to be able to "OR" every criterium? Or any other suggestions? Can I look at the entire Where clause and rewrite it (after applyCriteria and setWhereClause are called on the VO)?
    Toine"
    Sandra Muller (JHeadstart Team) told me today: "This sounds like a JDeveloper/ADF issue that is not related to JHeadstart. The question is: how can you add a where clause using "OR" if there are already one or more ViewCriteria applied?
    To simplify the test case, you could create a simple ADF BC test client class in a test Model project without JHeadstart (in the test class, use bc4jclient + Ctrl-Enter), in which you first apply a few ViewCriteriaRows to a View Object and also add a where clause.
    Can you please log a TAR at MetaLink ( http://metalink.oracle.com/ ), or ask this question at the JDeveloper forum at http://otn.oracle.com/discussionforums/jdev.html ? (This what I am doing now ;-))
    Thanks,
    Sandra Muller
    JHeadstart Team
    Oracle Consulting"
    Anyone knowing the answer or am I asking for an enhancement?
    Toine

    Hi,
    Can you SET your whereclause as follows ?
    ('Y' = <isAnd>
    and EXISTS (SELECT 1 FROM <childtable> WHERE <column in childtable> = <column in EO's table> AND <another column in childtable> LIKE '<value supplied by user>))
    OR ('N' = <isAnd>
    AND EXISTS (SELECT 1 FROM <childtable> WHERE <column in childtable> = <column in EO's table> OR <another column in childtable> LIKE '<value supplied by user>))
    )

  • Page not displayed on server but works fine locally in Jdeveloper

    Hi,
    The page works fine locally when run from Jdeveloper.
    But when the page is imported to server and when the page is called....it trys to load the page for long time and times out and displays the IE error 'The Page cannot be displayed'.
    Do I have to do anything specific in server after importing a page?

    In the CO of the table region:
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    ApplicationModuleImpl am1 = (ApplicationModuleImpl) pageContext.getRootApplicationModule();
    SalesOrderHeaders2VOImpl VO1 = (SalesOrderHeaders2VOImpl) am1.findViewObject("SalesOrderHeaders2VO");
    String HeaderId = (VO1.first().getAttribute("HeaderId")).toString();
    if (HeaderId != null)
    Serializable[] params = {HeaderId};
    OAApplicationModule am = (OAApplicationModule)pageContext.getApplicationModule(webBean);
    OADBTransactionImpl DBTrans = (OADBTransactionImpl)am.getOADBTransaction();
    boolean log = DBTrans.loggingEnabled() ;
    // Write Diagnostic message...
    if(pageContext.isLoggingEnabled(1))
    pageContext.writeDiagnostics(this," am : "+am ,1);
    if(am != null)
    OAViewObject viewObject = (OAViewObject)am.findViewObject("InterfaceSummVO");
    if(viewObject != null)
    viewObject.setWhereClauseParams(null);
    viewObject.setWhereClause("header_id = :1");
    viewObject.setWhereClauseParam(0, HeaderId );
    viewObject.executeQuery();
    }

  • Question abt Warning: ControllerContext.markScopeDirty() should be called..

    Hello,
    I am using latest version of JDev11g. Inside my model project I have some java classes along with app module and view objects.
    I am trying to set the where clause and order by clause programatically viewObject.setOrderByClause() and viewObject.setWhereClause() in one of those Java Bean doing so - JDeveloper IDE gives yellow Warning in code-edior with message
    ControllerContext.markScopeDirty() should be called after bean mutations to support failover
    What does this mean and should I bother fixing it . I never seen anything like these before
    Thank you in advance,

    I can't see a command line option to specify the main class, I think you have to do it in the manifest file that you create prior to running the jar command. Please post the contents of your manifest in here. The list of command line options are as follows:
    jar [ctxvfm] [jar-file] [manifest-file] files ...
    Option flags are:
    c create new archive
    t list table of contents for archive
    x extract named (or all) files from archive
    v generate verbose output on standard error
    f specify JAR file name
    m include manifest information from specified manifest file
    [ref Sun site]

  • Expert mode query in View objects and appended where clause

    My company is Oracle Member Partner and we are developing enterprise web applications using Oracle database and BC4J.
    I have the following problem...
    When I enable EXPERT MODE option in View Object I have trouble appending to query statement in my client code.
    I need expert mode because I must use "SELECT DISTINCT" insted of "SELECT" in my query.
    It looks something like this:
    viewObject.setWhereClause("CLA_ID = " + claId);
    viewObject.executeQuery();
    SQL query from View Object becomes sub-query and fails to execute:
    select * from (original view object query) where (... appended where clause)
    Order by part of the query causes sql errors because original query is now sub-query.
    Is there any way around this?

    I tried creating an expert mode SQL query:
    SELECT DISTINCT EMPNO, ENAME FROM EMP.
    Then at runtime I do:
    vo.setWhereClause("ENAME LIKE '%'||?||'%');
    vo.setWhereClauseParam(0,'A');.
    and this works fine. The trick is that since expert-mode view objects get wrapped as inline views (to allow runtime appending of WHERE clause, actually), you need to select any column in the select statement to which you want to later refer in a dynamically-appended where clause.
    If you want to prevent the inline-view wrapping, you can write the following code in your view object's ViewObjectImpl subclass to force the VO to NOT be treated as an expert-mode SQL VO.
      // Goes in your view object impl subclass
      public void create() {
         // Force this VO to NOT be treated as an expert-mode SQL, so that
         // its query does not get wrapped as an inline view.
         getViewDef().setFullSql(false);
      }I used this trick above to create an expert mode query like:
    SELECT DISTINCT deptno FROM empand then at runtime I add a dynamic where clause that refers to a column
    in EMP that is not in the select list like this:
        ViewObject vo = am.findViewObject("View1");
        vo.setWhereClause("ename like '%A%'");
        vo.executeQuery();
        System.out.println(vo.first().getAttribute(0));and this causes the query to come out as:
    SELECT DISTINCT deptno FROM emp WHERE ename like '%A%'.
    instead of:
    SELECT * FROM (SELECT DISTINCT deptno FROM emp) QRSLT WHERE ename like '%A%'which would cause an error due to the fact that ename is not in the select list of the original (wrapped, inline) query.

  • NPE in ViewRowSetIteratorImpl

    another bug perhaps?
    Caused by: java.lang.NullPointerException
         at oracle.jbo.server.ViewRowSetIteratorImpl.setCurrentRow(ViewRowSetIteratorImpl.java:986)
         at oracle.jbo.server.ViewRowSetImpl.setCurrentRow(ViewRowSetImpl.java:2697)
         at oracle.jbo.server.ViewObjectImpl.setCurrentRow(ViewObjectImpl.java:6485)
         at beans.VOController.createUser(VOController.java:750)
         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:585)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
         ... 28 more

    actually no,
    originally i had:
    viewobject.setCurrentRow(aRow);
    this resulted in the error, i replaced it with:
    viewobject.setWhereClause(...);
    viewobject.executeQuery();
    i don't see why the former fails in this instance when the latter works perfectly fine ( aRow is perfectly legitimate )
    i do run into these problems quite often and i end up having to find an alternative solution

  • Not updated the windows tital

    Hi all,
    could any one help on this..
    In project manager respensibility-> project list->Controler tab
    There is a create textBox when I select issue and click the go button then the header title of the page displayed as Create Issue:Issue, But the client requirement is the header text should be Create :Issue.
    I checked the controler but i did not find where i change.Please find the controler below
    public void processFormRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
    super.processFormRequest(oapagecontext, oawebbean);
    if(oapagecontext.getParameter("copyFromButton") != null)
    String s = "PA_CI_COPY_FROM_LAYOUT";
    OAMessageChoiceBean oamessagechoicebean = (OAMessageChoiceBean)oawebbean.findIndexedChildRecursive("copyFromList");
    String s1 = "";
    if(oamessagechoicebean != null)
    s1 = (String)oamessagechoicebean.getValue(oapagecontext);
    } else
    throw new OAException("CICopyFromCO.processFormRequest: OAMessageChoiceBean copyFromList is NULL");
    PAApplicationModuleImpl paapplicationmoduleimpl = (PAApplicationModuleImpl)oapagecontext.getApplicationModule(oawebbean);
    if(paapplicationmoduleimpl == null)
    throw new OAException("CICopyFromCO.processFormRequest: Application Module is NULL");
    OADBTransaction oadbtransaction = paapplicationmoduleimpl.getOADBTransaction();
    if(oadbtransaction == null)
    throw new OAException("CICopyFromCO.processFormRequest: OADBTransaction is NULL");
    Object obj = oadbtransaction.getValue("paCITypeClassCode");
    if(obj == null)
    throw new OAException("CICopyFromCO.processFormRequest: Item TYPE Class Code(To) is NULL");
    String s2 = "";
    String s3 = "";
    ViewObject viewobject = paapplicationmoduleimpl.findViewObject("ControlItemVO");
    if(viewobject != null)
    Row row = viewobject.first();
    if(row != null)
    Object obj1 = row.getAttribute("ClassificationCode");
    Object obj2 = row.getAttribute("ReasonCode");
    if(obj1 != null)
    s2 = obj1.toString();
    if(obj2 != null)
    s3 = obj2.toString();
    String s4 = getCurrTypeId(oapagecontext);
    String s5 = (new StringBuilder()).append("OA.jsp?akRegionCode=").append(s).append("&akRegionApplicationId=275").append("&paCiClassCodeId=").append(s2).append("&paCiReasonCodeId=").append(s3).append("&paCiTypeClassToId=").append(s4).append("&paCiTypeClassFrom=").append(s1).append("&paCiTypeClassTo=").append(obj.toString()).append("&paProjectId=").append(getCurrProjectId(oapagecontext)).toString();
    oapagecontext.setRedirectURL(s5, false, "RP");
    return;
    } else
    return;
    public void paCreateWebBean(OAPageContext oapagecontext, OAWebBean oawebbean)
    OATableLayoutBean oatablelayoutbean = (OATableLayoutBean)oawebbean.findIndexedChildRecursive("copyFromListReg");
    oatablelayoutbean.setWidth("100%");
    OARowLayoutBean oarowlayoutbean = (OARowLayoutBean)createWebBean(oapagecontext, "ROW_LAYOUT");
    oatablelayoutbean.addRowLayout(oarowlayoutbean);
    OACellFormatBean oacellformatbean = (OACellFormatBean)createWebBean(oapagecontext, "CELL_FORMAT");
    oacellformatbean.setHAlign("end");
    OAMessageChoiceBean oamessagechoicebean = (OAMessageChoiceBean)createWebBean(oapagecontext, oatablelayoutbean, "copyFromList");
    OASubmitButtonBean oasubmitbuttonbean = (OASubmitButtonBean)createWebBean(oapagecontext, oatablelayoutbean, "copyFromButton");
    if(oasubmitbuttonbean != null)
    oamessagechoicebean.setEnd(oasubmitbuttonbean);
    oasubmitbuttonbean.setUnvalidated(true);
    oacellformatbean.addIndexedChild(oamessagechoicebean);
    oarowlayoutbean.addIndexedChild(oacellformatbean);
    setCopyFromPopList(oawebbean, oapagecontext, oamessagechoicebean);
    public void setCopyFromPopList(OAWebBean oawebbean, OAPageContext oapagecontext, OAMessageChoiceBean oamessagechoicebean)
    OAApplicationModule oaapplicationmodule = oapagecontext.getApplicationModule(oawebbean);
    ViewObject viewobject = oaapplicationmodule.findViewObject("ClassTypesVO");
    if(viewobject == null)
    viewobject = oaapplicationmodule.createViewObject("ClassTypesVO", "oracle.apps.pa.util.server.PALookupsVO");
    if(viewobject == null)
    throw new OAException("CICopyFromCO.setCopyFromPopList: lkpVO 'ClassTypesVO' is NULL");
    if(oamessagechoicebean == null)
    throw new OAException("PA", "CICopyFromCO.setCopyFromPopList: poplist 'copyFromList' is NULL");
    viewobject.setWhereClause(" trunc(sysdate) between start_date_active and nvl(end_date_active, trunc(sysdate" +
    viewobject.setWhereClauseParam(0, "PA_CI_TYPE_CLASSES");
    oamessagechoicebean.setListViewObject(oapagecontext, viewobject);
    viewobject.executeQuery();
    Row row = viewobject.first();
    if(row != null)
    oamessagechoicebean.setDefaultValue((String)row.getAttribute("Meaning"));
    oamessagechoicebean.setPickListCacheEnabled(false);
    private String getCurrTypeId(OAPageContext oapagecontext)
    String s = oapagecontext.getParameter("paCiTypeId");
    if(s == null || s.equals(""))
    throw new OAException("CICopyFromCO.getCurrTypeId: Control Item Type ID must be set by the caller of th" +
    "is page"
    } else
    return s;
    private String getCurrProjectId(OAPageContext oapagecontext)
    String s = SessionUtils.getProjectId(oapagecontext);
    if(s == null)
    s = oapagecontext.getParameter("paProjectId");
    if(s == null || s.equals(""))
    throw new OAException("CICopyFromCO.getCurrProjectId: Project ID must be set by the caller of this page");
    } else
    return s;
    }

    Click on "Personalize Page" link which is at the top right corner of the page.
    Select "Complete View" radio button.
    Click on "Expand All" link.
    Search for the header (for which you want to modify title) and click on "Personalize" pensil icon corresponding to the region.
    Modify "Text" property value as Create:Risk at any level(site or organization or responsibility level personalization) as required.
    If this approach does not work then find out all the header bean id's (i.e. Id's of Approval Request,Document Collaboration,Issue,lessons Learnt,Risk).
    Extend controller and in processRequest use below sample code:
    OAHeaderBean bean1 = (OAHeaderBean)webBean.findChildRecursive("HeaderBeanID1");
    bean1.setText(pageContext,"Create :Issue");
    OAHeaderBean bean2 = (OAHeaderBean)webBean.findChildRecursive("HeaderBeanID2");
    bean2.setText(pageContext,"Create :Risk");
    so on..
    For extending controller refer
    http://oracle.anilpassi.com/oa-framework-extending-controller-steps-2.html
    http://oracleanil.blogspot.com/2010/09/controller-extension-r12-oaf.html
    -Anand

  • Client-middle tier communication.

    We'd like to inform the middle tier of some choices made in the client but I'm not sure how this communication should be achieved.
    For example, the user logs-on using a (non BC4J) method which establishes the user-name and access level.
    I want an EntityObject (An AuditTrailEntity) to be able to set the username in any new rows created.
    I want ViewObjects to restrict the rows returned based on the access level.
    I see I can create some ViewObject methods and export them to the client but can these be class (static) methods? If not, then I must use object methods that set class variables but this doesn't feel like the "right" solution.
    Can I set some properties in a Cookie somewhere (how)?
    Is there another (better) method?
    Any advice gratefully received.
    Tony.
    P.S.
    As part of my investigations, I've tried adding a RowSetListener:
    panelBinding.addRowSetListener(new HistoryRowSetListener());
    class HistoryRowSetListener extends JUPanelRowSetAdapter
    {   public void rowInserted(JUIteratorBinding aIterBinding, InsertEvent aEvent)
    {   super.rowInserted(aIterBinding, aEvent);
    Row lRow = aIterBinding.getCurrentRow();
    lRow.setAttribute("UserName", sCurrentUserName);
    But the getCurrentRow() returns the row that's current when the insert was performed, not the row that's being inserted. Is this intended? If so, How can I get the row that's being inserted?

    In the client some properties are acquired (from a legacy system) and we want to communicate these to the middle tier. We'll want certain
    ViewObjects (in several ApplicationModules) to behave differently.What are the client properties? Are they like read/write access priviledges?
    If the client properties change, then we need to re-communicate with the middle tier to alter the ViewObjects behaviour again. For example,
    the user is only permited to see their own (or their own region's data). For the most part this can be achieved by modifying the SQL but for
    some attributes, we may show the row but hide the value.In 9.0.5 release of BC4J we will have access privilege support in both design time and runtime. We plan to have api for obtaining read/write access based on the logged in user role(s). You can use this info to map the ui.
    I think our client could probably call ViewObject.setWhereClause() but I'd rather have this functionality encapsulated in the Business
    components.
    If you want to set username
    then it should be on the session or root AM.
    This sounds near the solution. Can I access the Session in both the client and middle-tier. I saw ApplicationModule.getSession() which I'm
    hopi[i]Long postings are being truncated to ~1 kB at this time.

  • ViewObject based on two entities strange behaviour on insert

    Hi,
    I've noticed a strange problem today when I insered a new record in a detail view object.
    I have a master entity and a detail entity and an composition association between the entities. I also have a third entity which is referenced by the detail entity using an association (and is read-only/referenced in the detail view object). Based on these entities I have the following view objects / viewlinks:
    MasterView (uses MasterEntity).
    \-- DetailView (uses DetailEntity, DetailRefEntity) using
        the view link MasterDetailViewLinkEverything works fine, but when I add a new record to the detail view I get to see *two* new records. The first record shows empty fields for the fields that are part of the read-only/referenced DetailRefEntity. The second record shows all columns fine (how it is supposed to do). When I do a refresh on the ViewObject's I only get to see the correct detail record.
    This seems like some weird entity/view cache problem to me. Is this a known problem and is there a work-around (next to refreshing the views, which I'd rather don't do)?
    Regards,
    Peter

    Looking at your post my problem could be related, but the row I create surely gets initialized because I also set some other attributes in the new row. Next to this I use a viewlink for the relationship so I don't need to set the foreign key reference manually (like you did in your post for the department no). Anyways, like I said 9.0.3.2 doesn't fix my problem so these are probably distinct issues. When I find a solution I will update this posting, but I think it's something internal which I don't have access to. Hopefully someone from Oracle knows a workaround.
    Regards,
    Peter

  • SetWhereClause of ViewObject

    Hi,
    I am setting ViewObject's where clause by using setWhereClause(strWhereClause).
    strWhereClause is of sort ATTRIBUTE_ID  IN  (42912850, 42302602, 43326003, 43582985, 43582465, 43474749......)
    But number of elements in IN clause are greater than 1000 and I don't want to use OR.
    So I am thinking to use it as ATTRIBUTE_ID  IN (SELECT * FROM TABLE(CAST(m_AttributeIDList AS NUMBERLIST))) where NUMBERLIST is defined as
    CREATE TYPE NumberList AS TABLE OF NUMBER;
    Can anyone please help me on this, what code should be written in java front end side and what functions or procedure should be written in oracle to achieve this and how should I call it from java.
    Thanks.

    Hi,
    Check this out : https://blogs.oracle.com/aramamoo/entry/passing_comma_separated_string_as
    -Arun

  • ADF ViewObject Clarifications

    Hello,
    I'm facing strange behaviours in ADF viewobject. I have a viewobject PropertyView1. I need to list the properties only for a particular user. And also within that , I need to display based on the property status.
    So I have a dataaction (DA1) which binds to a app module function ,
    ViewObject vo = getPropertyView1();
    vo.setWhereClause(" Property.USERID = :1 ");
    vo.setWhereClauseParam(0,new Long(uid));
    vo.executeQuery();
    This sets the view object to display only the properties of a particular user. This DA1 forwards to a datapage (DP1) on "Success", The DP1 contains the ADF Read-Only table for the propertyview1 view instance.
    I have another function which should display only the "new" properties for a particular user.
    Another data action (DA2) which contains the function,
    ViewObject vo = getPropertyView1();
    vo.setWhereClause(" Property.PROPSTATUS = :1 and Property.LAGENT = :2 ");
    vo.setWhereClauseParam(0,status1);
    vo.setWhereClauseParam(1,new Integer(uid));
    vo.executeQuery();
    This displays the user properties which are "New". Similar to the first data action, DA2 -> DP2 on success.
    The following Sequence of actions gives strange behaviours every time,
    1. Execute the first dataaction (DA1) . It works properly , Provides me with correct list of properties.
    2. Execute Second dataaction (DA2). There are no rows which match the criteria. So I get "No Records Found" in Dp2.
    3. execute first data action again, It provides me No records found as well as Errors.
    The errors are,
    " Bind variable does'nt exist"
    Somehow there are two bind parameters set for DA1, while there is only one bind parameter in my where clause. And this happens only on the second time. I'm able to ececute DA1 correctly on the first time.
    Also, Pelase let me know if I Have two create two view instances for these types of queries. Or Is there a way to revert back to all the rows originally in the propertyview1 view object (The view object has no where clauses in the definition), after executing the DA2 or DA1 dataction. I hope i was clear in the above questions.
    Thanks a lot.

    Just a guess: call vo.setWhereClauseParams(null) before setting new parameters.
    From the VO API Doc:
    Note that calling setWhereClause() does not clear the previous settings of WHERE clause parameters. To reset WHERE clause parameters in the middle tier, call ViewObjectImpl.setWhereClauseParams(Object[]) explicitly with a null value. For example:
    vo.setWhereClauseParams(null);

  • Where clause with Bind Variable in ViewObject

    As per recomendations from Jdev team they say that using Bind varialbles in where clause will improve the performance (Option 1) But it is causing us to create more view objects.
    Example : Lets say we have a View Object EmpVO
    Option 1:
    ViewObject vo=context.getViewObject("EmpVO");
    vo.setWhereClause("EMPNO=?");
    vo.setWhereClauseParam(0,st);
    (or)
    Option 2:
    vo.setWhereClause("EMPNO="+st);
    If we want to use same View Object "EmpVO" in another Action Class
    ViewObject vo1=context.getViewObject("EmpVO");
    vo1.setWhereClause("DEPTNO=?");
    vo1.setWhereClauseParam(0,str);
    It this case it throws an error saying BIND VARIABLE already exits. So we have to make another View Object.
    Where as if we did not use bind variable but used Option 2 approach the same view object can be used in multiple pages.(at the expense of performance as per Jdev team)
    Are we doing something wrong here or are there other ways to use the same view object when using bind variable in where clause.
    Thanks

    I haven't been using BC4J for a while, but I seem to recall that the recommendations are that you don't set the where clause at runtime: You're supposed to define your view with the bind parameter already in it.
    So you'd probably define an EmpsForEmpNoVO and type "EMPNO = ?" in the where box. (There are other ways of finding a single row/entity and one of those may well be more efficient. Perhaps a better example of where you might want a view of employees is WHERE DEPTNO = ?.)
    IIRC, all instances of a particular type of view share the same definition, so you have to be careful if you alter that at runtime. However, I think everything's set up so that you can have many different (and separate) resultsets for a single view (instance) - meaning that it's possible to "run" a view for (e.g.) two different ids. (It's definitely possible to create two different instances of a view from its definition - and the resultsets will definitely be separate then. I think there's a "create" method on the application module; I remember that "find..." always returns the same instance of the view.)
    Hope that's a push in the right direction (since no-one else had replied - and I hope not too much has changed since 9.0.3)....
    Mike.

Maybe you are looking for