java.sql.SQLException: Line 1: Incorrect syntax near '|'.

Hibernate JIRA | Walter Mourão | 1 decade ago
  1. 0

    The query language substitution does not recognize the token || (pipe pipe - string concatenation in Oracle). The log shows: ... 19/10/2004 10:20:23 net.sf.hibernate.cfg.SettingsFactory buildSettings INFO: Query language substitutions: {||=+} 19/10/2004 10:20:23 net.sf.hibernate.cfg.SettingsFactory buildSettings ... but the query goes to the database with the || example: HQL query: from previne.dominio.AeronaveImpl a where a.identificacao like 'W'||'%' generated SQL query: Hibernate: select aeronaveim0_.id as id, aeronaveim0_.ANO_REGISTRO as ANO_REGI3_, aeronaveim0_.DATA_HORA_GRAVACAO as DATA_HOR4_, aeronaveim0_.CHAVE_EXTERNA as CHAVE_EX5_, aeronaveim0_.SITUACAO as SITUACAO, aeronaveim0_.DATA_HORA_VALIDACAO as DATA_HOR7_, aeronaveim0_.IDENTIFICACAO as IDENTIFI8_, aeronaveim0_.NUMERO_VOO as NUMERO_VOO, aeronaveim0_.USUARIO_FK as USUARIO_FK, aeronaveim0_.VEICULO_CARGA_FK as VEICULO11_, aeronaveim0_.FONTE_DADOS_FK as FONTE_D12_ from AERONAVE aeronaveim0_ where aeronaveim0_.class='AeronaveImpl' and ((aeronaveim0_.IDENTIFICACAO like 'W'||'%' )) log error: WARNING: SQL Error: 170, SQLState: 37000 19/10/2004 11:04:38 net.sf.hibernate.util.JDBCExceptionReporter logExceptions SEVERE: Line 1: Incorrect syntax near '|'. 19/10/2004 11:04:38 net.sf.hibernate.util.JDBCExceptionReporter logExceptions WARNING: SQL Error: 170, SQLState: 37000 19/10/2004 11:04:38 net.sf.hibernate.util.JDBCExceptionReporter logExceptions SEVERE: Line 1: Incorrect syntax near '|'. 19/10/2004 11:04:38 net.sf.hibernate.JDBCException <init> SEVERE: Could not execute query java.sql.SQLException: Line 1: Incorrect syntax near '|'. at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:367) at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2217) at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:1696)

    Hibernate JIRA | 1 decade ago | Walter Mourão
    java.sql.SQLException: Line 1: Incorrect syntax near '|'.
  2. 0

    The query language substitution does not recognize the token || (pipe pipe - string concatenation in Oracle). The log shows: ... 19/10/2004 10:20:23 net.sf.hibernate.cfg.SettingsFactory buildSettings INFO: Query language substitutions: {||=+} 19/10/2004 10:20:23 net.sf.hibernate.cfg.SettingsFactory buildSettings ... but the query goes to the database with the || example: HQL query: from previne.dominio.AeronaveImpl a where a.identificacao like 'W'||'%' generated SQL query: Hibernate: select aeronaveim0_.id as id, aeronaveim0_.ANO_REGISTRO as ANO_REGI3_, aeronaveim0_.DATA_HORA_GRAVACAO as DATA_HOR4_, aeronaveim0_.CHAVE_EXTERNA as CHAVE_EX5_, aeronaveim0_.SITUACAO as SITUACAO, aeronaveim0_.DATA_HORA_VALIDACAO as DATA_HOR7_, aeronaveim0_.IDENTIFICACAO as IDENTIFI8_, aeronaveim0_.NUMERO_VOO as NUMERO_VOO, aeronaveim0_.USUARIO_FK as USUARIO_FK, aeronaveim0_.VEICULO_CARGA_FK as VEICULO11_, aeronaveim0_.FONTE_DADOS_FK as FONTE_D12_ from AERONAVE aeronaveim0_ where aeronaveim0_.class='AeronaveImpl' and ((aeronaveim0_.IDENTIFICACAO like 'W'||'%' )) log error: WARNING: SQL Error: 170, SQLState: 37000 19/10/2004 11:04:38 net.sf.hibernate.util.JDBCExceptionReporter logExceptions SEVERE: Line 1: Incorrect syntax near '|'. 19/10/2004 11:04:38 net.sf.hibernate.util.JDBCExceptionReporter logExceptions WARNING: SQL Error: 170, SQLState: 37000 19/10/2004 11:04:38 net.sf.hibernate.util.JDBCExceptionReporter logExceptions SEVERE: Line 1: Incorrect syntax near '|'. 19/10/2004 11:04:38 net.sf.hibernate.JDBCException <init> SEVERE: Could not execute query java.sql.SQLException: Line 1: Incorrect syntax near '|'. at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:367) at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2217) at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:1696)

    Hibernate JIRA | 1 decade ago | Walter Mourão
    java.sql.SQLException: Line 1: Incorrect syntax near '|'.
  3. 0

    Sqoop export from hdfs to SQL Server 2005 using jdts driver fails

    Stack Overflow | 3 years ago | hba
    java.sql.SQLException: Incorrect syntax near ','.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    How to implement in SpagoBI Server a BIRT report parameter that allows multiple values [SOLVED]

    spagoworld.org | 1 year ago
    java.sql.SQLException: Line 1: Incorrect syntax near ';'.
  6. 0

    Exception经验记录

    fx114.net | 1 year ago
    java.sql.SQLException: 不能将显式值插入时间戳列。请对列列表使用 INSERT 来排除时间戳列, 或将 DEFAULT 插入时间戳列。

    1 unregistered visitors
    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. java.sql.SQLException

      Line 1: Incorrect syntax near '|'.

      at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic()
    2. jTDS
      TdsCore.nextToken
      1. net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:367)
      2. net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2217)
      3. net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:1696)
      3 frames