|
楼主 |
发表于 2020-3-11 11:44:42
|
显示全部楼层
不能进入调试状态这个解决了,在tomcat的设置中,我原本选了两个 BIZ和UI2,后来我把BIZ去掉了,只剩下选 UI2,可以进入单步调试进行了。但调用src目录下的信息类还是不行我把 drsc和src都设置为源码路径,在src下我建的deptinfo对象还是无法被用在 dsrc的类中,类中这么调用的 DeptInfo类,为测试方便,里面有两个字段,直接设为public,进行赋值;
/** get模式访问 **/
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
JSONObject resObj = new JSONObject();
DeptInfo depObj = new DeptInfo();
depObj.code="部门编码001";
depObj.name = "部门名190";
resObj.put("flag", true);
resObj.put("message", "你好,这是从ReadTestInfo get获取的信息");
response.setCharacterEncoding("UTF-8");
response.setContentType("application/json;charset=UTF-8");
System.out.println(resObj.toString());
response.getWriter().write(resObj.toString());
response.flushBuffer();
}
但运行时报异常:
严重: Servlet.service() for servlet main-servlet threw exception
com.justep.classloader.ClassLoaderException: 编码: JUSTEP060010; 提示: 编译模块"/UI2/TestMes/entrustmana/service"中的类"ReadTestInfo"出错
警告: [options] 未与 -source 1.5 一起设置引导类路径
警告: [options] 源值1.5已过时, 将在未来所有发行版中删除
警告: [options] 目标值1.5已过时, 将在未来所有发行版中删除
警告: [options] 要隐藏有关已过时选项的警告, 请使用 -Xlint:-options。
D:\BeX5V38\model\UI2\TestMes\entrustmana\service\dsrc\ReadTestInfo.java:20: 错误: 找不到符号
DeptInfo depObj = new DeptInfo();
^
符号: 类 DeptInfo
位置: 类 ReadTestInfo
D:\BeX5V38\model\UI2\TestMes\entrustmana\service\dsrc\ReadTestInfo.java:20: 错误: 找不到符号
DeptInfo depObj = new DeptInfo();
^
符号: 类 DeptInfo
位置: 类 ReadTestInfo
2 个错误
4 个警告
at com.justep.classloader.ClassLoaderException.create(Unknown Source)
at com.justep.classloader.Model$a.a(Unknown Source)
at com.justep.classloader.Model$a.a(Unknown Source)
at com.justep.classloader.Model.getModelClass(Unknown Source)
at com.justep.ui.JavaServer.runJava(Unknown Source)
at com.justep.ui.JavaServer.doJ(Unknown Source)
at com.justep.ui.JavaServer.service(Native Method)
at com.justep.ui.servlet.MainServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.justep.portal.filter.RedirectFilter.doFilter(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.justep.ui.filter.MicroServiceAdminFilter.doFilter(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
|
|