백수님
975
2020-06-02 01:49:11
1
91

.CannotGetJdbcConnectionException: Could not get JDBC Connection


Error querying database.  Cause: org.springframework.jdbc.CannotGetJdbcConnectionException:
 Could not get JDBC Connection; nested exception is java.sql.SQLException: 
com.mchange.v2.c3p0.ComboPooledDataSource 
[ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000,
 autoCommitOnClose -> false, automaticTestTable -> null, 
breakAfterAcquireFailure -> false, checkoutTimeout -> 0, 
connectionCustomizerClassName -> null, 
connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester,
 dataSourceName -> 1hge0yvaava2107ubwrip|377868cb,
 debugUnreturnedConnectionStackTraces -> false, description -> null, 
driverClass -> com.mysql.jdbc.Driver, factoryClassLocation -> null, 
forceIgnoreUnresolvedTransactions -> false, 
identityToken -> 1hge0yvaava2107ubwrip|377868cb, idleConnectionTestPeriod -> 60,
 initialPoolSize -> 3, jdbcUrl -> jdbc:mysql://localhost/lessonking?characterEncoding=utf8,
 maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, 
maxIdleTimeExcessConnections -> 0, maxPoolSize -> 15, maxStatements -> 0, 
maxStatementsPerConnection -> 0, minPoolSize -> 3, numHelperThreads -> 3, 
preferredTestQuery -> SELECT 1, properties -> {user=******, password=******}, 
propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 0, 
testConnectionOnCheckin -> true, testConnectionOnCheckout -> false, 
unreturnedConnectionTimeout -> 0, userOverrides -> {}, usesTraditionalReflectiveProxies -> false ]
 has been closed() -- you can no longer use it.

에러 내용을 보니 jdbc 커넥션을 얻지 못했다는 건데
홈페이지 정상적으로 다 작동하고 새롭게 추가한 dao 명령어에 대해서만 저 오류가 작동합니다. 

왜 이런 오류가 나타나나요??

제 상식에서는 에러 내용이 좀 이해가 안가네요.

다 작동 잘되는데 특정 dao의 하나의 명령에 대해서면 저런 오류가 뜨는게

0
0
  • 답변 1

  • 백수님
    975
    2020-06-02 10:41:30

    자문자답:


    ctx.close();를 실행하고 쿼리를 실행시켰네요.


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