org.apache.shiro.crypto.CryptoException: Unable to correctly extract the Initialization Vector or ciphertext.

Sonatype JIRA | Alex Kiernan | 6 years ago
  1. 0

    Roughly every 5 minutes we're getting this error logged: 2011-03-08 13:29:16 WARN [tomcat-http--45] - o.a.s.m.DefaultSecu~ - Delegate RememberMeManager instance of type [org.apache.shiro.web.mgt.CookieRememberMeManager] threw an exception during getRememberedPrincipals(). org.apache.shiro.crypto.CryptoException: Unable to correctly extract the Initialization Vector or ciphertext. at org.apache.shiro.crypto.JcaCipherService.decrypt(JcaCipherService.java:381) at org.apache.shiro.mgt.AbstractRememberMeManager.decrypt(AbstractRememberMeManager.java:491) at org.apache.shiro.mgt.AbstractRememberMeManager.convertBytesToPrincipals(AbstractRememberMeManager.java:431) at org.apache.shiro.mgt.AbstractRememberMeManager.getRememberedPrincipals(AbstractRememberMeManager.java:398) at org.apache.shiro.mgt.DefaultSecurityManager.getRememberedIdentity(DefaultSecurityManager.java:567) at org.apache.shiro.mgt.DefaultSecurityManager.resolvePrincipals(DefaultSecurityManager.java:434) at org.apache.shiro.mgt.DefaultSecurityManager.createSubject(DefaultSecurityManager.java:335) at org.apache.shiro.subject.Subject$Builder.buildSubject(Subject.java:819) at org.apache.shiro.web.subject.WebSubject$Builder.buildWebSubject(WebSubject.java:149) at org.apache.shiro.web.servlet.AbstractShiroFilter.createSubject(AbstractShiroFilter.java:202) at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:269) at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:83) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:383) at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:388) at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:357) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1569) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.ArrayIndexOutOfBoundsException at java.lang.System.arraycopy(Native Method) at org.apache.shiro.crypto.JcaCipherService.decrypt(JcaCipherService.java:373) ... 26 more It started when we moved Nexus from one host to another and upgraded from 1.8 to 1.9.0.1 As far as we can tell it's not stopping anything from working

    Sonatype JIRA | 6 years ago | Alex Kiernan
    org.apache.shiro.crypto.CryptoException: Unable to correctly extract the Initialization Vector or ciphertext.
  2. 0

    Roughly every 5 minutes we're getting this error logged: 2011-03-08 13:29:16 WARN [tomcat-http--45] - o.a.s.m.DefaultSecu~ - Delegate RememberMeManager instance of type [org.apache.shiro.web.mgt.CookieRememberMeManager] threw an exception during getRememberedPrincipals(). org.apache.shiro.crypto.CryptoException: Unable to correctly extract the Initialization Vector or ciphertext. at org.apache.shiro.crypto.JcaCipherService.decrypt(JcaCipherService.java:381) at org.apache.shiro.mgt.AbstractRememberMeManager.decrypt(AbstractRememberMeManager.java:491) at org.apache.shiro.mgt.AbstractRememberMeManager.convertBytesToPrincipals(AbstractRememberMeManager.java:431) at org.apache.shiro.mgt.AbstractRememberMeManager.getRememberedPrincipals(AbstractRememberMeManager.java:398) at org.apache.shiro.mgt.DefaultSecurityManager.getRememberedIdentity(DefaultSecurityManager.java:567) at org.apache.shiro.mgt.DefaultSecurityManager.resolvePrincipals(DefaultSecurityManager.java:434) at org.apache.shiro.mgt.DefaultSecurityManager.createSubject(DefaultSecurityManager.java:335) at org.apache.shiro.subject.Subject$Builder.buildSubject(Subject.java:819) at org.apache.shiro.web.subject.WebSubject$Builder.buildWebSubject(WebSubject.java:149) at org.apache.shiro.web.servlet.AbstractShiroFilter.createSubject(AbstractShiroFilter.java:202) at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:269) at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:83) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:383) at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:388) at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:357) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1569) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.ArrayIndexOutOfBoundsException at java.lang.System.arraycopy(Native Method) at org.apache.shiro.crypto.JcaCipherService.decrypt(JcaCipherService.java:373) ... 26 more It started when we moved Nexus from one host to another and upgraded from 1.8 to 1.9.0.1 As far as we can tell it's not stopping anything from working

    Sonatype JIRA | 6 years ago | Alex Kiernan
    org.apache.shiro.crypto.CryptoException: Unable to correctly extract the Initialization Vector or ciphertext.
  3. 0

    I obtain following exception while entering the secure page: [java] 101637 [http-8080-1] WARN org.apache.shiro.mgt.DefaultSecurityManager - Delegate RememberMeManager instance of type [org.apache.shiro.web.mgt.CookieRememberMeManager] threw an exception during getRememberedPrincipals(). [java] org.apache.shiro.crypto.CryptoException: Unable to correctly extract the Initialization Vector or ciphertext. [java] at org.apache.shiro.crypto.JcaCipherService.decrypt(JcaCipherService.java:381) [java] at org.apache.shiro.mgt.AbstractRememberMeManager.decrypt(AbstractRememberMeManager.java:491) [java] at org.apache.shiro.mgt.AbstractRememberMeManager.convertBytesToPrincipals(AbstractRememberMeManager.java:431) [java] at org.apache.shiro.mgt.AbstractRememberMeManager.getRememberedPrincipals(AbstractRememberMeManager.java:398) [java] at org.apache.shiro.mgt.DefaultSecurityManager.getRememberedIdentity(DefaultSecurityManager.java:567) [java] at org.apache.shiro.mgt.DefaultSecurityManager.resolvePrincipals(DefaultSecurityManager.java:434) [java] at org.apache.shiro.mgt.DefaultSecurityManager.createSubject(DefaultSecurityManager.java:335) [java] at org.apache.shiro.subject.Subject$Builder.buildSubject(Subject.java:819) [java] at org.apache.shiro.web.subject.WebSubject$Builder.buildWebSubject(WebSubject.java:149) [java] at org.apache.shiro.web.servlet.AbstractShiroFilter.createSubject(AbstractShiroFilter.java:202) [java] at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:269) [java] at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:83) [java] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) [java] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [java] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) [java] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [java] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [java] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [java] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [java] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) [java] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) [java] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) [java] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) [java] at java.lang.Thread.run(Thread.java:619) [java] Caused by: java.lang.ArrayIndexOutOfBoundsException [java] at java.lang.System.arraycopy(Native Method) [java] at org.apache.shiro.crypto.JcaCipherService.decrypt(JcaCipherService.java:373) [java] ... 23 more Of course I have set the "securityManager.rememberMeManager.cipherKey" in shiro.ini but it did not help. kind regards.

    Apache's JIRA Issue Tracker | 6 years ago | RynekMedyczny.pl
    org.apache.shiro.crypto.CryptoException: Unable to correctly extract the Initialization Vector or ciphertext.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [Shiro-dev] [jira] Created: (SHIRO-183) Unable to correctly extract the Initialization Vector or ciphertext - Grokbase

    grokbase.com | 4 months ago
    org.apache.shiro.crypto.CryptoException: Unable to correctly extract the Initialization Vector or ciphertext.
  6. 0

    problem when cap file too large

    GitHub | 2 years ago | cocobear
    java.lang.ArrayIndexOutOfBoundsException

  1. Aria Pahlavan 49 times, last 1 week ago
  2. iridic 2 times, last 3 weeks ago
  3. danleyb2Interintel 1 times, last 5 months ago
  4. Stefan Braune 1 times, last 9 months ago
9 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.lang.ArrayIndexOutOfBoundsException

    No message provided

    at java.lang.System.arraycopy()
  2. Java RT
    System.arraycopy
    1. java.lang.System.arraycopy(Native Method)
    1 frame
  3. Shiro
    OncePerRequestFilter.doFilter
    1. org.apache.shiro.crypto.JcaCipherService.decrypt(JcaCipherService.java:373)
    2. org.apache.shiro.mgt.AbstractRememberMeManager.decrypt(AbstractRememberMeManager.java:491)
    3. org.apache.shiro.mgt.AbstractRememberMeManager.convertBytesToPrincipals(AbstractRememberMeManager.java:431)
    4. org.apache.shiro.mgt.AbstractRememberMeManager.getRememberedPrincipals(AbstractRememberMeManager.java:398)
    5. org.apache.shiro.mgt.DefaultSecurityManager.getRememberedIdentity(DefaultSecurityManager.java:567)
    6. org.apache.shiro.mgt.DefaultSecurityManager.resolvePrincipals(DefaultSecurityManager.java:434)
    7. org.apache.shiro.mgt.DefaultSecurityManager.createSubject(DefaultSecurityManager.java:335)
    8. org.apache.shiro.subject.Subject$Builder.buildSubject(Subject.java:819)
    9. org.apache.shiro.web.subject.WebSubject$Builder.buildWebSubject(WebSubject.java:149)
    10. org.apache.shiro.web.servlet.AbstractShiroFilter.createSubject(AbstractShiroFilter.java:202)
    11. org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:269)
    12. org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:83)
    12 frames
  4. Glassfish Core
    CoyoteAdapter.service
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
    4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
    5. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
    6. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
    7. org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
    8. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    9. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:383)
    9 frames
  5. Grizzly HTTP
    NioEndpoint$SocketProcessor.run
    1. org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:388)
    2. org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:357)
    3. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1569)
    3 frames
  6. Java RT
    Thread.run
    1. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    3. java.lang.Thread.run(Thread.java:662)
    3 frames