[15-2-11 16:11:20:492 GMT+08:00] 00000041 SystemOut O LoginRooterServlet---remasrk---WebChinaTobacco
[15-2-11 16:11:20:492 GMT+08:00] 00000041 servlet E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0068E: 应用程序 LnPortal4_2_20141217_war 中 servlet LoginRooterServlet 的某一服务方法创建了未捕获到的异常。创建的异常:java.lang.NullPointerException
at com.icss.resourceone.common.login.LoginRooterServlet.doPost(LoginRooterServlet.java:42)
at com.icss.resourceone.common.login.LoginRooterServlet.doGet(LoginRooterServlet.java:32)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1597)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
at com.icss.resourceone.sdk.SdkFilter.doFilter(SdkFilter.java:147)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:184)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at com.icss.j2ee.servlet.filter.ChangeReqEncoding.doFilter(Unknown Source)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:184)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:934)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:181)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:864)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1613)
我的LoginRooterServlet代码是
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
String remark = request.getParameter("remark");
System.out.println("LoginRooterServlet---remasrk---"+remark);
HttpSession sess = request.getSession(false);
Map rootMsg = (Map)sess.getAttribute("rooterMsg");
String userName = rootMsg.get("userName").toString();
System.out.println("LoginRooterServlet-----userName====="+userName);
String password = rootMsg.get("password").toString();
System.out.println("LoginRooterServlet---====password===="+password);
String returnMsg = "\u8DF3\u8F6C\u5931\u8D25\uFF01\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458";
String resUrl = (new StringBuilder(String.valueOf(sess.getServletContext().getRealPath("/")))).append("/appLinkConfig.xml").toString();
System.out.println("LoginRooterServlet---resUrl===="+resUrl);
try
{
Document doc = (new SAXReader()).read(new File(resUrl));
Element root = doc.getRootElement();
List infos = root.selectNodes("appInfo");
System.out.println("--------remark------------"+remark);
我打日志时, 能获得remask,下面的就包上面的错,刷新页面时用户userid为空,求大神赐教
你都能取到数据了, 取到数据了不会插? 还是不会去排除重复数据?
@one123:
1. ID是自增长的吗?
2. 有时间戳的字段区分吗?
insert into [LocalTable]
select * from [RemoteTable]