我的Update_password PL/SQL过程似乎在Web方法中永远不会执行。我已经使用" error1"one_answers" error2"检查了检查。MRESULT始终设置为" error1"。您能发现我的执行情况不寻常吗?也许我看不到有问题。我已经花了太多时间了...
@WebMethod
public String updatePassword(@WebParam(name = "mEmail")
String mEmail, @WebParam(name = "mPassword")
String mPassword, @WebParam(name = "mNewPassword")
String mNewPassword, @WebParam(name = "mConfirmPassword")
String mConfirmNewPassword) {
ClsConnectionData conn = null;
ResultSet rst;
String mResult = "ERROR1";
try
{
conn = new ClsConnectionData();
rst = conn.execute("ULM_SIM_PACKAGE.update_password('" + mEmail + "','" + mPassword + "','" + mNewPassword + "','" + mConfirmNewPassword + "',:1)");
if (rst.next())
mResult = rst.getString(1);
else
mResult = "ERROR2";
}
catch(Exception e){
e.printStackTrace();
}finally{
conn.disconnect();
}
return mResult;
}
找到了实际错误。我一直缺少对定义连接的函数的调用。
有一个connectDefault()函数,应该在conn = new ClsConnectionData();
下调用:
conn = new ClsConnectionData();
conn.connectDefault();
update_password无法执行,因为没有数据库连接...