java.sql.SQLSyntaxErrorException: Table 'silvercube.user' doesn't exist

Stack Overflow | Nikhil Sahu | 10 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Spring boot trying to update different database then specified

    Stack Overflow | 10 months ago | Nikhil Sahu
    java.sql.SQLSyntaxErrorException: Table 'silvercube.user' doesn't exist
  2. 0

    Storing properties within database using Commons Configuration

    Stack Overflow | 7 months ago | russellhoff
    java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'null WHERE key ='SV2'' at line 1
  3. 0

    db_migration Table is not created

    Google Groups | 6 months ago | Saeed Mosavat
    java.lang.RuntimeException: java.sql.SQLSyntaxErrorException: Table 'test1.db_migration' doesn't exist
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.sql.SQLSyntaxErrorException

    Table 'silvercube.user' doesn't exist

    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException()
  2. com.mysql.cj
    PreparedStatement.executeQuery
    1. com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:686)[mysql-connector-java-6.0.3.jar:6.0.3]
    2. com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663)[mysql-connector-java-6.0.3.jar:6.0.3]
    3. com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653)[mysql-connector-java-6.0.3.jar:6.0.3]
    4. com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:115)[mysql-connector-java-6.0.3.jar:6.0.3]
    5. com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2041)[mysql-connector-java-6.0.3.jar:6.0.3]
    6. com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1827)[mysql-connector-java-6.0.3.jar:6.0.3]
    7. com.mysql.cj.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1930)[mysql-connector-java-6.0.3.jar:6.0.3]
    7 frames
  3. Hibernate
    QueryImpl.list
    1. org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:82)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    2. org.hibernate.loader.Loader.getResultSet(Loader.java:2066)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    3. org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1863)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    4. org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1839)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    5. org.hibernate.loader.Loader.doQuery(Loader.java:910)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    6. org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:355)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    7. org.hibernate.loader.Loader.doList(Loader.java:2554)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    8. org.hibernate.loader.Loader.doList(Loader.java:2540)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    9. org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2370)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    10. org.hibernate.loader.Loader.list(Loader.java:2365)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    11. org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:497)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    12. org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:387)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    13. org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:236)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    14. org.hibernate.internal.SessionImpl.list(SessionImpl.java:1300)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    15. org.hibernate.internal.QueryImpl.list(QueryImpl.java:103)[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
    15 frames
  4. org.hibernate.jpa
    CriteriaQueryTypeQueryAdapter.getSingleResult
    1. org.hibernate.jpa.internal.QueryImpl.list(QueryImpl.java:573)[hibernate-entitymanager-4.3.11.Final.jar:4.3.11.Final]
    2. org.hibernate.jpa.internal.QueryImpl.getSingleResult(QueryImpl.java:495)[hibernate-entitymanager-4.3.11.Final.jar:4.3.11.Final]
    3. org.hibernate.jpa.criteria.compile.CriteriaQueryTypeQueryAdapter.getSingleResult(CriteriaQueryTypeQueryAdapter.java:71)[hibernate-entitymanager-4.3.11.Final.jar:4.3.11.Final]
    3 frames
  5. Spring Data JPA
    AbstractJpaQuery.execute
    1. org.springframework.data.jpa.repository.query.JpaQueryExecution$SingleEntityExecution.doExecute(JpaQueryExecution.java:206)[spring-data-jpa-1.9.4.RELEASE.jar:na]
    2. org.springframework.data.jpa.repository.query.JpaQueryExecution.execute(JpaQueryExecution.java:78)[spring-data-jpa-1.9.4.RELEASE.jar:na]
    3. org.springframework.data.jpa.repository.query.AbstractJpaQuery.doExecute(AbstractJpaQuery.java:100)[spring-data-jpa-1.9.4.RELEASE.jar:na]
    4. org.springframework.data.jpa.repository.query.AbstractJpaQuery.execute(AbstractJpaQuery.java:91)[spring-data-jpa-1.9.4.RELEASE.jar:na]
    4 frames
  6. Spring Data Core
    RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke
    1. org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:462)[spring-data-commons-1.11.4.RELEASE.jar:na]
    2. org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:440)[spring-data-commons-1.11.4.RELEASE.jar:na]
    2 frames
  7. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    1 frame
  8. org.springframework.data
    DefaultMethodInvokingMethodInterceptor.invoke
    1. org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:61)[spring-data-commons-1.11.4.RELEASE.jar:na]
    1 frame
  9. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    1 frame
  10. Spring Tx
    TransactionInterceptor.invoke
    1. org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)[spring-tx-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    2. org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)[spring-tx-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    3. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)[spring-tx-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    3 frames
  11. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    1 frame
  12. Spring Tx
    PersistenceExceptionTranslationInterceptor.invoke
    1. org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:136)[spring-tx-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    1 frame
  13. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    1 frame
  14. Spring Data JPA
    CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke
    1. org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:131)[spring-data-jpa-1.9.4.RELEASE.jar:na]
    1 frame
  15. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    2. org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)[spring-aop-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    4. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)[spring-aop-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    4 frames
  16. com.sun.proxy
    $Proxy76.findByEmail
    1. com.sun.proxy.$Proxy76.findByEmail(Unknown Source)[na:na]
    1 frame
  17. in.silvercube.backend
    UserController.login
    1. in.silvercube.backend.user.service.UserService.getUserByEmail(UserService.java:62)[classes/:na]
    2. in.silvercube.backend.user.controller.UserController.login(UserController.java:84)[classes/:na]
    2 frames
  18. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_91]
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_91]
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_91]
    4. java.lang.reflect.Method.invoke(Method.java:498)[na:1.8.0_91]
    4 frames
  19. Spring
    InvocableHandlerMethod.invokeForRequest
    1. org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)[spring-web-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    2. org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)[spring-web-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    2 frames
  20. Spring MVC
    FrameworkServlet.doPost
    1. org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)[spring-webmvc-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    2. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:832)[spring-webmvc-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    3. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:743)[spring-webmvc-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    4. org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)[spring-webmvc-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    5. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:961)[spring-webmvc-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    6. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:895)[spring-webmvc-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    7. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:967)[spring-webmvc-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    8. org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:869)[spring-webmvc-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    8 frames
  21. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:648)[tomcat-embed-core-8.0.33.jar:8.0.33]
    1 frame
  22. Spring MVC
    FrameworkServlet.service
    1. org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843)[spring-webmvc-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    1 frame
  23. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:729)[tomcat-embed-core-8.0.33.jar:8.0.33]
    1 frame
  24. Glassfish Core
    ApplicationFilterChain.doFilter
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)[tomcat-embed-core-8.0.33.jar:8.0.33]
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)[tomcat-embed-core-8.0.33.jar:8.0.33]
    2 frames
  25. Tomcat WS
    WsFilter.doFilter
    1. org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)[tomcat-embed-websocket-8.0.33.jar:8.0.33]
    1 frame
  26. Glassfish Core
    ApplicationFilterChain.doFilter
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)[tomcat-embed-core-8.0.33.jar:8.0.33]
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)[tomcat-embed-core-8.0.33.jar:8.0.33]
    2 frames
  27. Spring
    OncePerRequestFilter.doFilter
    1. org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121)[spring-web-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    2. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)[spring-web-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    2 frames
  28. Glassfish Core
    CoyoteAdapter.service
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)[tomcat-embed-core-8.0.33.jar:8.0.33]
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)[tomcat-embed-core-8.0.33.jar:8.0.33]
    3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)[tomcat-embed-core-8.0.33.jar:8.0.33]
    4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)[tomcat-embed-core-8.0.33.jar:8.0.33]
    5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)[tomcat-embed-core-8.0.33.jar:8.0.33]
    6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)[tomcat-embed-core-8.0.33.jar:8.0.33]
    7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)[tomcat-embed-core-8.0.33.jar:8.0.33]
    8. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)[tomcat-embed-core-8.0.33.jar:8.0.33]
    9. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)[tomcat-embed-core-8.0.33.jar:8.0.33]
    9 frames
  29. Grizzly HTTP
    NioEndpoint$SocketProcessor.run
    1. org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)[tomcat-embed-core-8.0.33.jar:8.0.33]
    2. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)[tomcat-embed-core-8.0.33.jar:8.0.33]
    3. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1502)[tomcat-embed-core-8.0.33.jar:8.0.33]
    4. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1458)[tomcat-embed-core-8.0.33.jar:8.0.33]
    4 frames
  30. Java RT
    ThreadPoolExecutor$Worker.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_91]
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_91]
    2 frames
  31. Tomcat Util
    TaskThread$WrappingRunnable.run
    1. org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)[tomcat-embed-core-8.0.33.jar:8.0.33]
    1 frame
  32. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:745)[na:1.8.0_91]
    1 frame