在JBoss中部署JSF应用时报错"Could not find backup for factory javax.faces.application.ApplicationFactory" 解决方法
2014-04-12 14:20
633 查看
这个错误出现的原因是classpath中存在多个jsf实现。
比如,JBoss7有一个默认的JSF实现,而你的应用中却用了MyFaces作为JSF实现,这时候应用部署时就会报这个错误。
解决方法:
1。坚持使用项目中的JSF实现。这时在WEB-INF/web.xml中添加这个参数即可:
<context-param>
<param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
<param-value>true</param-value>
</context-param>
这会告诉JBoss7忽略自己默认的JSF实现而使用项目中的JSF实现。这个方法只适用于JBoss-as.7.0.1以后的版本。
如果你用的是7.0.0的版本,请马上升级到7.0.1或更新的版本,因为7.0版中有BUG导致上面的参数无效。
2。如果是JBoss7之前的版本,那么删除 lib/ 下 jsf-*.jar 即可。这样JBoss就只能用应用里的JSF实现了。
比如,JBoss7有一个默认的JSF实现,而你的应用中却用了MyFaces作为JSF实现,这时候应用部署时就会报这个错误。
解决方法:
1。坚持使用项目中的JSF实现。这时在WEB-INF/web.xml中添加这个参数即可:
<context-param>
<param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
<param-value>true</param-value>
</context-param>
这会告诉JBoss7忽略自己默认的JSF实现而使用项目中的JSF实现。这个方法只适用于JBoss-as.7.0.1以后的版本。
如果你用的是7.0.0的版本,请马上升级到7.0.1或更新的版本,因为7.0版中有BUG导致上面的参数无效。
2。如果是JBoss7之前的版本,那么删除 lib/ 下 jsf-*.jar 即可。这样JBoss就只能用应用里的JSF实现了。
相关文章推荐
- 用JSF1.2时提示could not find Factory: javax.faces.context.FacesContextFactory解决办法
- 用JSF1.2时提示could not find Factory: javax.faces.context.FacesContextFactory解决办法
- "Could not find mime type application octet-stream"错误的解决方法
- Could not find destination factory for transport解决方法
- Could not find destination factory for transport解决方法
- VS2010新建”安装和部署项目“时,“项目属性”-》“系统必备”列表中没有项,或显示“prerequisite could not be found for Bootstrapping”,的解决方法
- xcode7.0真机测试出现“Could not find Developer Disk Image"解决方法
- 使用MSBUILD 构建时出错 error MSB3086: Task could not find "sgen.exe" using the SdkToolsPath的解决方法
- "无法启动Web服务器。Web服务器无法找到请求的资源" 或 "unable to start debugging on the web server.the web server could not find the request"解决方法
- Qt release之后运行显示it could not find or load the Qt platform plugin "windows".解决方法
- 打不开Anaconda spyder:could not find or load the QT platform plugin "window in"简单解决方法
- 阿里云CentOS 6.5 Docker无法启动 Could not find a free IP address range for interface 'docker0' 最方便的解决方法
- "it could not find or load the Qt platform plugin "windows""解决方法
- hibernate实体类报错:Could not find a setter for property * in class * 解决方法
- ADT Bundle编译应用程序成功但是部署提示Could not find class的解决方法
- 打不开Anaconda Navigator:could not find or load the QT platform plugin "window in"简单解决方法
- Ant error: Could not find xml-commons-apis Java extension for this JVM解决方法
- Ant error: Could not find xml-commons-apis Java extension for this JVM解决方法
- 解决问题:"Pyperclip could not find a copy/paste mechanism for your system. "
- JBoss错误:"Could not obtain connection to any of these urls"的解决方法