0 Replies Latest reply on Dec 5, 2014 9:14 AM by Shannon Scott

    Oracle ADF View Object Troubleshooting (No Error, No Data)

    Shannon Scott Newbie

      I have a View Object with this query:

      SELECT 
        'Hello' as database_id, 
        10 as database_version 
      FROM DUAL
      

       

      I'm using the View Object like this:

      try {
        System.out.println("Before Query");
        // Create View object to retrieve data
        ViewObject dbInfoView = findViewObject(_DB_INFO_VIEW, _DB_PKG_NAME);
      
        // Execute view and dump as XML
        dbInfoView.executeQuery();
        Node dbInfoXML = dbInfoView.writeXML(0,0);
        TestViewRowImpl row = null;
      
        while(dbInfoView.hasNext()) {
          row = (TestViewRowImpl)dbInfoView.next();
          System.out.println("row.getDatabaseId() = "+row.getDatabaseId());
          System.out.println("row.getDatabaseVersion() = "+row.getDatabaseVersion());
        }
      
        System.out.println("After Query");
      
      } catch (JboException e) {
      

       

      You can see from the log below that dbInfoView.hasNext() is true, but the result has null values.

      The query does not work, but is not producing an error.

      If anyone has an Oracle ADF View Object that works in any JBOSS Server Environment, please get back to me.

      Any helpful advice or pointers are greatly appreciated.

       

      14:36:46,555 INFO  [stdout] (http-/127.0.0.1:8080-1) Before Query
      
      14:36:46,564 FINEST [oracle.jbo.common.ConsoleDiagnosticImpl] (http-/127.0.0.1:8080-1) [326] Loading from individual XML files
      14:36:46,564 FINEST [oracle.jbo.common.ConsoleDiagnosticImpl] (http-/127.0.0.1:8080-1) [327] Loading the Containees for the Package 'xxx.yyy.zzz.data.data'.
      14:36:46,589 FINEST [oracle.jbo.common.ConsoleDiagnosticImpl] (http-/127.0.0.1:8080-1) [328] StringManager initialized and added to appscopeoracle.adf.share.HashMapScopeAdapter@74ae15
      14:36:46,599 FINE  [oracle.adf.share.ConfigContainerFactory] (http-/127.0.0.1:8080-1) Adding ADFSettings for ClassLoader ModuleClassLoader for Module "deployment.xxx.ear.xxx.yyy.zzz.ejb.SystemCtrl.jar:main" from Service Module Loader
      14:36:46,750 FINEST [oracle.jbo.common.ConsoleDiagnosticImpl] (http-/127.0.0.1:8080-1) [329] CSMessageBundle (language base) being initialized
      14:36:46,758 FINEST [oracle.jbo.common.ConsoleDiagnosticImpl] (http-/127.0.0.1:8080-1) [330] AdfmConfig created the Default value : ppr for changeEventPolicy.
      14:36:46,758 FINEST [oracle.jbo.common.ConsoleDiagnosticImpl] (http-/127.0.0.1:8080-1) [331] AdfmConfig created the Default value: false for useRuntimeClassForAttributeAccess.
      14:36:46,758 FINEST [oracle.jbo.common.ConsoleDiagnosticImpl] (http-/127.0.0.1:8080-1) [332] AdfmConfig created the Default value: true for useBindVarsForViewCriteriaLiterals.
      14:36:46,758 FINEST [oracle.jbo.common.ConsoleDiagnosticImpl] (http-/127.0.0.1:8080-1) [333] AdfmConfig created the Default value: true for useBindValuesInFindByKey.
      14:36:46,758 FINEST [oracle.jbo.common.ConsoleDiagnosticImpl] (http-/127.0.0.1:8080-1) [334] AdfmConfig created the Default value: true for mapNegativeScaleToIntegerTypes.
      14:36:46,758 FINEST [oracle.jbo.common.ConsoleDiagnosticImpl] (http-/127.0.0.1:8080-1) [335] AdfmConfig created the Default value: true for executeEmptyOnException.
      14:36:46,758 FINEST [oracle.jbo.common.ConsoleDiagnosticImpl] (http-/127.0.0.1:8080-1) [336] AdfmConfig created the Default value:  for useBindVarsForViewCriteriaLiterals.
      14:36:46,849 FINE  [oracle.adf.share.config.ADFConfigImpl] (http-/127.0.0.1:8080-1) Parsed and stored results for http://xmlns.oracle.com/adfm/config
      14:36:46,849 FINE  [oracle.adf.share.config.ADFConfigImpl] (http-/127.0.0.1:8080-1) Parsed and stored results for http://xmlns.oracle.com/adfm/config
      14:36:46,851 FINEST [oracle.jbo.common.ConsoleDiagnosticImpl] (http-/127.0.0.1:8080-1) [337] ViewObjectImpl's default fetch mode = 0
      14:36:46,852 FINEST [oracle.jbo.common.ConsoleDiagnosticImpl] (http-/127.0.0.1:8080-1) [338] No XML file /persdef/xxx/yyy/zzz/data/TestView.xml for metaobject persdef.xxx.yyy.zzz.data.TestView
      14:36:46,852 FINEST [oracle.jbo.common.ConsoleDiagnosticImpl] (http-/127.0.0.1:8080-1) [339] MDS error (MetadataNotFoundException): MDS-00013: no metadata found for metadata object "/persdef/xxx/yyy/zzz/data/TestView.xml" 
      MDS-00201: PDocument not found in MetadataStore : [store-type=DefaultMetadataStore lookup-order=Classpath] 
      14:36:46,854 FINEST [oracle.jbo.common.ConsoleDiagnosticImpl] (http-/127.0.0.1:8080-1) [340] ViewObject:TestView creating ViewCriteriaManager instance.
      14:36:46,862 FINEST [oracle.jbo.common.ConsoleDiagnosticImpl] (http-/127.0.0.1:8080-1) [341] TestView ViewRowSetImpl.execute caused params to be "un"changed
      14:36:46,870 FINEST [oracle.jbo.common.ConsoleDiagnosticImpl] (http-/127.0.0.1:8080-1) [342] Carrying over CappedRowCount:-1for ViewRowSet:TestView
      14:36:46,871 FINEST [oracle.jbo.common.ConsoleDiagnosticImpl] (http-/127.0.0.1:8080-1) [343] Column count: 2
      14:36:46,871 FINEST [oracle.jbo.common.ConsoleDiagnosticImpl] (http-/127.0.0.1:8080-1) [344] executeQueryForCollection ViewObject:TestView, RowSet:TestView
      14:36:46,872 CONFIG [oracle.adfdiagnostics] (http-/127.0.0.1:8080-1) Execute query
      14:36:46,874 FINEST [oracle.jbo.common.ConsoleDiagnosticImpl] (http-/127.0.0.1:8080-1) [345] TestView>#q computed SQLStmtBufLen: 186, actual=146, storing=176
      14:36:46,874 FINEST [oracle.jbo.common.ConsoleDiagnosticImpl] (http-/127.0.0.1:8080-1) [346] SELECT 
             'Hello' as database_id, 
             10 as database_version 
       FROM DUAL
      14:36:46,874 FINEST [oracle.jbo.common.ConsoleDiagnosticImpl] (http-/127.0.0.1:8080-1) [347] ViewObject: [xxx.yyy.zzz.data.TestView]AppModule.TestView Created new QUERY statement
      14:36:46,919 FINEST [oracle.jbo.common.ConsoleDiagnosticImpl] (http-/127.0.0.1:8080-1) [348] Bind params for ViewObject: [xxx.yyy.zzz.data.TestView]AppModule.TestView
      14:36:46,919 CONFIG [oracle.adfdiagnostics] (http-/127.0.0.1:8080-1) Execute query
      14:36:46,935 CONFIG [oracle.adfdiagnostics] (http-/127.0.0.1:8080-1) Execute query
      14:36:46,935 CONFIG [oracle.adfdiagnostics] (http-/127.0.0.1:8080-1) Execute query
      14:36:46,945 INFO  [stdout] (http-/127.0.0.1:8080-1) row.getDatabaseId() = null
      
      14:36:46,945 INFO  [stdout] (http-/127.0.0.1:8080-1) row.getDatabaseVersion() = null
      
      14:36:46,945 INFO  [stdout] (http-/127.0.0.1:8080-1) After Query