本地使用weblogic 配置Idea 登录出现的问题
1、登录失败
错误信息:登录时校验用户信息发生异常!
错误原因:生成的验证码,在放入request.getSession.setAttribute后;登录时校验,未获取attribute的值;
代码位置:
前台:
request.getSession().setAttribute(Const.SESSION_VERIFYCODE, buffer.toString());
在weblogic改为https登录时,下面这一行会报错
String verifyCodeSession = (String) request.getSession().getAttribute(Const.SESSION_VERIFYCODE);
取得值为null
原因:访问路径的问题,不要写localhost,要写具体的ip,比如https://10.12.12.12:7002/webDemo
2、进入首页出错
后台日志:
<2019-10-21 上午10时57分45秒 CST> <Error> <HTTP> <BEA-101017> <[ServletContext@554780356[app:pension-new-f module:pension_new_f path:null spec-version:3.0], request: weblogic.servlet.internal.ServletRequestImpl@11ca1880[
POST /pension-new-f/modules/login/ListMenu.jsp HTTP/1.1
Connection: keep-alive
Content-Length: 195
Pragma: no-cache
Cache-Control: no-cache
Origin: https://localhost:7002
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
Referer: https://localhost:7002/pension-new-f/
Accept-Encoding: gzip, deflate, br
Accept-Language: zh-CN,zh;q=0.9
]] Root cause of ServletException.
weblogic.servlet.jsp.CompilationException: Failed to compile JSP /modules/login/ListMenu.jsp
ListMenu.jsp:24:18: Error in "corejscss.jsp" at line 9: The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files
<%@include file="../../common/corejscss.jsp"%>
^--------------------------^
at weblogic.servlet.jsp.JavelinxJSPStub.reportCompilationErrorIfNeccessary(JavelinxJSPStub.java:225)
at weblogic.servlet.jsp.JavelinxJSPStub.compilePage(JavelinxJSPStub.java:161)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:237)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:190)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:281)
Truncated. see log file for complete stacktrace
>
<2019-10-21 上午10时57分47秒 CST> <Error> <HTTP> <BEA-101107> <[ServletContext@554780356[app:pension-new-f module:pension_new_f path:null spec-version:3.0]] Problem occurred while serving the error page.
weblogic.servlet.jsp.CompilationException: Failed to compile JSP /error.jsp
error.jsp:7:17: The include file was not found.
<%@include file="../../../../common/corejscss.jsp"%>
^--------------------------------^
error.jsp:7:17: The include file was not found.
<%@include file="../../../../common/corejscss.jsp"%>
^--------------------------------^
at weblogic.servlet.jsp.JavelinxJSPStub.reportCompilationErrorIfNeccessary(JavelinxJSPStub.java:225)
at weblogic.servlet.jsp.JavelinxJSPStub.compilePage(JavelinxJSPStub.java:161)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:237)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:190)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:281)
Truncated. see log file for complete stacktrace
>
原因: 有可能是Jdk版本不对,本地使用的1.8,后来在weblogic服务创建域的时候使用1.7,可以访问。
3、线程泄露,内存溢出
Exception in thread “[STANDBY] ExecuteThread: ‘1’ for queue: ‘weblogic.kernel.Default (self-tuning)’”
原因:JVM内存使用过大,应扩大内存。
参考:
https://blog.csdn.net/su1573/article/details/102706086
D:\Oracle\Middleware\user_projects\domains\base_domain\startWebLogic.cmd
在call 上一行增加:
set USER_MEM_ARGS=-Xms512m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=1024m
或者进入:
D:\Oracle\Middleware\user_projects\domains\base_domain\bin\setDomainEnv.cmd
在218行增加:
set USER_MEM_ARGS=-Xms512m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=1024m
待续...
author:su1573