システムエラー

システムエラーが発生しました。


数秒後、TOPページに戻ります。

戻らない場合、下記のリンクを選択してTOPページに戻ってください。

TOPページに戻る


org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [ SELECT COALESCE(t1.kind,1) as kind, t1.bookid, t1.title1, t1.title2, t1.title3, t1.vol, t1.auth1, t1.auth2, t1.publica, t14.pubyear, t2.review, t2.writer, TO_CHAR(t2.inputdate,'YYYY年MM月DD日') AS inputdate, t1.betu, t1.class_mark, t1.auth_mark, t1.vol_mark, t1.intitle, t1.inauth, t1.serise, t1.servol, t1.sub_serise, t1.sub_servol, t1.han, t1.titledefault, t1.isbn, t1.isbn_b, t1.isbn_set, t1.country, t1.language_mark, t1.pubfrom, t1.page AS page_num, t1.size, t1.price, t1.chuki, t1.kenmei, t1.contens, t3.contents, t3.contents_a, t3.contents_t, COALESCE(t6.jw_kind, 0) AS jw_kind, COALESCE(t7.book_cnt,0) AS book_cnt, (COALESCE(t7.book_cnt,0) - COALESCE(t7.no_rental,0) - COALESCE(t7.rental_num,0) - COALESCE(t8.keep_cnt,0) - COALESCE(t7.missing_cnt,0)) AS rental_cnt, COALESCE(t8.reserve_cnt,0) + COALESCE(t8.keep_cnt,0) AS reserve_cnt, t6.rental_total, CASE WHEN ((COALESCE(t7.book_cnt,0) - COALESCE(t7.no_rental,0) - COALESCE(t7.rental_num,0) - COALESCE(t8.keep_cnt,0) - COALESCE(t7.missing_cnt,0)) <= 0) AND (t7.rental_num <= 0) AND COALESCE(t8.keep_cnt,0) > 0 THEN 2 WHEN (( COALESCE(t7.book_cnt,0) > 0 AND (COALESCE(t7.book_cnt,0) - COALESCE(t7.no_rental,0) - COALESCE(t7.rental_num,0) - COALESCE(t8.keep_cnt,0) - COALESCE(t7.missing_cnt,0)) <= 0) AND (COALESCE(t7.rental_num,0) > 0 OR COALESCE(t8.keep_cnt,0) > 0)) THEN 1 ELSE 0 END AS rental_state, TO_CHAR(t7.return_date,'YYYY年MM月DD日') AS return_date, CASE WHEN t1.jpimage IS NOT NULL THEN 1 ELSE 0 END AS jpimage_flg ,(SELECT ARRAY_TO_STRING( ARRAY( SELECT btc.theme_name FROM xfind_book_theme_ct btc LEFT JOIN xfind_book_theme_dt btd on btc.theme_id = btd.theme_id where btd.bookid = t1.BOOKID AND (VALIDATE>= CURRENT_DATE OR VALIDATE is null ) AND (OPEN_DATE <= CURRENT_DATE) AND COALESCE(OPEN_FLG,0) = 0 GROUP by btc.theme_id,btc.theme_name order by btc.theme_id),',' ) ) AS theme_name ,(SELECT ARRAY_TO_STRING( ARRAY( SELECT btc.theme_id FROM xfind_book_theme_ct btc LEFT JOIN xfind_book_theme_dt btd on btc.theme_id = btd.theme_id where btd.bookid = t1.BOOKID AND (VALIDATE>= CURRENT_DATE OR VALIDATE is null ) AND (OPEN_DATE <= CURRENT_DATE) AND COALESCE(OPEN_FLG,0) = 0 GROUP by btc.theme_id order by btc.theme_id),',' ) ) AS theme_id ,t7.not_reserve_cnt ,t7.reservable_rental_num FROM book t1 LEFT JOIN book_review t2 ON (t1.scno = t2.scno AND t1.bookid = t2.bookid AND (t2.validate >= CURRENT_DATE OR t2.validate IS NULL)) LEFT JOIN book_contents t3 ON (t1.scno = t3.scno AND t1.bookid = t3.bookid) LEFT JOIN ( SELECT scno, bookid, SUM(COALESCE(rentalcnt,0)) as rental_total, MIN(jw_kind) AS jw_kind, MIN(recedate) AS recedate FROM book_local WHERE bookid = 34948 GROUP BY scno, bookid ) t6 ON (t1.scno = t6.scno AND t1.bookid = t6.bookid) LEFT JOIN ( SELECT tb1.scno, tb1.bookid, MIN(tb2.termdate) AS return_date, COALESCE(COUNT(DISTINCT CASE WHEN COALESCE(tb1.CONDID,-1) <> 0 THEN tb1.accn ELSE NULL END),0) AS book_cnt, COALESCE(COUNT(DISTINCT CASE WHEN COALESCE(tb6.rentalday,999) = 0 THEN tb1.accn ELSE NULL END),0) AS no_rental, COALESCE(COUNT(DISTINCT CASE WHEN COALESCE(tb1.condid,-1) = 999 THEN tb1.accn ELSE NULL END),0) AS missing_cnt, COALESCE(COUNT(DISTINCT CASE WHEN tb2.returndate IS NULL THEN tb2.accn ELSE NULL END),0) AS rental_num, COUNT(DISTINCT CASE WHEN tb5.RECE_FLG=1 OR tb6.RECE_FLG=1 THEN tb1.RENTAL_KIND || tb1.ACCN ELSE NULL END) AS not_reserve_cnt, COUNT(DISTINCT CASE WHEN (tb5.RECE_FLG Is Null or tb5.RECE_FLG=0) AND (tb6.RECE_FLG Is Null or tb6.RECE_FLG=0) AND (tb2.ID <> 0) THEN tb2.ID ELSE NULL END) AS reservable_rental_num FROM book_local tb1 LEFT JOIN rental tb2 ON (tb2.accn = tb1.accn AND tb2.returndate IS NULL) LEFT JOIN xfind_possess tb3 ON tb1.poss_ho=tb3.kindid LEFT JOIN xfind_putplace tb4 ON tb1.putplace_ho=tb4.kindid LEFT JOIN xfind_condition tb5 ON tb1.condid=tb5.kindid LEFT JOIN KIND_REN tb6 ON (tb1.RENTAL_KIND = tb6.KINDID) WHERE ((COALESCE(tb5.SEARCH_FLG,0) = 1 OR tb1.CONDID IS NULL)) AND(COALESCE(tb3.DEFAULT_FLG,0) = 1 OR tb1.poss_ho IS NULL) AND ((COALESCE(tb4.SEARCH_FLG,0) = 1 OR tb1.putplace_ho IS NULL)) AND COALESCE(tb1.open_flg,0) = 0 AND tb1.bookid = 34948 GROUP BY tb1.scno, tb1.bookid ) t7 ON (t1.scno = t7.scno AND t1.bookid = t7.bookid) LEFT JOIN ( SELECT scno, bookid, COUNT(DISTINCT CASE WHEN COALESCE(keepaccn,'') = '' THEN NULL ELSE ID END) AS keep_cnt, COUNT(DISTINCT CASE WHEN COALESCE(keepaccn,'') = '' THEN ID ELSE NULL END) AS reserve_cnt FROM reserve WHERE rentaldate IS NULL AND CANCELDATE IS NULL AND bookid = 34948 GROUP BY scno, bookid ) t8 ON (t1.scno = t8.scno AND t1.bookid = t8.bookid) LEFT JOIN book_find t14 ON (t1.scno = t14.scno AND t1.bookid = t14.bookid) WHERE t1.bookid = 34948 ]; nested exception is org.postgresql.util.PSQLException: ERROR: column t1.scno does not exist Hint: Perhaps you meant to reference the column "t1.jpno". Position: 3027 at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:99) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:82) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:82) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:419) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:478) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:488) at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:498) at model.dao.BookDetailDAO.find(BookDetailDAO.java:918) at control.BookDetailController.initial(BookDetailController.java:76) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:849) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:760) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861) at javax.servlet.http.HttpServlet.service(HttpServlet.java:489) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) at javax.servlet.http.HttpServlet.service(HttpServlet.java:583) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:212) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:156) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:181) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:156) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:181) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:156) at common.filter.SecurityCheck.doFilter(SecurityCheck.java:1509) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:181) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:156) at common.filter.IpAddressFilter.doFilter(IpAddressFilter.java:925) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:181) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:156) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:168) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:483) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:679) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:617) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:934) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1698) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: org.postgresql.util.PSQLException: ERROR: column t1.scno does not exist Hint: Perhaps you meant to reference the column "t1.jpno". Position: 3027 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308) at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441) at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365) at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:307) at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:293) at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:270) at org.postgresql.jdbc.PgStatement.executeQuery(PgStatement.java:224) at org.apache.commons.dbcp2.DelegatingStatement.executeQuery(DelegatingStatement.java:212) at org.apache.commons.dbcp2.DelegatingStatement.executeQuery(DelegatingStatement.java:212) at org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:461) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:408) ... 54 more