SEC-1076: oracle object identity error in inserting ACL. #1327

Closed
spring-issuemaster opened this Issue Jan 5, 2009 · 3 comments

1 participant

@spring-issuemaster

chun ping wang (Migrated from SEC-1076) said:

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.

@spring-issuemaster

Luke Taylor said:

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.

@spring-issuemaster

chun ping wang said:

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

@spring-issuemaster

Luke Taylor said:

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.

@spring-issuemaster spring-issuemaster added this to the 3.0.0 M1 milestone Feb 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment