Spring Security
  1. Spring Security
  2. SEC-1076

oracle object identity error in inserting ACL.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 2.0.4
    • Fix Version/s: 3.0.0 M1
    • Component/s: ACLs
    • Labels:
      None

      Description

      org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [call identity()]; nested exception is java.sql.SQLException: ORA-06576: not a valid function or procedure name

      ...
      org.springframework.security.acls.jdbc.JdbcMutableAclService.createOrRetrieveSidPrimaryKey(JdbcMutableAclService.java:225)
      org.springframework.security.acls.jdbc.JdbcMutableAclService.createObjectIdentity(JdbcMutableAclService.java:155)
      org.springframework.security.acls.jdbc.JdbcMutableAclService.createAcl(JdbcMutableAclService.java:108)

      I think this error is common. It be good if it could be fix for 2.0.5.

        Activity

        Hide
        Luke Taylor added a comment -

        This looks like a failure to use the correct SQL for Oracle. Both the identity queries can be injected and should be customized as required for different datatases. Otherwise please explain more clearly what you think the bug is.

        Show
        Luke Taylor added a comment - This looks like a failure to use the correct SQL for Oracle. Both the identity queries can be injected and should be customized as required for different datatases. Otherwise please explain more clearly what you think the bug is.
        Hide
        chun ping wang added a comment -

        this is not an issue. We could set the identity query.

        Show
        chun ping wang added a comment - this is not an issue. We could set the identity query.
        Hide
        Luke Taylor added a comment -

        Then please explain what you think the problem is. The only place the phrase "call identity()" exisis is in the identity queries, so if you have set them to something else then it isn't possible to get the exception you've shown from this line:

        225 sidId = new Long(jdbcTemplate.queryForLong(sidIdentityQuery));

        The most likely explanation is that you haven't set "sidIdentityQuery" appropriately.

        Show
        Luke Taylor added a comment - Then please explain what you think the problem is. The only place the phrase "call identity()" exisis is in the identity queries, so if you have set them to something else then it isn't possible to get the exception you've shown from this line: 225 sidId = new Long(jdbcTemplate.queryForLong(sidIdentityQuery)); The most likely explanation is that you haven't set "sidIdentityQuery" appropriately.

          People

          • Assignee:
            Luke Taylor
            Reporter:
            chun ping wang
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: