티스토리 뷰
|에러 문구
org.h2.jdbc.JdbcSQLException: Column "COTENT" not found; SQL statement:
update board set title = ?, cotent = ? set title = ?, content =?, where seq = ? [42122-197]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:357)
at org.h2.message.DbException.get(DbException.java:179)
at org.h2.message.DbException.get(DbException.java:155)
at org.h2.table.Table.getColumn(Table.java:682)
at org.h2.command.Parser.readTableColumn(Parser.java:771)
at org.h2.command.Parser.parseUpdateSetClause(Parser.java:809)
at org.h2.command.Parser.parseUpdate(Parser.java:780)
at org.h2.command.Parser.parsePrepared(Parser.java:485)
at org.h2.command.Parser.parse(Parser.java:335)
at org.h2.command.Parser.parse(Parser.java:307)
at org.h2.command.Parser.prepareCommand(Parser.java:278)
at org.h2.engine.Session.prepareLocal(Session.java:611)
at org.h2.server.TcpServerThread.process(TcpServerThread.java:271)
at org.h2.server.TcpServerThread.run(TcpServerThread.java:165)
at java.lang.Thread.run(Thread.java:748)
at org.h2.engine.SessionRemote.done(SessionRemote.java:623)
at org.h2.command.CommandRemote.prepare(CommandRemote.java:85)
at org.h2.command.CommandRemote.(CommandRemote.java:51)
at org.h2.engine.SessionRemote.prepareCommand(SessionRemote.java:493)
at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1247)
at org.h2.jdbc.JdbcPreparedStatement.(JdbcPreparedStatement.java:76)
at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:304)
at com.springbook.biz.board.impl.BoardDAO.updateBoard(BoardDAO.java:55)
at org.apache.jsp.updateBoard_005fproc_jsp._jspService(updateBoard_005fproc_jsp.java:134)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:438)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
|문제 원인
BoardDAO.java에서 수정과 관련된 코드가 문제가 있었다.
private final String BOARD_UPDATE = "update board set title = ?, cotent = ? set title = ?,"
+ " content =?, where seq = ? ";
문제 1. cotent -> content // 단순 오타
문제 2. title, content 중복 작성
문제 3. where앞에 ','로 인해 틀린 문법 -> ',' 삭제
'스프링' 카테고리의 다른 글
[스프링퀵스타트] at org.apache.catalina.loader.WebappClassLoaderBase.loadClass 에러 해결 - h2 DB 연결문제 (2) | 2020.01.31 |
---|---|
[스프링퀵스타트] h2 DB에 연결시 java.lang.ClassNotFoundException: org.h2.Driver 문제 (0) | 2020.01.30 |
[스프링퀵스타트] MVC 아키텍쳐에서 각 요소의 기능 및 개발 주체 정리표 (0) | 2020.01.17 |
[스프링퀵스타트] mvc1 모델 코드 정리 (0) | 2020.01.16 |
[스프링퀵스타트] 도메인 경로 길이 및 설정에 대한 생각정리 (0) | 2020.01.16 |
- Total
- Today
- Yesterday
- 귀국
- 캘거리
- 프로그클럽
- 캘거리 국제 공항
- 개발자영어
- 온리프라이스
- 프로그래밍언어
- 량량
- 온리 프라이스 카라멜맛 팝콘
- 개발자
- 엠프레스
- 자바
- happy new year
- 프랑스 정품 직구 프랑스 옴므 알뤼르 옴므 에디션 블량쉐
- 스프링 퀵 스타트
- 프로그
- 새해맞이
- 캐나다
- 카라멜팝콘
- yyc
- 변수
- 엠프레스 파타야 호텔
- 온리프라이스카라멜팝콘
- 스프링
- JdbcTemplate
- OOP
- 워킹홀리데이
- 호텔
- javaw.exe
- 2020
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |