我正在使用apache api openmeetings。當我嘗試添加一個新用戶,我得到的HTTP響應錯誤500,並在openmeetings以下錯誤日誌:通過Ajax在apache openmeetings API中添加新用戶不起作用
ERROR 09-06 11:18:00.938 22023 230 o.a.o.w.UserWebService [0.0-5080-exec-2] - addNewUser
java.lang.NullPointerException: null
at org.apache.openmeetings.webservice.UserWebService.add(UserWebService.java:171)
這是我的代碼:
function create_user() {
$.ajax({
method: "POST",
url: "http://localhost:5080/openmeetings/services/user?sid=28647b3d-ffe2-4c1b-9835-9856b6c3d11b",
data: {
user: JSON.stringify({
address: {
country: "IT",
deleted: false,
email: "[email protected]",
id: "2"
},
externalId: "1",
externalType: "myCMS",
firstname: "Test",
id: "2",
languageId: "5",
lastname: "Prova",
login: "Test",
password: "Prova1*",
rights: null,
timeZoneId: "Europe/Rome",
type: "user"
}),
confirm: false
},
dataType: "json",
success: function(data) {
consol.log(data);
}
});
}
你好,你使用的是什麼版本的OM?行號171對3.3.0和3.3.1似乎沒用::( –
我使用的是版本3.3.1 –
你能否提供更大的堆棧跟蹤? –