围绕这个问题有很多问题,每个人都建议JSF库与网络逻辑共享库发生冲突。
我们正在使用Spring 4和hibernate 4将整个应用程序迁移到Weblogic 12c。
部署时,我可以在日志中看到一个错误:ClassNotFound异常,如果该jar不存在或者jar中存在冲突并加载没有该类的jar。
Cause: Unable to create a new instance of 'org.springframework.web.jsf.DelegatingVariableResolver': javax.faces.FacesException: org.springframework.web.jsf.DelegatingVariableResolver
at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(Unknown Source)
at com.sun.faces.config.processor.ApplicationConfigProcessor.addVariableResolver(Unknown Source)
at com.sun.faces.config.processor.ApplicationConfigProcessor.process(Unknown Source)
at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(Unknown Source)
at com.sun.faces.config.processor.LifecycleConfigProcessor.process(Unknown Source)
Truncated. see log file for complete stacktrace
Caused By: javax.faces.FacesException: org.springframework.web.jsf.DelegatingVariableResolver
at com.sun.faces.config.processor.AbstractConfigProcessor.loadClass(Unknown Source)
at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(Unknown Source)
at com.sun.faces.config.processor.ApplicationConfigProcessor.addVariableResolver(Unknown Source)
at com.sun.faces.config.processor.ApplicationConfigProcessor.process(Unknown Source)
at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(Unknown Source)
Truncated. see log file for complete stacktrace
Caused By: java.lang.ClassNotFoundException: org.springframework.web.jsf.DelegatingVariableResolver
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:297)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:270)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:64)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
Truncated. see log file for complete stacktrace
当app正在成功部署时,我在访问localhost时面临以下问题。
1.
]] Root cause of ServletException.
java.lang.IllegalStateException: Could not find backup for factory javax.faces.context.FacesContextFactory.
at javax.faces.FactoryFinderInstance.getFactory(Unknown Source)
at javax.faces.FactoryFinder.getFactory(Unknown Source)
at javax.faces.webapp.FacesServlet.init(Unknown Source)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:299)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:250)
Truncated. see log file for complete stacktrace
有人对weblogic 12c + JSF的上述问题有任何建议吗? 有趣的是我们的应用程序在weblogic 12c中像spring3 + jsf(icefaces)的魅力一样工作,但是一旦我将jar更改为spring 4,它开始抛出JSF问题,这使得为什么在春季4会引起混淆?
无论如何,我从weblogic获得了详细的类加载器,它显示了来自共享库和应用程序的加载类,但这没有帮助。如果有人有任何建议,如果他们可以看到任何JSF库的冲突。我一直在尝试这么多的建议,但没有任何工作。谢谢提前。
**System Classloaders**
Type: sun.misc.Launcher$ExtClassLoader
HashCode: 1956433926
Classpath:
/C:/Java/jdk1.7.0_45/jre/lib/ext/access-bridge-64.jar
/C:/Java/jdk1.7.0_45/jre/lib/ext/dnsns.jar
/C:/Java/jdk1.7.0_45/jre/lib/ext/jaccess.jar
/C:/Java/jdk1.7.0_45/jre/lib/ext/localedata.jar
/C:/Java/jdk1.7.0_45/jre/lib/ext/sunec.jar
/C:/Java/jdk1.7.0_45/jre/lib/ext/sunjce_provider.jar
/C:/Java/jdk1.7.0_45/jre/lib/ext/sunmscapi.jar
/C:/Java/jdk1.7.0_45/jre/lib/ext/zipfs.jar
Type: sun.misc.Launcher$AppClassLoader
HashCode: 345487281
Classpath:
/C:/Oracle12c/Middleware/modules/features/weblogic.server.modules_12.1.1.0.jar
/C:/Oracle12c/Middleware/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar
/C:/Oracle12c/Middleware/modules/org.apache.ant_1.7.1/lib/ant-all.jar
/C:/Oracle12c/Middleware/patch_ocp371/profiles/default/sys_manifest_classpath/weblogic_patch.jar
/C:/Oracle12c/Middleware/patch_wls1211/profiles/default/sys_manifest_classpath/weblogic_patch.jar
/C:/Oracle12c/Middleware/wlserver_12.1/common/derby/lib/derbyclient.jar
/C:/Oracle12c/Middleware/wlserver_12.1/server/lib/weblogic.jar
/C:/Oracle12c/Middleware/wlserver_12.1/server/lib/weblogic_sp.jar
/C:/Oracle12c/Middleware/wlserver_12.1/server/lib/webservices.jar
/C:/Oracle12c/Middleware/wlserver_12.1/server/lib/xqrl.jar
/C:/Program%20Files/Java/jdk1.7.0_45/lib/tools.jar
Type: weblogic.utils.classloaders.GenericClassLoader
HashCode: 1277718374
Classpath:
**Application Classloaders**
Type: weblogic.utils.classloaders.FilteringClassLoader
HashCode: 929366372
Filter: [antlr.*, antlr.collections.*, antlr.collections.impl.*, antlr.debug.misc.*, com.sun.activation.*, com.sun.istack.*, com.sun.mail.*, com.sun.xml.*, org.apache.commons.*, org.joda.time.*, org.apache.xalan.*, org.apache.xml.*, org.apache.wml.*, org.apache.xerces.*, org.apache.xpath.*, com.ctc.wstx.*, org.slf4j.*, javax.faces.*, com.sun.faces.*, com.bea.faces.*, com.sun.el.*, javax.el.*, javassist.*]
Classpath: empty
Type: weblogic.utils.classloaders.GenericClassLoader
HashCode: 2137066604
Classpath:
**Type: weblogic.utils.classloaders.FilteringClassLoader**
HashCode: 1212049573
Filter: []
Classpath: empty
Type: weblogic.utils.classloaders.ChangeAwareClassLoader
HashCode: 1604673952
Classpath:
C:\s-ear-1.0-SNAPSHOT_4
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\classes
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\FastInfoset-1.2.12.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\_wl_cls_gen.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\acegi-security-1.0.7.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\activation-1.1.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\activation.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\antlr-2.7.7.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\aopalliance-1.0.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\aspectjrt-1.8.5.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\aspectjweaver-1.8.5.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\backport-util-concurrent-3.1.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\bcprov-jdk16-140.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\cacauth-2.0.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\camel-core-2.5.0.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\camel-josql-2.5.0.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\caps-handshake-3.0.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\caps2-liquibase-1.0-SNAPSHOT.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\caps2domain-1.0-SNAPSHOT.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\caps2util-1.0-SNAPSHOT.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\cloning-1.7.4.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\commons-beanutils-1.8.0.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\commons-codec-1.9.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\commons-collections-3.2.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\commons-dbcp-1.4.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\commons-digester-2.1.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\commons-httpclient-3.1.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\commons-io-1.4.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\commons-lang-2.4.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\commons-logging-1.1.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\commons-logging-api-1.1.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\commons-management-1.0.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\commons-pool-1.5.4.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\dom4j-1.6.1.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\gentlyweb-utils-1.5.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\hibernate-commons-annotations-4.0.4.Final.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\hibernate-core-4.2.18.Final.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\hibernate-entitymanager-4.2.18.Final.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\hibernate-jpa-2.0-api-1.0.1.Final.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\hibernate-validator-4.2.0.Final.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\icefaces-3.2.0.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\icefaces-ace-3.2.0.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\icefaces-compat-3.2.0.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\icepush-3.2.0.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\itext-4.2.0.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\itextpdf-5.0.6.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\jackson-core-asl-1.9.9.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\jackson-core-lgpl-1.9.9.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\jackson-mapper-asl-1.9.9.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\jasperreports-ca-4.8.0.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\javassist-3.18.2-GA.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\javax.el-api-2.2.1.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\javax.faces-2.2.9.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\javax.inject-1.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\jax-qname.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\jaxb-api-2.1.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\jaxb-api.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\jaxb-impl-2.1.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\jaxb1-impl.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\jaxp-api.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\jaxws-api-2.1.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\jboss-archive-browsing-5.0.0alpha-200607201-119.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\jboss-logging-3.1.3.GA.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\jboss-logging-annotations-1.2.0.Beta1.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\jboss-transaction-api_1.1_spec-1.0.1.Final.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\jcl-over-slf4j-1.5.2.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\jersey-bundle-1.18.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\joda-time-2.0.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\joda-time-hibernate-1.3.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\josql-1.5.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\josql-2.0.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\json-20140107.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\jsr173_1.0_api.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\jsr250-api-1.0.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\jsr311-api-1.1.1.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\jstl-1.2.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\jta-1.1.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\log4j-1.2.14.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\mail-1.4.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\mail.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\objenesis-1.2.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\opencsv-1.7.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\oro-2.0.8.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\portlet-api-2.0.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\primefaces-3.4.1.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\quartz-1.8.4.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\saaj-api-1.3.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\saaj-api.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\saaj-impl.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\serializer-2.7.1.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\serializer.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\service-1.0-SNAPSHOT.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\servlet.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\slf4j-api-1.5.2.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\slf4j-log4j12-1.5.2.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\spring-aop-4.0.9.RELEASE.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\spring-aspects-4.0.9.RELEASE.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\spring-beans-4.0.9.RELEASE.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\spring-context-4.0.9.RELEASE.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\spring-context-support-4.0.9.RELEASE.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\spring-core-4.0.9.RELEASE.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\spring-expression-4.0.9.RELEASE.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\spring-jdbc-4.0.9.RELEASE.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\spring-jms-4.0.9.RELEASE.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\spring-orm-4.0.9.RELEASE.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\spring-oxm-3.0.5.RELEASE.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\spring-security-core-4.0.0.RELEASE.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\spring-tx-4.0.9.RELEASE.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\spring-web-4.0.9.RELEASE.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\spring-webmvc-4.0.9.RELEASE.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\spring-ws-core-2.0.0.RELEASE.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\spring-ws-security-2.0.0.RELEASE.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\spring-xml-2.0.0.RELEASE.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\stax-api-1.0-2.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\3capture-1.0.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\s-beans-1.0-SNAPSHOT.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\usertype.core-3.1.0.CR10.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\usertype.jodatime-1.9.1.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\usertype.spi-3.1.0.CR10.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\validation-api-1.0.0.GA.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\wss4j-1.5.8.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\xalan-2.7.1.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\xercesImpl-2.8.1.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\xercesImpl.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\xml-apis.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\xmldsig.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\xmlsec-1.4.3.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\xmlsec.jar
C:\s-ear-1.0-SNAPSHOT_4\war\WEB-INF\lib\xws-security-3.0.jar
答案 0 :(得分:0)
如上所述在网上尝试了什么。但是从所有面部配置xml中删除delegatingVariable解析器后,它解决了我的问题。如果有人尝试了与此错误相关的所有内容,请尝试以下内容,它可能对您有用。祝你好运。
<variable-resolver>org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>