我为远程数据库创建了一个简单的SOAP Web服务,它在WebLogic 12c服务器和Jdeveloper HTTP分析器中运行良好。当我在下面的代码中使用相同的Web服务时,我收到以下错误(我已将参考流中的System.out.println输出包含在代码流中)我使用的是Jdeveloper 12C MAF 2.0.0.0。在Mac OSx 10.9上有41个。
Chk#0 处理第1行 Chk#1 Chk#2 [SEVERE - oracle.adfmf.framework - AmxBindingContext - loadDataControlById]无法读取DataControl用法,在loadDataControl上读取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());
}
}
答案 0 :(得分:1)
这可能不是这个问题的答案,但它可能是搜索" 无法读取DataControl用途的答案,在loadDataControl上为id "
就我而言,它适用于Oracle MAF,但这也适用于Oracle ADF。
您的Web服务需要位于DataBindings.cpx文件中。
像:
<dataControlUsages>
<dc id="WLFNewActWS " path="mobile.WLFNewActWS "/>
</dataControlUsages>
&#13;
我欺骗并将一些东西从WS拖到一个页面中,并让jdeveloper为我添加DataBindings.cpx中的记录。
答案 1 :(得分:0)
发生绑定问题。请在amx
页面中创建对“WLFNewActWS”的引用/绑定。它会解决你的问题......!