libra146 opened a new issue, #34068:
URL: https://github.com/apache/shardingsphere/issues/34068

   ## Question
   
   **For English only**, other languages will not accept.
   
   Before asking a question, make sure you have:
   
   - Googled your question.
   - Searched open and closed [GitHub 
issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere 
Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more 
details. 
   If no response anymore and we cannot reproduce it on current information, we 
will **close it**.
   
   When I introduced the dependency and started the project, it worked fine, 
but when I stopped the project, there was a table not found error, is my 
configuration correct?
   I searched all the questions but I didn't find the answer
   The following is the code that will report an error. Please start it 
normally and stop it. The problem will occur. I don't know what happened.
   Please note that the correct database connection is not configured in the 
project, but I found that this does not affect the occurrence of this problem.
   
   Why didn't I configure the database connection? Because I configured it 
normally in another project and configured data encryption. The data encryption 
scheme works fine. But it still reports that the error table cannot be found 
when stopping the project. I created the following demo project and found that 
the same problem would occur, so I reported this problem. Who can help me?
   
   
   [demo.zip](https://github.com/user-attachments/files/18140796/demo.zip)
   
   
   ```bash
   
     .   ____          _            __ _ _
    /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
   ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
    \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
     '  |____| .__|_| |_|_| |_\__, | / / / /
    =========|_|==============|___/=/_/_/_/
    :: Spring Boot ::               (v2.7.18)
   
   2024-12-15 22:37:36.546  INFO 83222 --- [           main] 
com.java.encrypt.demo.DemoApplication    : Starting DemoApplication using Java 
1.8.0_382 on LLLibra.local with PID 83222 
(/Users/b/Downloads/work/code/demo/target/classes started by b in 
/Users/b/Downloads/work/code/demo)
   2024-12-15 22:37:36.547  INFO 83222 --- [           main] 
com.java.encrypt.demo.DemoApplication    : The following 1 profile is active: 
"uat"
   2024-12-15 22:37:37.038  WARN 83222 --- [           main] 
o.m.s.mapper.ClassPathMapperScanner      : No MyBatis mapper was found in 
'[com.java.encrypt.demo]' package. Please check your configuration.
   2024-12-15 22:37:37.226  INFO 83222 --- [           main] 
o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 
65004 (http)
   2024-12-15 22:37:37.231  INFO 83222 --- [           main] 
o.apache.catalina.core.StandardService   : Starting service [Tomcat]
   2024-12-15 22:37:37.231  INFO 83222 --- [           main] 
org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache 
Tomcat/9.0.83]
   2024-12-15 22:37:37.290  INFO 83222 --- [           main] 
o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded 
WebApplicationContext
   2024-12-15 22:37:37.291  INFO 83222 --- [           main] 
w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: 
initialization completed in 608 ms
   2024-12-15 22:37:37.423  INFO 83222 --- [           main] 
com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
   2024-12-15 22:37:37.531  INFO 83222 --- [           main] 
com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
    _ _   |_  _ _|_. ___ _ |    _ 
   | | |\/|_)(_| | |_\  |_)||_|_\ 
        /               |         
                           3.5.3.1 
   2024-12-15 22:37:38.696  INFO 83222 --- [           main] 
o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 65004 
(http) with context path ''
   2024-12-15 22:37:38.702  INFO 83222 --- [           main] 
com.java.encrypt.demo.DemoApplication    : Started DemoApplication in 2.389 
seconds (JVM running for 2.815)
   2024-12-15 22:37:44.923 ERROR 83222 --- [ionShutdownHook] 
o.a.s.m.r.s.jdbc.JDBCRepository          : Delete JDBC data by key: 
/nodes/compute_nodes/online/jdbc/626d5773-22b2-4cc4-987d-7a4b09ae383b failed
   
   org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "repository" not found (this 
database is empty); SQL statement:
   DELETE FROM `repository` WHERE `key` LIKE ? [42104-214]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:502) 
~[h2-2.1.214.jar:2.1.214]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:477) 
~[h2-2.1.214.jar:2.1.214]
        at org.h2.message.DbException.get(DbException.java:223) 
~[h2-2.1.214.jar:2.1.214]
        at org.h2.message.DbException.get(DbException.java:199) 
~[h2-2.1.214.jar:2.1.214]
        at 
org.h2.command.Parser.getTableOrViewNotFoundDbException(Parser.java:8385) 
~[h2-2.1.214.jar:2.1.214]
        at 
org.h2.command.Parser.getTableOrViewNotFoundDbException(Parser.java:8369) 
~[h2-2.1.214.jar:2.1.214]
        at org.h2.command.Parser.readTableOrView(Parser.java:8358) 
~[h2-2.1.214.jar:2.1.214]
        at org.h2.command.Parser.readTableOrView(Parser.java:8328) 
~[h2-2.1.214.jar:2.1.214]
        at org.h2.command.Parser.readSimpleTableFilter(Parser.java:1160) 
~[h2-2.1.214.jar:2.1.214]
        at org.h2.command.Parser.parseDelete(Parser.java:1174) 
~[h2-2.1.214.jar:2.1.214]
        at org.h2.command.Parser.parsePrepared(Parser.java:774) 
~[h2-2.1.214.jar:2.1.214]
        at org.h2.command.Parser.parse(Parser.java:689) 
~[h2-2.1.214.jar:2.1.214]
        at org.h2.command.Parser.parse(Parser.java:661) 
~[h2-2.1.214.jar:2.1.214]
        at org.h2.command.Parser.prepareCommand(Parser.java:569) 
~[h2-2.1.214.jar:2.1.214]
        at org.h2.engine.SessionLocal.prepareLocal(SessionLocal.java:631) 
~[h2-2.1.214.jar:2.1.214]
        at org.h2.engine.SessionLocal.prepareCommand(SessionLocal.java:554) 
~[h2-2.1.214.jar:2.1.214]
        at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1116) 
~[h2-2.1.214.jar:2.1.214]
        at 
org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:92) 
~[h2-2.1.214.jar:2.1.214]
        at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:288) 
~[h2-2.1.214.jar:2.1.214]
        at 
com.zaxxer.hikari.pool.ProxyConnection.prepareStatement(ProxyConnection.java:337)
 ~[HikariCP-4.0.3.jar:na]
        at 
com.zaxxer.hikari.pool.HikariProxyConnection.prepareStatement(HikariProxyConnection.java)
 ~[HikariCP-4.0.3.jar:na]
        at 
org.apache.shardingsphere.mode.repository.standalone.jdbc.JDBCRepository.delete(JDBCRepository.java:192)
 ~[shardingsphere-standalone-mode-repository-jdbc-5.5.1.jar:5.5.1]
        at 
org.apache.shardingsphere.mode.persist.service.ComputeNodePersistService.offline(ComputeNodePersistService.java:191)
 [shardingsphere-mode-core-5.5.1.jar:5.5.1]
        at 
org.apache.shardingsphere.mode.manager.ContextManager.close(ContextManager.java:212)
 [shardingsphere-mode-core-5.5.1.jar:5.5.1]
        at 
org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource.close(ShardingSphereDataSource.java:107)
 [shardingsphere-jdbc-5.5.1.jar:5.5.1]
        at 
org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:242)
 [spring-beans-5.3.31.jar:5.3.31]
        at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:587)
 [spring-beans-5.3.31.jar:5.3.31]
        at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:559)
 [spring-beans-5.3.31.jar:5.3.31]
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:1163)
 [spring-beans-5.3.31.jar:5.3.31]
        at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:520)
 [spring-beans-5.3.31.jar:5.3.31]
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons(DefaultListableBeanFactory.java:1156)
 [spring-beans-5.3.31.jar:5.3.31]
        at 
org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1120)
 [spring-context-5.3.31.jar:5.3.31]
        at 
org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1086)
 [spring-context-5.3.31.jar:5.3.31]
        at 
org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.doClose(ServletWebServerApplicationContext.java:174)
 [spring-boot-2.7.18.jar:2.7.18]
        at 
org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1032)
 [spring-context-5.3.31.jar:5.3.31]
        at 
org.springframework.boot.SpringApplicationShutdownHook.closeAndWait(SpringApplicationShutdownHook.java:145)
 [spring-boot-2.7.18.jar:2.7.18]
        at java.lang.Iterable.forEach(Iterable.java:75) ~[na:1.8.0_382]
        at 
org.springframework.boot.SpringApplicationShutdownHook.run(SpringApplicationShutdownHook.java:114)
 [spring-boot-2.7.18.jar:2.7.18]
        at java.lang.Thread.run(Thread.java:750) ~[na:1.8.0_382]
   
   2024-12-15 22:37:44.923  INFO 83222 --- [ionShutdownHook] 
com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown initiated...
   2024-12-15 22:37:44.925  INFO 83222 --- [ionShutdownHook] 
com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown completed.
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: 
notifications-unsubscr...@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to