500:使用 Oracle11g 的 java 和 javascript 出现内部服务器错误

500: Internal Server Error with java and javascript using Oracle11g

提问人:Shinxx 提问时间:7/14/2023 更新时间:7/14/2023 访问量:13

问:

  public Integer getRecordCount(ErdbcrBean erdbcrBean/*String empid, String tocod*/)
  {
    SqlSession session = getSqlSessionFactory().openSession();
    try
    {
      return (Integer)session.selectOne("getRecordCount", erdbcrBean);
    }catch (Exception e){
      this.logger.error("getRecordCount " + erdbcrBean, e);
      return 1;
    }finally{
      session.close();
    }
  }

这是我用来查看数据库中的数据是否重复的结果的 DAOImpl java 代码。

 public String getRecordCount() throws Exception {
      logName = (String) request.getSession().getAttribute("userName");
      
      if (logName == null)
          return "notLogin";
      else {
          /*Gson gson = new Gson();
          Type collectionType = new TypeToken<ErdbcrBean>() {
          }.getType();
          erdbcrBean = (ErdbcrBean)gson.fromJson(data, collectionType);*/
          Gson gson = new Gson();
          ErdbcrBean erdbcrBean = gson.fromJson(data, ErdbcrBean.class);
          amsBillingFacade.getBillingFacade().getR3BillHeaderDAO().execPREnable(ROLE_DESC);
          recordCount = amsBillingFacade.getBillingFacade().getR3BillHeaderDAO().getRecordCount(erdbcrBean);
          
          return SUCCESS;
      }
  }

此代码供 java 控制器在 DAOImpl 中调用。

$.getJSON('getrecordcount.html', {
                data: JSON.stringify(entries)
          }, function (record) {
              if (record > 0) {
                  $('#errorDialog').data('msg', 'Data already exist.').dialog('open');
}
}

这是调用所有服务器端以显示在前端的代码。

我在使用上述代码时遇到困难,并显示错误消息: http://10.0.2.58:7101/erdbcr/getrecordcount.html?data=%5B%7B%22usernm%22%3A%22MOERW03%22%2C%22memon%22%3A%22111111%22%2C%22itmno%22%3A%22%22%2C%22eridn%22%3A%220617439970%22%2C%22tocod%22%3A%2239%22%2C%22ssamt%22%3A%22480.00%22%2C%22mcamt%22%3A%220.00%22%2C%22ecamt%22%3A%220.00%22%2C%22orgcd%22%3A%221%22%2C%22pytyp%22%3A%221%22%2C%22prnum%22%3A%22%22%2C%22valda%22%3A%22190828%22%2C%22tsnum%22%3A%22190828%22%2C%22fapld%22%3A%221907%22%2C%22tapld%22%3A%221%22%2C%22sbpda%22%3A%22190828%22%7D%5D(500:内部服务器错误)

javascript java jquery ajax oracle11g

评论

0赞 pmdba 7/14/2023
您需要从服务器中找到日志,其中详细说明了“500”错误是什么。它可能有很多很多的东西,我们无法根据您提供的内容诊断您的问题。

答: 暂无答案