Tapan sarkar
Tapan sarkar

Reputation: 47

Oracle MAF Error "Unable to read DataControl Usages, on loadDataControl for id:"

I have created a simple SOAP web service for a remote DB which is working fine in WebLogic 12c server and also in Jdeveloper HTTP analyzer. When I am using the same web service in the code below, I am getting the following error (I have included the System.out.println outputs in ref. to the flow of the code) I am using Jdeveloper 12C MAF 2.0.0.0.41 on Mac OSx 10.9.

Chk #0 Processing row# 1 Chk #1 Chk #2 [SEVERE - oracle.adfmf.framework - AmxBindingContext - loadDataControlById] Unable to read DataControl Usages, on loadDataControl for id: WLFNewActWS. [SEVERE - oracle.adfmf.framework - SynchronizationDC - syncDataFromOfflineToOnline] [Ljava.lang.StackTraceElement;@467c53d3

    public void syncDataFromOfflineToOnline() {
    Trace.log(Utility.FrameworkLogger, Level.INFO, this.getClass(), "syncDataFromOfflineToOnline",
              "Executing syncDataFromOfflineToOnline Method");
    try {
        Connection conn = DBConnectionFactory.getConnection();
        conn.setAutoCommit(false);
        String select = "SELECT * FROM DEPARTMENTS";
        PreparedStatement pStmt = conn.prepareStatement(select);
        ResultSet rs = pStmt.executeQuery();
        System.out.println("Chk #0");            
        int rowcount = 0;            
        while (rs.next()) {
            rowcount++;
            System.out.println("Processing row# " + rowcount);

            List namesList = new ArrayList(1);
            List paramsList = new ArrayList(1);
            List typesList = new ArrayList(1);  

            Department dept = new Department();

            dept.setDeptId(rs.getInt("DEPARTMENT_ID"));
            dept.setDeptName(rs.getString("DEPARTMENT_NAME"));
            dept.setMgrId(rs.getInt("MANAGER_ID"));                
            dept.setLocId(rs.getInt("LOCATION_ID"));

            System.out.println("Chk #1");
            GenericType gtDept =
                    GenericTypeBeanSerializationHelper.toGenericType("WLFNewActWS.Types.persistDepartments.arg0", dept);

                System.out.println("Chk #2");                
                namesList.add("arg0");
                paramsList.add(gtDept);
                typesList.add(GenericType.class);   

                AdfmfJavaUtilities.invokeDataControlMethod("WLFNewActWS", null, "persistDepartments", namesList,
                                                           paramsList, typesList);
            System.out.println("Chk #3");
        }
    } catch (SQLException e) {
        Trace.log(Utility.FrameworkLogger, Level.SEVERE, this.getClass(), "syncDataFromOfflineToOnline",
                  e.getMessage());
    } catch (Exception e) {
        Trace.log(Utility.FrameworkLogger, Level.SEVERE, this.getClass(), "syncDataFromOfflineToOnline",
                  e.getStackTrace());
    }
}

Upvotes: 0

Views: 382

Answers (2)

Arj 1411
Arj 1411

Reputation: 1401

This occurs of the binding issue. Please create a reference/binding to 'WLFNewActWS' in your amx page. It will solve your problem...!

Upvotes: 0

user5473499
user5473499

Reputation: 11

This may not be the answer to this question, but it may be the answer for someone searching for "Unable to read DataControl Usages, on loadDataControl for id"

In my case it is with Oracle MAF, but this also applies to Oracle ADF.

Your web service needs to be in your DataBindings.cpx file.

Something like:

<dataControlUsages>
    <dc id="WLFNewActWS " path="mobile.WLFNewActWS "/>
</dataControlUsages>

I cheat and drag something from the WS into a one of pages and have jdeveloper add the record in DataBindings.cpx for me.

Upvotes: 1

Related Questions