Glassfish部署:未知架构版本2.2

时间:2013-07-18 18:36:16

标签: java jsf glassfish glassfish-3 jsf-2.2

我在将我的应用程序部署到Glassfish时遇到了一些问题。我正在使用Glassfish 3.x.当我将此应用程序部署到Tomcat 7.x时,没有任何问题。但是,当我部署到Glassfish时,它说有一个未知的模式版本2.2但是,据我所知,我的faces-config.xml应该是正确的。

这是我的faces-config.xml

<?xml version="1.0"?>
<faces-config version="2.2" xmlns="http://java.sun.com/xml/ns/javaee" 
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd">

    <!-- Enable Spring with JSF -->        
    <application>
        <el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</el-resolver>
    </application>

</faces-config>

附件是我的错误信息

INFO: Running GlassFish Version: GlassFish Server Open Source Edition 3.1.2.2 (build 5)
INFO: Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry
INFO: Grizzly Framework 1.9.50 started in: 265ms - bound to [0.0.0.0:8181]
INFO: Grizzly Framework 1.9.50 started in: 828ms - bound to [0.0.0.0:8080]
INFO: Grizzly Framework 1.9.50 started in: 78ms - bound to [0.0.0.0:4848]
INFO: Grizzly Framework 1.9.50 started in: 125ms - bound to [0.0.0.0:3700]
INFO: Grizzly Framework 1.9.50 started in: 79ms - bound to [0.0.0.0:7676]
INFO: The Admin Console is already installed, but not yet loaded.
INFO: GlassFish Server Open Source Edition 3.1.2.2 (5) startup time : Felix (22,532ms), startup services(12,984ms), total(35,516ms)
INFO: User [] from host JF4FVL1 does not have administration access
INFO: The Admin Console is already installed, but not yet loaded.
INFO: The Admin Console is starting. Please wait.
INFO: HV000001: Hibernate Validator 4.3.0.Final
INFO: JMX005: JMXStartupService had Started JMXConnector on JMXService URL service:jmx:rmi://JF4FVL1:8686/jndi/rmi://JF4FVL1:8686/jmxrmi
INFO: WEB0169: Created HTTP listener [http-listener-1] on host/port [0.0.0.0:8080]
INFO: WEB0169: Created HTTP listener [http-listener-2] on host/port [0.0.0.0:8181]
INFO: WEB0169: Created HTTP listener [admin-listener] on host/port [0.0.0.0:4848]
INFO: WEB0171: Created virtual server [server]
INFO: WEB0171: Created virtual server [__asadmin]
INFO: SEC1002: Security Manager is OFF.
INFO: SEC1010: Entering Security Startup Service
INFO: SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
INFO: WEB0172: Virtual server [server] loaded default web module []
INFO: SEC1115: Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
INFO: SEC1115: Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
INFO: SEC1115: Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.
INFO: SEC1011: Security Service(s) Started Successfully
INFO: Initializing Mojarra 2.1.6 (SNAPSHOT 20111206) for context ''
INFO: WEB0671: Loading application [__admingui] at [/]
INFO: CORE10010: Loading application __admingui done in 118,469 ms
INFO: The Admin Console application is loaded.
INFO: PWC1412: WebModule[null] ServletContext.log():No Spring WebApplicationInitializer types detected on classpath
INFO: Initializing Mojarra 2.1.6 (SNAPSHOT 20111206) for context '/Test'
SEVERE: Critical error during deployment: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: com.sun.faces.config.ConfigurationException: Unable to parse document 'jndi:/server/Test/WEB-INF/faces-config.xml': Unknown Schema version: 2.2 at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:672)    at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:322)    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:225)    at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:4750) at com.sun.enterprise.web.WebModule.contextListenerStart(WebModule.java:550)    at org.apache.catalina.core.StandardContext.start(StandardContext.java:5366)    at com.sun.enterprise.web.WebModule.start(WebModule.java:498)   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)  at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2019)    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1669)    at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109) at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)  at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)    at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)  at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)  at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)  at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389) at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)  at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)  at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)  at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)  at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)    at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)  at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)   at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)   at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)  at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)   at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)  at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)   at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)    at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)   at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)  at java.lang.Thread.run(Thread.java:724)Caused by: java.util.concurrent.ExecutionException: com.sun.faces.config.ConfigurationException: Unable to parse document 'jndi:/server/Test/WEB-INF/faces-config.xml': Unknown Schema version: 2.2 at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)   at java.util.concurrent.FutureTask.get(FutureTask.java:111) at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:670)    ... 44 moreCaused by: com.sun.faces.config.ConfigurationException: Unable to parse document 'jndi:/server/Test/WEB-INF/faces-config.xml': Unknown Schema version: 2.2   at com.sun.faces.config.ConfigManager$ParseTask.call(ConfigManager.java:920)    at com.sun.faces.config.ConfigManager$ParseTask.call(ConfigManager.java:865)    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)   at java.util.concurrent.FutureTask.run(FutureTask.java:166) at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:656)    ... 44 moreCaused by: com.sun.faces.config.ConfigurationException: Unknown Schema version: 2.2  at com.sun.faces.config.ConfigManager$ParseTask.getDocument(ConfigManager.java:997) at com.sun.faces.config.ConfigManager$ParseTask.call(ConfigManager.java:911)    ... 48 more
SEVERE: PWC1306: Startup of context /Test failed due to previous errors
SEVERE: PWC1305: Exception during cleanup after start failedorg.apache.catalina.LifecycleException: PWC2769: Manager has not yet been started   at org.apache.catalina.session.StandardManager.stop(StandardManager.java:873)   at org.apache.catalina.core.StandardContext.stop(StandardContext.java:5571) at com.sun.enterprise.web.WebModule.stop(WebModule.java:527)    at org.apache.catalina.core.StandardContext.start(StandardContext.java:5384)    at com.sun.enterprise.web.WebModule.start(WebModule.java:498)   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)  at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2019)    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1669)    at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109) at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)  at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)    at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)  at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)  at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)  at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389) at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)  at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)  at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)  at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)  at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)    at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)  at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)   at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)   at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)  at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)   at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)  at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)   at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)    at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)   at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)  at java.lang.Thread.run(Thread.java:724)
SEVERE: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: com.sun.faces.config.ConfigurationException: Unable to parse document 'jndi:/server/Test/WEB-INF/faces-config.xml': Unknown Schema version: 2.2    at org.apache.catalina.core.StandardContext.start(StandardContext.java:5389)    at com.sun.enterprise.web.WebModule.start(WebModule.java:498)   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)  at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2019)    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1669)    at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109) at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)  at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)    at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)  at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)  at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)  at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389) at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)  at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)  at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)  at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)  at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)    at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)  at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)   at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)   at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)  at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)   at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)  at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)   at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)    at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)   at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)  at java.lang.Thread.run(Thread.java:724)Caused by: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: com.sun.faces.config.ConfigurationException: Unable to parse document 'jndi:/server/Test/WEB-INF/faces-config.xml': Unknown Schema version: 2.2    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:292)    at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:4750) at com.sun.enterprise.web.WebModule.contextListenerStart(WebModule.java:550)    at org.apache.catalina.core.StandardContext.start(StandardContext.java:5366)    ... 39 moreCaused by: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: com.sun.faces.config.ConfigurationException: Unable to parse document 'jndi:/server/Test/WEB-INF/faces-config.xml': Unknown Schema version: 2.2 at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:672)    at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:322)    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:225)    ... 42 moreCaused by: java.util.concurrent.ExecutionException: com.sun.faces.config.ConfigurationException: Unable to parse document 'jndi:/server/Test/WEB-INF/faces-config.xml': Unknown Schema version: 2.2  at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)   at java.util.concurrent.FutureTask.get(FutureTask.java:111) at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:670)    ... 44 moreCaused by: com.sun.faces.config.ConfigurationException: Unable to parse document 'jndi:/server/Test/WEB-INF/faces-config.xml': Unknown Schema version: 2.2   at com.sun.faces.config.ConfigManager$ParseTask.call(ConfigManager.java:920)    at com.sun.faces.config.ConfigManager$ParseTask.call(ConfigManager.java:865)    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)   at java.util.concurrent.FutureTask.run(FutureTask.java:166) at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:656)    ... 44 moreCaused by: com.sun.faces.config.ConfigurationException: Unknown Schema version: 2.2  at com.sun.faces.config.ConfigManager$ParseTask.getDocument(ConfigManager.java:997) at com.sun.faces.config.ConfigManager$ParseTask.call(ConfigManager.java:911)    ... 48 more
WARNING: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: com.sun.faces.config.ConfigurationException: Unable to parse document 'jndi:/server/Test/WEB-INF/faces-config.xml': Unknown Schema version: 2.2java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: com.sun.faces.config.ConfigurationException: Unable to parse document 'jndi:/server/Test/WEB-INF/faces-config.xml': Unknown Schema version: 2.2 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:921)  at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2019)    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1669)    at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109) at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)  at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)    at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)  at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)  at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)  at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389) at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)  at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)  at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)  at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)  at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)    at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)  at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)   at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)   at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)  at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)   at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)  at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)   at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)    at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)   at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)  at java.lang.Thread.run(Thread.java:724)
SEVERE: Exception while invoking class com.sun.enterprise.web.WebApplication start methodjava.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: com.sun.faces.config.ConfigurationException: Unable to parse document 'jndi:/server/Test/WEB-INF/faces-config.xml': Unknown Schema version: 2.2 at com.sun.enterprise.web.WebApplication.start(WebApplication.java:138) at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)  at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)    at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)  at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)  at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)  at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389) at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)  at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)  at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)  at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)  at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)    at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)  at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)   at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)   at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)  at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)   at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)  at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)   at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)    at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)   at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)  at java.lang.Thread.run(Thread.java:724)
SEVERE: Exception while loading the app
SEVERE: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: com.sun.faces.config.ConfigurationException: Unable to parse document 'jndi:/server/Test/WEB-INF/faces-config.xml': Unknown Schema version: 2.2

1 个答案:

答案 0 :(得分:0)

faces-config.xml中的xmlns错误。

试试这个:

<faces-config xmlns="http://xmlns.jcp.org/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
        http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"
    version="2.2">

</faces-config>

但如果你看一下this question,你会发现Glassfish 3并不完全支持JSF 2.2。