java.sql.SQLSyntaxErrorException: Error preparing query: Table 'projectworlds.settings' doesn't exist

GitHub | rockmacaca | 2 months ago
  1. 0

    GitHub comment 3#254662574

    GitHub | 2 months ago | rockmacaca
    java.sql.SQLSyntaxErrorException: Error preparing query: Table 'projectworlds.settings' doesn't exist
  2. 0

    Table 'rancher.setting' doesn't exist

    GitHub | 7 months ago | jtwebman
    java.sql.SQLSyntaxErrorException: Table 'rancher.setting' doesn't exist
  3. 0

    Hi, The following example works well with mysql-connector-java-5.1.38-bin.jar but not with MariaDB-java-client-1.3.3.jar Here is the error: java.sql.SQLSyntaxErrorException: Error preparing query: Unknown column 'TMP.alerte_code' in 'field list' at org.mariadb.jdbc.internal.util.ExceptionMapper.get(ExceptionMapper.java:125) at org.mariadb.jdbc.internal.util.ExceptionMapper.throwException(ExceptionMapper.java:69) at org.mariadb.jdbc.MariaDbServerPreparedStatement.prepare(MariaDbServerPreparedStatement.java:117) at org.mariadb.jdbc.MariaDbServerPreparedStatement.<init>(MariaDbServerPreparedStatement.java:87) at org.mariadb.jdbc.MariaDbConnection.internalPrepareStatement(MariaDbConnection.java:375) at org.mariadb.jdbc.MariaDbConnection.prepareStatement(MariaDbConnection.java:222) at org.rfa.test.FirstExample.main(FirstExample.java:30) Caused by: org.mariadb.jdbc.internal.util.dao.QueryException: Error preparing query: Unknown column 'TMP.alerte_code' in 'field list' at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.prepare(AbstractQueryProtocol.java:152) at org.mariadb.jdbc.MariaDbServerPreparedStatement.prepare(MariaDbServerPreparedStatement.java:99) ... 4 more Thanks *example :* {code:java} import java.sql.*; public class FirstExample { static final String JDBC_DRIVER = "org.mariadb.jdbc.Driver"; static final String DB_URL = "jdbc:mariadb://localhost:3306/Test"; // static final String JDBC_DRIVER = "com.mysql.jdbc.Driver"; // static final String DB_URL = "jdbc:mysql://localhost:3306/WearPdm"; static final String USER = "test"; static final String PASS = "test"; static final String _SQL = "insert into alerte ( alerte_code, alerte_libelle_court, alerte_libelle_long )" + "select TMP.alerte_code, TMP.alerte_libelle_court, TMP.alerte_libelle_long " + "from ( " + "select ? alerte_code, ? alerte_libelle_court, ? alerte_libelle_long " + "from dual " + ") TMP"; public static void main(String[] args) { Connection conn = null; PreparedStatement stmt = null; try { Class.forName(JDBC_DRIVER); conn = DriverManager.getConnection(DB_URL,USER,PASS); stmt = conn.prepareStatement(_SQL); stmt.setString(1, "test"); stmt.setString(2, "test"); stmt.setString(3, "test"); stmt.executeUpdate(); stmt.close(); conn.close(); } catch(SQLException se) { se.printStackTrace(); } catch(Exception e) { e.printStackTrace(); } finally { try { if(stmt!=null) stmt.close(); } catch(SQLException se2){ } try { if(conn!=null) conn.close(); } catch(SQLException se) { se.printStackTrace(); } } } } {code}

    JIRA | 11 months ago | RĂ©gis Augui
    java.sql.SQLSyntaxErrorException: Error preparing query: Unknown column 'TMP.alerte_code' in 'field list'
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Dependency graph is throwing error with Mysql storage

    GitHub | 12 months ago | skstronghold
    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 ') AND a_key in ("sr","sa") AND endpoint_service_name is not null GROUP BY trace_' at line 1 Query is: SELECT DISTINCT trace_id, span_id, endpoint_service_name FROM zipkin_annotations WHERE trace_id IN () AND a_key in ("sr","sa") AND endpoint_service_name is not null GROUP BY trace_id, span_id
  6. 0

    GitHub comment 309#208652037

    GitHub | 8 months ago | StuAtGit
    java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '5 on duplicate key update counter = counter +' at line 1 Query is : insert into test_jdbi_bug (id, data, counters) values (1,'test',1)5 on duplicate key update counter = counter +

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.mariadb.jdbc.internal.util.dao.QueryException

      Error preparing query: Table 'projectworlds.settings' doesn't exist

      at org.mariadb.jdbc.internal.packet.ComStmtPrepare.read()
    2. org.mariadb.jdbc
      AbstractQueryProtocol.prepareAndExecute
      1. org.mariadb.jdbc.internal.packet.ComStmtPrepare.read(ComStmtPrepare.java:106)[STDERR]
      2. org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.prepareAndExecute(AbstractQueryProtocol.java:510)[STDERR]
      2 frames
    3. mariadb-java-client
      MariaDbServerPreparedStatement.executeQuery
      1. org.mariadb.jdbc.MariaDbServerPreparedStatement.executeInternal(MariaDbServerPreparedStatement.java:365)[STDERR]
      2. org.mariadb.jdbc.MariaDbServerPreparedStatement.execute(MariaDbServerPreparedStatement.java:323)[STDERR]
      3. org.mariadb.jdbc.MariaDbServerPreparedStatement.executeQuery(MariaDbServerPreparedStatement.java:304)[STDERR]
      3 frames
    4. HikariCP-java6
      HikariProxyPreparedStatement.executeQuery
      1. com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)[STDERR]
      2. com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)[STDERR]
      2 frames
    5. com.gmail.trentech
      EventManager.onLoadWorldEvent
      1. com.gmail.trentech.pji.sql.SQLSettings.getWorld(SQLSettings.java:31)[STDERR]
      2. com.gmail.trentech.pji.EventManager.onLoadWorldEvent(EventManager.java:110)[STDERR]
      2 frames
    6. org.spongepowered.common
      WorldManager.loadAllWorlds
      1. org.spongepowered.common.event.listener.LoadWorldEventListener_EventManager_onLoadWorldEvent55.handle(Unknown Source)[STDERR]
      2. org.spongepowered.common.event.RegisteredListener.handle(RegisteredListener.java:95)[STDERR]
      3. org.spongepowered.common.event.SpongeEventManager.post(SpongeEventManager.java:305)[STDERR]
      4. org.spongepowered.common.event.SpongeEventManager.post(SpongeEventManager.java:320)[STDERR]
      5. org.spongepowered.common.SpongeImpl.postEvent(SpongeImpl.java:140)[STDERR]
      6. org.spongepowered.common.world.WorldManager.createWorldFromProperties(WorldManager.java:813)[STDERR]
      7. org.spongepowered.common.world.WorldManager.loadAllWorlds(WorldManager.java:755)[STDERR]
      7 frames
    7. MC Server
      MinecraftServer.run
      1. net.minecraft.server.MinecraftServer.func_71247_a(SourceFile:320)[STDERR]
      2. net.minecraft.server.dedicated.DedicatedServer.func_71197_b(SourceFile:228)[STDERR]
      3. net.minecraft.server.MinecraftServer.run(SourceFile:428)[STDERR]
      3 frames
    8. Java RT
      Thread.run
      1. java.lang.Thread.run(Unknown Source)[STDERR]
      1 frame