Torque
  1. Torque
  2. TORQUE-40

jdbc task fails on sybase database (schema is set)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 3.2
    • Fix Version/s: 3.2
    • Component/s: Generator
    • Labels:
      None
    • Environment:
      Sybase ASE 12.5
      jConnect for JDBC 2.0 v5.5 Build 25137 or v6.05 Build 25828
      Java Tds Server Classes v5.5 Build 25138 or v6.0 Build 25828

      Description

      The Sybase JDBC driver doesn't expect a parameter for databaseSchema in

      DatabaseMetaData.getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types)
      DatabaseMetaData.getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern)
      DatabaseMetaData.getPrimaryKeys(String catalog, String schema, String table)
      DatabaseMetaData.getImportedKeys(String catalog, String schema, String table)

      If it is set to something else than null the methods return nothing. So please add the following fix (pseudo code):

      public void execute() throws BuildException
      {
      ....
      if (config("torque.database.type").equals("sybase"))

      { dbSchema = null; }

      ...
      }

        Activity

        Hide
        Thoralf Rickert added a comment -

        You have to set

        torque.database.schema = dbo

        in the properties to avoid this problem.
        Thanks to Andras Balogh.

        I think, this bug is fixed.

        Show
        Thoralf Rickert added a comment - You have to set torque.database.schema = dbo in the properties to avoid this problem. Thanks to Andras Balogh. I think, this bug is fixed.
        Hide
        Thoralf Rickert added a comment -

        See my previous comment. torque.database.schema must be set to "dbo".

        Show
        Thoralf Rickert added a comment - See my previous comment. torque.database.schema must be set to "dbo".
        Hide
        Thomas Fox added a comment -

        To be more unspecific, the schema name has to be the same as the name of the database user.

        Show
        Thomas Fox added a comment - To be more unspecific, the schema name has to be the same as the name of the database user.

          People

          • Assignee:
            Thomas Fox
            Reporter:
            Thoralf Rickert
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development