javax.faces.FacesException: javax.crypto.BadPaddingException: Given final block not properly padded

Apache's JIRA Issue Tracker | Mark Struberg | 7 years ago
  1. 0

    [MYFACES-2478] BadPaddingException: Given final block not properly padded - ASF JIRA

    apache.org | 1 year ago
    javax.faces.FacesException: javax.crypto.BadPaddingException: Given final block not properly padded
  2. 0

    Hi running Myfaces Revision 897280 sometimes swallows the following exception please note that I'm running with facelets-1.1.15B1 on jetty-6.1.22 and have server side state saving turned on. javax.faces.FacesException: javax.crypto.BadPaddingException: Given final block not properly padded at org.apache.myfaces.context.ExceptionHandlerImpl.wrap(ExceptionHandlerImpl.java:241) at org.apache.myfaces.context.ExceptionHandlerImpl.handle(ExceptionHandlerImpl.java:156) at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:157) at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:88) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:189) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166) at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178) at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290) at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388) at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) Caused by: javax.crypto.BadPaddingException: Given final block not properly padded at com.sun.crypto.provider.SunJCE_f.b(DashoA13*..) at com.sun.crypto.provider.SunJCE_f.b(DashoA13*..) at com.sun.crypto.provider.DESCipher.engineDoFinal(DashoA13*..) at javax.crypto.Cipher.doFinal(DashoA13*..) at org.apache.myfaces.shared_impl.util.StateUtils.symmetric(StateUtils.java:471) at org.apache.myfaces.shared_impl.util.StateUtils.symmetric(StateUtils.java:513) at org.apache.myfaces.shared_impl.util.StateUtils.decrypt(StateUtils.java:313) at org.apache.myfaces.shared_impl.util.StateUtils.reconstruct(StateUtils.java:262) at org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getSavedState(HtmlResponseStateManager.java:213) at org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getState(HtmlResponseStateManager.java:160) at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreView(JspStateManagerImpl.java:406) at javax.faces.application.StateManagerWrapper.restoreView(StateManagerWrapper.java:86) at org.apache.myfaces.shared_impl.view.ViewDeclarationLanguageBase.restoreView(ViewDeclarationLanguageBase.java:106) at org.apache.myfaces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:234) at javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:83) at com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:316) at org.ajax4jsf.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:107) at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:109) at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:138)

    Apache's JIRA Issue Tracker | 7 years ago | Mark Struberg
    javax.faces.FacesException: javax.crypto.BadPaddingException: Given final block not properly padded
  3. 0

    Hi running Myfaces Revision 897280 sometimes swallows the following exception please note that I'm running with facelets-1.1.15B1 on jetty-6.1.22 and have server side state saving turned on. javax.faces.FacesException: javax.crypto.BadPaddingException: Given final block not properly padded at org.apache.myfaces.context.ExceptionHandlerImpl.wrap(ExceptionHandlerImpl.java:241) at org.apache.myfaces.context.ExceptionHandlerImpl.handle(ExceptionHandlerImpl.java:156) at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:157) at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:88) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:189) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166) at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178) at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290) at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388) at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) Caused by: javax.crypto.BadPaddingException: Given final block not properly padded at com.sun.crypto.provider.SunJCE_f.b(DashoA13*..) at com.sun.crypto.provider.SunJCE_f.b(DashoA13*..) at com.sun.crypto.provider.DESCipher.engineDoFinal(DashoA13*..) at javax.crypto.Cipher.doFinal(DashoA13*..) at org.apache.myfaces.shared_impl.util.StateUtils.symmetric(StateUtils.java:471) at org.apache.myfaces.shared_impl.util.StateUtils.symmetric(StateUtils.java:513) at org.apache.myfaces.shared_impl.util.StateUtils.decrypt(StateUtils.java:313) at org.apache.myfaces.shared_impl.util.StateUtils.reconstruct(StateUtils.java:262) at org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getSavedState(HtmlResponseStateManager.java:213) at org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getState(HtmlResponseStateManager.java:160) at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreView(JspStateManagerImpl.java:406) at javax.faces.application.StateManagerWrapper.restoreView(StateManagerWrapper.java:86) at org.apache.myfaces.shared_impl.view.ViewDeclarationLanguageBase.restoreView(ViewDeclarationLanguageBase.java:106) at org.apache.myfaces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:234) at javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:83) at com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:316) at org.ajax4jsf.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:107) at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:109) at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:138)

    Apache's JIRA Issue Tracker | 7 years ago | Mark Struberg
    javax.faces.FacesException: javax.crypto.BadPaddingException: Given final block not properly padded
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    db:: 2.99::JSF HTML not rendering properly in 10.1.3.3 3z

    hivmr.com | 11 months ago
    javax.crypto.BadPaddingException: Given final block not properly padded at com.sun.crypto.provider.SunJCE_f.b(DashoA13*..) at com.sun.crypto.provider.SunJCE_f.b(DashoA13*..) at com.sun.crypto.provider.DESCipher.engineDoFinal(DashoA13*..) at javax.crypto.Cipher.doFinal(DashoA13*..)
  6. 0

    db:: 5.60::BadPaddingException: Given final block not propertly padded -- Help Please j9

    hivmr.com | 6 months ago
    javax.crypto.BadPaddingException: Given final block not properly padded at com.sun.crypto.provider.SunJCE_f.b(DashoA13*..) at com.sun.crypto.provider.SunJCE_f.b(DashoA13*..) at com.sun.crypto.provider.DESCipher.engineDoFinal(DashoA13*..) at javax.crypto.Cipher.doFinal(DashoA13*..)

    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. javax.crypto.BadPaddingException

      Given final block not properly padded at com.sun.crypto.provider.SunJCE_f.b(DashoA13*..) at com.sun.crypto.provider.SunJCE_f.b(DashoA13*..) at com.sun.crypto.provider.DESCipher.engineDoFinal(DashoA13*..) at javax.crypto.Cipher.doFinal(DashoA13*..)

      at org.apache.myfaces.shared_impl.util.StateUtils.symmetric()
    2. Impl
      JspStateManagerImpl.restoreView
      1. org.apache.myfaces.shared_impl.util.StateUtils.symmetric(StateUtils.java:471)
      2. org.apache.myfaces.shared_impl.util.StateUtils.symmetric(StateUtils.java:513)
      3. org.apache.myfaces.shared_impl.util.StateUtils.decrypt(StateUtils.java:313)
      4. org.apache.myfaces.shared_impl.util.StateUtils.reconstruct(StateUtils.java:262)
      5. org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getSavedState(HtmlResponseStateManager.java:213)
      6. org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getState(HtmlResponseStateManager.java:160)
      7. org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreView(JspStateManagerImpl.java:406)
      7 frames
    3. JavaEE 7
      StateManagerWrapper.restoreView
      1. javax.faces.application.StateManagerWrapper.restoreView(StateManagerWrapper.java:86)
      1 frame
    4. org.apache.myfaces
      ViewDeclarationLanguageBase.restoreView
      1. org.apache.myfaces.shared_impl.view.ViewDeclarationLanguageBase.restoreView(ViewDeclarationLanguageBase.java:106)
      1 frame
    5. Impl
      ViewHandlerImpl.restoreView
      1. org.apache.myfaces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:234)
      1 frame
    6. JavaEE 7
      ViewHandlerWrapper.restoreView
      1. javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:83)
      1 frame
    7. Facelets
      FaceletViewHandler.restoreView
      1. com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:316)
      1 frame
    8. org.ajax4jsf.application
      ViewHandlerWrapper.restoreView
      1. org.ajax4jsf.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:107)
      1 frame
    9. Impl
      LifecycleImpl.executePhase
      1. org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:109)
      2. org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:138)
      2 frames