如何使用JSF2.2将我们的应用程序部署到weblogic 12

时间:2015-05-18 10:50:17

标签: jsf jsf-2.2 weblogic12c

我有使用jsf 2.2.4和primeface 5.1配置的web应用程序。当我在tomcat 8上部署它时工作正常。但是它没有在weblogic 12上部署。它会在进程注释中出错我创建了weblogic.xml然后部署但错误提升 weblogic.xml中

<weblogic-web-app xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd">
    <jsp-descriptor>
        <keepgenerated>true</keepgenerated>
        <debug>true</debug>
    </jsp-descriptor>
    <container-descriptor>
        <prefer-application-packages>
            <package-name>javax.faces.*</package-name>
            <package-name>com.sun.faces.*</package-name>
            <package-name>com.bea.faces.*</package-name>
            <package-name>javax.persistence.*</package-name>
            <package-name>org.springframework.*</package-name>
        </prefer-application-packages>
        <prefer-application-resources>
            <resource-name>javax.faces.*</resource-name>
            <resource-name>com.sun.faces.*</resource-name>
            <resource-name>com.bea.faces.*</resource-name>
            <resource-name>META-INF/services/javax.servlet.ServletContainerInitializer</resource-name>
            <resource-name>META-INF/services/com.sun.faces.*</resource-name>
            <resource-name>META-INF/services/javax.faces.*</resource-name>

        </prefer-application-resources>
    </container-descriptor>
<!--    <osgi-framework-reference>
        <name>OsgiFramework-0</name>
        <application-bundle-symbolic-name>org.nspofmw.crm.customer</application-bundle-symbolic-name>
    </osgi-framework-reference>-->
    <context-root>customer</context-root>
</weblogic-web-app>

错误是:

May 18, 2015 3:09:04 PM org.springframework.context.support.AbstractApplicationContext doClose
INFO: Closing Root WebApplicationContext: startup date [Mon May 18 15:08:55 IRDT 2015]; root of context hierarchy
May 18, 2015 3:09:04 PM org.springframework.orm.jpa.AbstractEntityManagerFactoryBean destroy
INFO: Closing JPA EntityManagerFactory for persistence unit 'portal'
<May 18, 2015 3:09:10 PM IRDT> <Error> <javax.enterprise.resource.webcontainer.jsf.flow> <BEA-000000> <Unable to obtain CDI 1.1 utilities for Mojarra> 
<May 18, 2015 3:09:10 PM IRDT> <Error> <javax.enterprise.resource.webcontainer.jsf.application.view> <BEA-000000> <Unable to obtain CDI 1.1 utilities for Mojarra> 
May 18, 2015 3:09:10 PM org.springframework.web.context.ContextLoader initWebApplicationContext
INFO: Root WebApplicationContext: initialization started
May 18, 2015 3:09:10 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing Root WebApplicationContext: startup date [Mon May 18 15:09:10 IRDT 2015]; root of context hierarchy
May 18, 2015 3:09:10 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/springContext.xml]
May 18, 2015 3:09:11 PM org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor <init>
INFO: JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
May 18, 2015 3:09:11 PM org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean createNativeEntityManagerFactory
INFO: Building JPA container EntityManagerFactory for persistence unit 'portal'
May 18, 2015 3:09:11 PM org.hibernate.jpa.internal.util.LogHelper logPersistenceUnitInformation
INFO: HHH000204: Processing PersistenceUnitInfo [
    name: portal
    ...]
May 18, 2015 3:09:11 PM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.3.6.Final}
May 18, 2015 3:09:11 PM org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
May 18, 2015 3:09:11 PM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
May 18, 2015 3:09:12 PM org.hibernate.annotations.common.reflection.java.JavaReflectionManager <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.5.Final}
May 18, 2015 3:09:12 PM org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.Oracle10gDialect
May 18, 2015 3:09:12 PM org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory <init>
INFO: HHH000397: Using ASTQueryTranslatorFactory
May 18, 2015 3:09:13 PM org.springframework.web.context.ContextLoader initWebApplicationContext
INFO: Root WebApplicationContext: initialization completed in 3205 ms
<May 18, 2015 3:09:14 PM IRDT> <Error> <javax.enterprise.resource.webcontainer.jsf.application> <jsf.spi.injection.provider_not_found> <JSF1030: The specified InjectionProvider implementation 'com.bea.faces.WeblogicInjectionProvider' cannot be loaded.> 
May 18, 2015 3:09:15 PM org.primefaces.webapp.PostConstructApplicationEventListener processEvent
INFO: Running on PrimeFaces 5.1
May 18, 2015 3:09:15 PM org.primefaces.extensions.application.PostConstructApplicationEventListener processEvent
INFO: Running on PrimeFaces Extensions 3.0.0
[2015-05-18 03:09:16,023] Artifact portal-view:war: Artifact is deployed successfully
[2015-05-18 03:09:16,024] Artifact portal-view:war: Deploy took 11,517 milliseconds

我该怎么办?

2 个答案:

答案 0 :(得分:1)

不幸的是,当您发布此问题(即12c版本3)does not support JSF 2.2时,最新版本的WebLogic可用,仅为2.1。

如果你升级到12c R2(2015年10月发布),你会发现现在支持JSF 2.2。

答案 1 :(得分:0)