pika0511
123
2020-03-08 02:15:29 작성 2020-03-08 02:17:28 수정됨
2
175

[jsp] - myBatis 에러 좀 봐주세요...




3월 08, 2020 2:02:18 오전 org.apache.catalina.core.StandardWrapperValve invoke

심각: Servlet.service() for servlet [jsp] in context with path [/d0306_myBatis] threw exception [An exception occurred processing JSP page [/mybatisEx.jsp] at line [32]


29: }catch(Exception e){

30: e.printStackTrace();

31: }finally{

32: sqlSession.close();

33: }

34: %>

35: </body>



Stacktrace:] with root cause

java.lang.NullPointerException

at org.apache.jsp.mybatisEx_jsp._jspService(mybatisEx_jsp.java:146)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)

at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:457)

at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)

at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)

at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800)

at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)

at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)

at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)

at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

at java.lang.Thread.run(Unknown Source)



32번째 줄에서 뭐가 문제란건지...모르겠습니다

도움 좀 주세요..

0
0
  • 답변 2

  • 개굴개굴
    381
    2020-03-08 03:14:26


    java.lang.NullPointerException
    
    	at org.apache.jsp.mybatisEx_jsp._jspService(mybatisEx_jsp.java:146)

    mybatisEx_jsp의 146라인을 체크해보세요.

    0
  • pika0511
    123
    2020-03-08 14:36:27 작성 2020-03-08 14:38:50 수정됨

    아..해결했습니다..

    config.xml 에서 typeAliases를 추가해놓고, 해당하는 vo를 만들지 않아서 발생된 문제였습니다.

    저는 해당 vo를 만들지 않아도, 위 jsp파일을 실행시키는데 전혀 관련이 없어서 무시했는데

    myBatis는 우선은 config.xml 파일에 내용들을 모두 구현해 놓아야 정상작동하는 것 같습니다.


    답변 주셔서 감사합니다.

    0
  • 로그인을 하시면 답변을 등록할 수 있습니다.