MyFaces 1.2.8 causes Tomcat 6 to crash on deployment

a 夏天 提交于 2019-12-08 09:54:15

问题


I've got a JSF app built with MyFaces 1.2.8, Facelets 1.1.14 and building it with Tomcat 6 through it's plugin in Eclipse Ganymede.

I've just installed the latest versions of the above libs and on build, the app deploys ok and the server goes to start and immediately I get this:

javax.servlet.ServletException: javax.crypto.BadPaddingException: Given final block not properly padded

Googling this one points me towards this page the result of which is to disable the error handling of MyFaces and Facelets using this

    <context-param>
  <param-name>org.apache.myfaces.ERROR_HANDLING</param-name>
  <param-value>false</param-value>
 </context-param>
 <context-param>
  <param-name>facelets.DEVELOPMENT</param-name>
  <param-value>false</param-value>
 </context-param>
 <error-page>
  <exception-type>javax.servlet.ServletException</exception-type>
  <location>/error.jsp</location>
 </error-page> 

and most importantly use this:

org.apache.myfaces.USE_ENCRYPTION

set to false. I don't want to do this but there's no other useful info. Does anyone else know whether there's a workaround for this problem? I've only recently migrated from mojarra and I don't want to have to go back.

Would downgrading MyFaces work do we think? I'm going to try it.

Thanks IA.


回答1:


After scouting around, my own suggestion is to desist from using MyFaces in this situation, install the right Mojarra runtime to support the project you're doing, ensure you have all the jars installed correctly (which I didn't), double check your facelets configuration and read the manuals. It's a bit of a workaround using a different JSF implementation but it worked.



来源:https://stackoverflow.com/questions/2383243/myfaces-1-2-8-causes-tomcat-6-to-crash-on-deployment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!