java.lang.IllegalArgumentException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • JdbcAclService : public Acl readAclById(ObjectIdentity object, List<Sid> sids) throws NotFoundException { Map<ObjectIdentity, Acl> map = readAclsById(Arrays.asList(object), sids); Assert.isTrue(map.containsKey(object), "There should have been an Acl entry for ObjectIdentity " + object); return (Acl) map.get(object); } IllegalArgumentException exception is thrown when acl not found. This exception is not catched anywhere and thus displayed to end user. AclPermissionEvaluator expects org.springframework.security.acls.model.NotFoundException when calling JdbcAclService.readAclById (to return permission denied) but instead exception is throwing. Suggestion : change Assert.isTrue(map.containsKey(object), "There should have been an Acl entry for ObjectIdentity " + object); to if (!map.containsKey(object)) { throw new NotFoundException("There should have been an Acl entry for ObjectIdentity "); } Stack trace: java.lang.IllegalArgumentException: There should have been an Acl entry for ObjectIdentity org.springframework.security.acls.domain.ObjectIdentityImpl[Type: com.SomeType; Identifier: 1] at org.springframework.util.Assert.isTrue(Assert.java:65) at org.springframework.security.acls.jdbc.JdbcAclService.readAclById(JdbcAclService.java:95) at org.springframework.security.acls.AclPermissionEvaluator.checkPermission(AclPermissionEvaluator.java:81) at org.springframework.security.acls.AclPermissionEvaluator.hasPermission(AclPermissionEvaluator.java:65) at org.springframework.security.access.expression.SecurityExpressionRoot.hasPermission(SecurityExpressionRoot.java:132) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.expression.spel.support.ReflectiveMethodExecutor.execute(ReflectiveMethodExecutor.java:69) at org.springframework.expression.spel.ast.MethodReference.getValueInternal(MethodReference.java:110) at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:102) at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:97)
    via by Roman Pokhodzhai,
  • JdbcAclService : public Acl readAclById(ObjectIdentity object, List<Sid> sids) throws NotFoundException { Map<ObjectIdentity, Acl> map = readAclsById(Arrays.asList(object), sids); Assert.isTrue(map.containsKey(object), "There should have been an Acl entry for ObjectIdentity " + object); return (Acl) map.get(object); } IllegalArgumentException exception is thrown when acl not found. This exception is not catched anywhere and thus displayed to end user. AclPermissionEvaluator expects org.springframework.security.acls.model.NotFoundException when calling JdbcAclService.readAclById (to return permission denied) but instead exception is throwing. Suggestion : change Assert.isTrue(map.containsKey(object), "There should have been an Acl entry for ObjectIdentity " + object); to if (!map.containsKey(object)) { throw new NotFoundException("There should have been an Acl entry for ObjectIdentity "); } Stack trace: java.lang.IllegalArgumentException: There should have been an Acl entry for ObjectIdentity org.springframework.security.acls.domain.ObjectIdentityImpl[Type: com.SomeType; Identifier: 1] at org.springframework.util.Assert.isTrue(Assert.java:65) at org.springframework.security.acls.jdbc.JdbcAclService.readAclById(JdbcAclService.java:95) at org.springframework.security.acls.AclPermissionEvaluator.checkPermission(AclPermissionEvaluator.java:81) at org.springframework.security.acls.AclPermissionEvaluator.hasPermission(AclPermissionEvaluator.java:65) at org.springframework.security.access.expression.SecurityExpressionRoot.hasPermission(SecurityExpressionRoot.java:132) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.expression.spel.support.ReflectiveMethodExecutor.execute(ReflectiveMethodExecutor.java:69) at org.springframework.expression.spel.ast.MethodReference.getValueInternal(MethodReference.java:110) at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:102) at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:97)
    via by Roman Pokhodzhai,
  • Issue of pagination in Spring Data JPA
    via Stack Overflow by Tom
    ,
  • spring open jpa db2 error
    via Stack Overflow by Fryder
    ,
  • SubProtocolWebSocketHandler - No handlers
    via by Unknown author,
    • java.lang.IllegalArgumentException: There should have been an Acl entry for ObjectIdentity org.springframework.security.acls.domain.ObjectIdentityImpl[Type: com.SomeType; Identifier: 1] at org.springframework.util.Assert.isTrue(Assert.java:65) at org.springframework.security.acls.jdbc.JdbcAclService.readAclById(JdbcAclService.java:95) at org.springframework.security.acls.AclPermissionEvaluator.checkPermission(AclPermissionEvaluator.java:81) at org.springframework.security.acls.AclPermissionEvaluator.hasPermission(AclPermissionEvaluator.java:65) at org.springframework.security.access.expression.SecurityExpressionRoot.hasPermission(SecurityExpressionRoot.java:132) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.expression.spel.support.ReflectiveMethodExecutor.execute(ReflectiveMethodExecutor.java:69) at org.springframework.expression.spel.ast.MethodReference.getValueInternal(MethodReference.java:110) at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:102) at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:97)

    Users with the same issue

    j.kienzle
    1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    48 more bugmates