2

这些是我的 pom.xml 中的依赖项:

    <dependency>
        <groupId>com.sun.faces</groupId>
        <artifactId>jsf-api</artifactId>
        <version>2.1.19</version>
    </dependency>

    <dependency>
        <groupId>com.sun.faces</groupId>
        <artifactId>jsf-impl</artifactId>
        <version>2.1.19</version>
    </dependency>

    <dependency>
        <groupId>javax</groupId>
        <artifactId>javaee-api</artifactId>
        <version>6.0</version>
    </dependency>

当这是这样的时候,一切都很好。但是,当我将它们更改为:

    <dependency>
        <groupId>com.sun.faces</groupId>
        <artifactId>jsf-api</artifactId>
        <version>2.2.0</version>
    </dependency>

    <dependency>
        <groupId>com.sun.faces</groupId>
        <artifactId>jsf-impl</artifactId>
        <version>2.2.0</version>
    </dependency>

并部署我得到的项目:

Jul 5, 2013 12:00:50 AM com.sun.enterprise.admin.launcher.GFLauncherLogger info
INFO: JVM invocation command line:
-XX:+UnlockDiagnosticVMOptions
-XX:PermSize=64m
-XX:MaxPermSize=192m
-XX:NewRatio=2
-Xmx512m
-client
-javaagent:C:/glassfish3/glassfish/lib/monitor/flashlight-agent.jar
-Dosgi.shell.telnet.maxconn=1
-Dfelix.fileinstall.disableConfigSave=false
-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
-Dfelix.fileinstall.dir=C:\glassfish3\glassfish/modules/autostart/
-Djavax.net.ssl.keyStore=C:\glassfish3\glassfish\domains\domain1/config/keystore.jks
-Dosgi.shell.telnet.port=6666
-Djava.security.policy=C:\glassfish3\glassfish\domains\domain1/config/server.policy
-Djava.awt.headless=true
-Dfelix.fileinstall.log.level=2
-Dfelix.fileinstall.poll=5000
-Dcom.sun.aas.instanceRoot=C:\glassfish3\glassfish\domains\domain1
-Dosgi.shell.telnet.ip=127.0.0.1
-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
-Djava.endorsed.dirs=C:\glassfish3\glassfish/modules/endorsed;C:\glassfish3\glassfish/lib/endorsed
-Dcom.sun.aas.installRoot=C:\glassfish3\glassfish
-Dfelix.fileinstall.bundles.startTransient=true
-Djava.ext.dirs=C:\Program Files\Java\jdk1.6.0_43/lib/ext;C:\Program Files\Java\jdk1.6.0_43/jre/lib/ext;C:\glassfish3\glassfish\domains\domain1/lib/ext
-Dfelix.fileinstall.bundles.new.start=true
-Djavax.net.ssl.trustStore=C:\glassfish3\glassfish\domains\domain1/config/cacerts.jks
-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as
-Djava.security.auth.login.config=C:\glassfish3\glassfish\domains\domain1/config/login.conf
-DANTLR_USE_DIRECT_CLASS_LOADING=true
-Dgosh.args=--nointeractive
Jul 5, 2013 12:00:50 AM com.sun.enterprise.admin.launcher.GFLauncherLogger info
INFO: Successfully launched in 3 msec.
[#|2013-07-05T00:00:52.216+0300|INFO|glassfish3.1.2|com.sun.enterprise.server.logging.GFFileHandler|_ThreadID=1;_ThreadName=Thread-2;|Running GlassFish Version: GlassFish Server Open Source Edition 3.1.2.2 (build 5)|#]

[#|2013-07-05T00:00:52.287+0300|INFO|glassfish3.1.2|org.glassfish.ha.store.spi.BackingStoreFactoryRegistry|_ThreadID=10;_ThreadName=Thread-2;|Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry|#]

[#|2013-07-05T00:00:52.497+0300|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=11;_ThreadName=Thread-2;|Grizzly Framework 1.9.50 started in: 6ms - bound to [0.0.0.0:3700]|#]

[#|2013-07-05T00:00:52.497+0300|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=14;_ThreadName=Thread-2;|Grizzly Framework 1.9.50 started in: 36ms - bound to [0.0.0.0:8080]|#]

[#|2013-07-05T00:00:52.497+0300|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=13;_ThreadName=Thread-2;|Grizzly Framework 1.9.50 started in: 13ms - bound to [0.0.0.0:4848]|#]

[#|2013-07-05T00:00:52.497+0300|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=12;_ThreadName=Thread-2;|Grizzly Framework 1.9.50 started in: 19ms - bound to [0.0.0.0:8181]|#]

[#|2013-07-05T00:00:52.500+0300|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=15;_ThreadName=Thread-2;|Grizzly Framework 1.9.50 started in: 2ms - bound to [0.0.0.0:7676]|#]

[#|2013-07-05T00:00:52.589+0300|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.admin.adapter|_ThreadID=10;_ThreadName=Thread-2;|The Admin Console is already installed, but not yet loaded.|#]

[#|2013-07-05T00:00:52.796+0300|SEVERE|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=10;_ThreadName=Thread-2;|CORE10012: Application previously deployed is not at its original location any more: file:/D:/MyDev/6june/target/6june/|#]

[#|2013-07-05T00:00:52.800+0300|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=10;_ThreadName=Thread-2;|GlassFish Server Open Source Edition 3.1.2.2 (5) startup time : Felix (1,414ms), startup services(794ms), total(2,208ms)|#]

[#|2013-07-05T00:00:53.411+0300|INFO|glassfish3.1.2|javax.enterprise.system.jmx.org.glassfish.admin.mbeanserver|_ThreadID=16;_ThreadName=Thread-2;|JMX005: JMXStartupService had Started JMXConnector on JMXService URL service:jmx:rmi://192.168.1.3:8686/jndi/rmi://192.168.1.3:8686/jmxrmi|#]

[#|2013-07-05T00:00:53.676+0300|INFO|glassfish3.1.2|org.hibernate.validator.internal.util.Version|_ThreadID=17;_ThreadName=Thread-2;|HV000001: Hibernate Validator 4.3.0.Final|#]

[#|2013-07-05T00:00:55.184+0300|INFO|glassfish3.1.2|javax.enterprise.system.container.ejb.com.sun.ejb.containers|_ThreadID=17;_ThreadName=Thread-2;|Created EjbThreadPoolExecutor with thread-core-pool-size 16 thread-max-pool-size 32 thread-keep-alive-seconds 60 thread-queue-capacity 2147483647 allow-core-thread-timeout false |#]

[#|2013-07-05T00:00:55.206+0300|INFO|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.security|_ThreadID=17;_ThreadName=Thread-2;|SEC1002: Security Manager is OFF.|#]

[#|2013-07-05T00:00:55.283+0300|INFO|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.security|_ThreadID=17;_ThreadName=Thread-2;|SEC1010: Entering Security Startup Service|#]

[#|2013-07-05T00:00:55.285+0300|INFO|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.security|_ThreadID=17;_ThreadName=Thread-2;|SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.|#]

[#|2013-07-05T00:00:55.311+0300|INFO|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm|_ThreadID=17;_ThreadName=Thread-2;|SEC1115: Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.|#]

[#|2013-07-05T00:00:55.312+0300|INFO|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm|_ThreadID=17;_ThreadName=Thread-2;|SEC1115: Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.|#]

[#|2013-07-05T00:00:55.315+0300|INFO|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm|_ThreadID=17;_ThreadName=Thread-2;|SEC1115: Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.|#]

[#|2013-07-05T00:00:55.320+0300|INFO|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.security|_ThreadID=17;_ThreadName=Thread-2;|SEC1011: Security Service(s) Started Successfully|#]

[#|2013-07-05T00:00:55.479+0300|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=17;_ThreadName=Thread-2;|WEB0169: Created HTTP listener [http-listener-1] on host/port [0.0.0.0:8080]|#]

[#|2013-07-05T00:00:55.486+0300|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=17;_ThreadName=Thread-2;|WEB0169: Created HTTP listener [http-listener-2] on host/port [0.0.0.0:8181]|#]

[#|2013-07-05T00:00:55.492+0300|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=17;_ThreadName=Thread-2;|WEB0169: Created HTTP listener [admin-listener] on host/port [0.0.0.0:4848]|#]

[#|2013-07-05T00:00:55.517+0300|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=17;_ThreadName=Thread-2;|WEB0171: Created virtual server [server]|#]

[#|2013-07-05T00:00:55.519+0300|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=17;_ThreadName=Thread-2;|WEB0171: Created virtual server [__asadmin]|#]

[#|2013-07-05T00:00:55.643+0300|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=17;_ThreadName=Thread-2;|WEB0172: Virtual server [server] loaded default web module []|#]

[#|2013-07-05T00:00:57.037+0300|INFO|glassfish3.1.2|org.eclipse.persistence.session.file:/C:/Development/sak/sakillaa-webapp/target/sakillaa-webapp/WEB-INF/lib/sakkillaa-1.0-SNAPSHOT.jar_Persistence|_ThreadID=17;_ThreadName=Thread-2;|EclipseLink, version: Eclipse Persistence Services - 2.3.2.v20111125-r10461|#]

[#|2013-07-05T00:00:57.347+0300|INFO|glassfish3.1.2|org.eclipse.persistence.session.file:/C:/Development/sak/sakillaa-webapp/target/sakillaa-webapp/WEB-INF/lib/sakkillaa-1.0-SNAPSHOT.jar_Persistence|_ThreadID=17;_ThreadName=Thread-2;|file:/C:/Development/sak/sakillaa-webapp/target/sakillaa-webapp/WEB-INF/lib/sakkillaa-1.0-SNAPSHOT.jar_Persistence login successful|#]

[#|2013-07-05T00:00:57.347+0300|WARNING|glassfish3.1.2|org.eclipse.persistence.session.file:/C:/Development/sak/sakillaa-webapp/target/sakillaa-webapp/WEB-INF/lib/sakkillaa-1.0-SNAPSHOT.jar_Persistence.server|_ThreadID=17;_ThreadName=Thread-2;|Multiple [2] JMX MBeanServer instances exist, we will use the server at index [0] : [com.sun.enterprise.v3.admin.DynamicInterceptor@328b1323].|#]

[#|2013-07-05T00:00:57.348+0300|WARNING|glassfish3.1.2|org.eclipse.persistence.session.file:/C:/Development/sak/sakillaa-webapp/target/sakillaa-webapp/WEB-INF/lib/sakkillaa-1.0-SNAPSHOT.jar_Persistence.server|_ThreadID=17;_ThreadName=Thread-2;|JMX MBeanServer in use: [com.sun.enterprise.v3.admin.DynamicInterceptor@328b1323] from index [0] |#]

[#|2013-07-05T00:00:57.348+0300|WARNING|glassfish3.1.2|org.eclipse.persistence.session.file:/C:/Development/sak/sakillaa-webapp/target/sakillaa-webapp/WEB-INF/lib/sakkillaa-1.0-SNAPSHOT.jar_Persistence.server|_ThreadID=17;_ThreadName=Thread-2;|JMX MBeanServer in use: [com.sun.jmx.mbeanserver.JmxMBeanServer@6ebbd7d] from index [1] |#]

[#|2013-07-05T00:00:57.492+0300|INFO|glassfish3.1.2|javax.enterprise.system.container.ejb.com.sun.ejb.containers|_ThreadID=17;_ThreadName=Thread-2;|EJB5181:Portable JNDI names for EJB ActorDao: [java:global/sakillaa-webapp/ActorDao!com.tugay.sakkillaa.dao.ActorDao, java:global/sakillaa-webapp/ActorDao]|#]

[#|2013-07-05T00:00:57.528+0300|INFO|glassfish3.1.2|javax.enterprise.system.container.ejb.com.sun.ejb.containers|_ThreadID=17;_ThreadName=Thread-2;|EJB5181:Portable JNDI names for EJB GeneralDao: [java:global/sakillaa-webapp/GeneralDao!com.tugay.sakkillaa.dao.GeneralDao, java:global/sakillaa-webapp/GeneralDao]|#]

[#|2013-07-05T00:00:57.570+0300|INFO|glassfish3.1.2|org.jboss.weld.Version|_ThreadID=17;_ThreadName=Thread-2;|WELD-000900 1.1.8 (Final)|#]

[#|2013-07-05T00:00:58.018+0300|WARNING|glassfish3.1.2|org.glassfish.weld.BeanDeploymentArchiveImpl|_ThreadID=17;_ThreadName=Thread-2;|Error while trying to load Bean Class com.sun.faces.facelets.tag.composite.PropertyHandlerManager$DefaultPropertyHandler : java.lang.IllegalAccessError: class com.sun.faces.facelets.tag.composite.PropertyHandlerManager$DefaultPropertyHandler cannot access its superinterface com.sun.faces.facelets.tag.composite.PropertyHandler|#]

[#|2013-07-05T00:00:58.037+0300|WARNING|glassfish3.1.2|org.glassfish.weld.BeanDeploymentArchiveImpl|_ThreadID=17;_ThreadName=Thread-2;|Error while trying to load Bean Class com.sun.faces.facelets.tag.AbstractTagLibrary$CompositeComponentTagFactory : java.lang.IllegalAccessError: class com.sun.faces.facelets.tag.AbstractTagLibrary$CompositeComponentTagFactory cannot access its superinterface com.sun.faces.facelets.tag.TagHandlerFactory|#]

[#|2013-07-05T00:00:58.371+0300|WARNING|glassfish3.1.2|org.glassfish.weld.BeanDeploymentArchiveImpl|_ThreadID=17;_ThreadName=Thread-2;|Error while trying to load Bean Class com.sun.faces.application.annotation.ResourceHandler : java.lang.IllegalAccessError: class com.sun.faces.application.annotation.JndiHandler cannot access its superinterface com.sun.faces.application.annotation.RuntimeAnnotationHandler|#]

[#|2013-07-05T00:00:58.374+0300|WARNING|glassfish3.1.2|org.glassfish.weld.BeanDeploymentArchiveImpl|_ThreadID=17;_ThreadName=Thread-2;|Error while trying to load Bean Class com.sun.faces.application.annotation.PersistenceUnitHandler : java.lang.IllegalAccessError: class com.sun.faces.application.annotation.JndiHandler cannot access its superinterface com.sun.faces.application.annotation.RuntimeAnnotationHandler|#]

[#|2013-07-05T00:00:58.377+0300|WARNING|glassfish3.1.2|org.glassfish.weld.BeanDeploymentArchiveImpl|_ThreadID=17;_ThreadName=Thread-2;|Error while trying to load Bean Class com.sun.faces.application.annotation.WebServiceRefHandler : java.lang.IllegalAccessError: class com.sun.faces.application.annotation.JndiHandler cannot access its superinterface com.sun.faces.application.annotation.RuntimeAnnotationHandler|#]

[#|2013-07-05T00:00:58.379+0300|WARNING|glassfish3.1.2|org.glassfish.weld.BeanDeploymentArchiveImpl|_ThreadID=17;_ThreadName=Thread-2;|Error while trying to load Bean Class com.sun.faces.application.annotation.DelegatedEJBScanner : java.lang.IllegalAccessError: class com.sun.faces.application.annotation.DelegatedEJBScanner cannot access its superinterface com.sun.faces.application.annotation.Scanner|#]

[#|2013-07-05T00:00:58.382+0300|WARNING|glassfish3.1.2|org.glassfish.weld.BeanDeploymentArchiveImpl|_ThreadID=17;_ThreadName=Thread-2;|Error while trying to load Bean Class com.sun.faces.application.annotation.EJBHandler : java.lang.IllegalAccessError: class com.sun.faces.application.annotation.JndiHandler cannot access its superinterface com.sun.faces.application.annotation.RuntimeAnnotationHandler|#]

[#|2013-07-05T00:00:58.385+0300|WARNING|glassfish3.1.2|org.glassfish.weld.BeanDeploymentArchiveImpl|_ThreadID=17;_ThreadName=Thread-2;|Error while trying to load Bean Class com.sun.faces.application.annotation.DelegatedResourceScanner : java.lang.IllegalAccessError: class com.sun.faces.application.annotation.DelegatedResourceScanner cannot access its superinterface com.sun.faces.application.annotation.Scanner|#]

[#|2013-07-05T00:00:58.387+0300|WARNING|glassfish3.1.2|org.glassfish.weld.BeanDeploymentArchiveImpl|_ThreadID=17;_ThreadName=Thread-2;|Error while trying to load Bean Class com.sun.faces.application.annotation.DelegatedPersistenceContextScanner : java.lang.IllegalAccessError: class com.sun.faces.application.annotation.DelegatedPersistenceContextScanner cannot access its superinterface com.sun.faces.application.annotation.Scanner|#]

[#|2013-07-05T00:00:58.388+0300|WARNING|glassfish3.1.2|org.glassfish.weld.BeanDeploymentArchiveImpl|_ThreadID=17;_ThreadName=Thread-2;|Error while trying to load Bean Class com.sun.faces.application.annotation.JndiHandler : java.lang.IllegalAccessError: class com.sun.faces.application.annotation.JndiHandler cannot access its superinterface com.sun.faces.application.annotation.RuntimeAnnotationHandler|#]

[#|2013-07-05T00:00:58.391+0300|WARNING|glassfish3.1.2|org.glassfish.weld.BeanDeploymentArchiveImpl|_ThreadID=17;_ThreadName=Thread-2;|Error while trying to load Bean Class com.sun.faces.application.annotation.ResourceScanner : java.lang.IllegalAccessError: class com.sun.faces.application.annotation.ResourceScanner cannot access its superinterface com.sun.faces.application.annotation.Scanner|#]

[#|2013-07-05T00:00:58.393+0300|WARNING|glassfish3.1.2|org.glassfish.weld.BeanDeploymentArchiveImpl|_ThreadID=17;_ThreadName=Thread-2;|Error while trying to load Bean Class com.sun.faces.application.annotation.WebServiceRefScanner : java.lang.IllegalAccessError: class com.sun.faces.application.annotation.WebServiceRefScanner cannot access its superinterface com.sun.faces.application.annotation.Scanner|#]

[#|2013-07-05T00:00:58.396+0300|WARNING|glassfish3.1.2|org.glassfish.weld.BeanDeploymentArchiveImpl|_ThreadID=17;_ThreadName=Thread-2;|Error while trying to load Bean Class com.sun.faces.application.annotation.DelegatedPersistenceUnitScanner : java.lang.IllegalAccessError: class com.sun.faces.application.annotation.DelegatedPersistenceUnitScanner cannot access its superinterface com.sun.faces.application.annotation.Scanner|#]

[#|2013-07-05T00:00:58.400+0300|WARNING|glassfish3.1.2|org.glassfish.weld.BeanDeploymentArchiveImpl|_ThreadID=17;_ThreadName=Thread-2;|Error while trying to load Bean Class com.sun.faces.application.annotation.PersistenceContextScanner : java.lang.IllegalAccessError: class com.sun.faces.application.annotation.PersistenceContextScanner cannot access its superinterface com.sun.faces.application.annotation.Scanner|#]

[#|2013-07-05T00:00:58.405+0300|WARNING|glassfish3.1.2|org.glassfish.weld.BeanDeploymentArchiveImpl|_ThreadID=17;_ThreadName=Thread-2;|Error while trying to load Bean Class com.sun.faces.application.annotation.EJBScanner : java.lang.IllegalAccessError: class com.sun.faces.application.annotation.EJBScanner cannot access its superinterface com.sun.faces.application.annotation.Scanner|#]

[#|2013-07-05T00:00:58.407+0300|WARNING|glassfish3.1.2|org.glassfish.weld.BeanDeploymentArchiveImpl|_ThreadID=17;_ThreadName=Thread-2;|Error while trying to load Bean Class com.sun.faces.application.annotation.PersistenceContextHandler : java.lang.IllegalAccessError: class com.sun.faces.application.annotation.JndiHandler cannot access its superinterface com.sun.faces.application.annotation.RuntimeAnnotationHandler|#]

[#|2013-07-05T00:00:58.410+0300|WARNING|glassfish3.1.2|org.glassfish.weld.BeanDeploymentArchiveImpl|_ThreadID=17;_ThreadName=Thread-2;|Error while trying to load Bean Class com.sun.faces.application.annotation.DelegatedWebServiceRefScanner : java.lang.IllegalAccessError: class com.sun.faces.application.annotation.DelegatedWebServiceRefScanner cannot access its superinterface com.sun.faces.application.annotation.Scanner|#]

[#|2013-07-05T00:00:58.412+0300|WARNING|glassfish3.1.2|org.glassfish.weld.BeanDeploymentArchiveImpl|_ThreadID=17;_ThreadName=Thread-2;|Error while trying to load Bean Class com.sun.faces.application.annotation.PersistenceUnitScanner : java.lang.IllegalAccessError: class com.sun.faces.application.annotation.PersistenceUnitScanner cannot access its superinterface com.sun.faces.application.annotation.Scanner|#]

[#|2013-07-05T00:01:00.018+0300|SEVERE|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=17;_ThreadName=Thread-2;|Exception while loading the app|#]

[#|2013-07-05T00:01:00.500+0300|INFO|glassfish3.1.2|org.eclipse.persistence.session.file:/C:/Development/sak/sakillaa-webapp/target/sakillaa-webapp/WEB-INF/lib/sakkillaa-1.0-SNAPSHOT.jar_Persistence|_ThreadID=18;_ThreadName=Thread-2;|file:/C:/Development/sak/sakillaa-webapp/target/sakillaa-webapp/WEB-INF/lib/sakkillaa-1.0-SNAPSHOT.jar_Persistence logout successful|#]

[#|2013-07-05T00:01:00.507+0300|SEVERE|glassfish3.1.2|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=17;_ThreadName=Thread-2;|Exception while loading the app : FLOW
java.lang.NoSuchFieldError: FLOW
    at com.sun.faces.flow.FlowDiscoveryCDIExtension.<clinit>(FlowDiscoveryCDIExtension.java:90)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at org.jboss.weld.util.ServiceLoader.prepareInstance(ServiceLoader.java:235)
    at org.jboss.weld.util.ServiceLoader.loadService(ServiceLoader.java:209)
    at org.jboss.weld.util.ServiceLoader.loadServiceFile(ServiceLoader.java:177)
    at org.jboss.weld.util.ServiceLoader.reload(ServiceLoader.java:149)
    at org.jboss.weld.util.ServiceLoader.iterator(ServiceLoader.java:292)
    at org.glassfish.weld.DeploymentImpl.getExtensions(DeploymentImpl.java:368)
    at org.jboss.weld.bootstrap.WeldBootstrap.startInitialization(WeldBootstrap.java:325)
    at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:177)
    at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:128)
    at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:277)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:460)
    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:662)
|#]

[#|2013-07-05T00:02:11.096+0300|INFO|glassfish3.1.2|javax.enterprise.system.tools.admin.com.sun.enterprise.v3.admin|_ThreadID=19;_ThreadName=Thread-2;|Server shutdown initiated|#]

[#|2013-07-05T00:02:11.122+0300|INFO|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.service|_ThreadID=20;_ThreadName=Thread-2;|RAR7094: __cp_jdbc_ra shutdown successful.|#]

[#|2013-07-05T00:02:13.510+0300|INFO|glassfish3.1.2|javax.enterprise.system.jmx.org.glassfish.admin.mbeanserver|_ThreadID=19;_ThreadName=Thread-2;|JMX002: JMXStartupService: Stopped JMXConnectorServer: null|#]

[#|2013-07-05T00:02:13.511+0300|INFO|glassfish3.1.2|javax.enterprise.system.jmx.org.glassfish.admin.mbeanserver|_ThreadID=19;_ThreadName=Thread-2;|JMX001: JMXStartupService and JMXConnectors have been shut down.|#]

[#|2013-07-05T00:02:13.512+0300|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=19;_ThreadName=Thread-2;|Shutdown procedure finished|#]

我做错了什么?

4

1 回答 1

3

科雷,

您已经在这里回答了您自己的问题,因为您显示部署时出现错误,这与 Glassfish 库中不可用的“Flow”类有关。java.lang.NoSuchFieldError:com.sun.faces.flow.FlowDiscoveryCDIExtension 处的流。(FlowDiscoveryCDIExtension.java:90)。

您没有做错任何事情,只是您的网络应用程序和 glassfish 之间的版本不匹配。您表明,通过将 jsf 的 api 版本从 2.1.19 增加到 2.2.0 ,您的部署会中断。我没有 glassfish,但如果您查看它的库,您会发现 com.sun.faces.flow.Flow 在这个 jsf-api 库的 Glassfish 版本中不存在。

你需要我们这个库的 2.2.0 吗,如果需要,你可以尝试将提供的范围 ( <scope>provided</scope>) 添加到依赖项中,看看 glassfish 是否只会使用它自己的。我不确定这是否可行,这取决于 Glassfish 的类加载器。

于 2014-01-15T21:48:26.707 回答