拜托,我找不到这个错误的原因。
我创建了一个类 LogoutListener.java,它实现了 HttpSessionListener,它有两个抽象方法:sessionCreated 和 sessionDestroyed。我在 web.xml 中添加了相应的监听器标签:
...更多代码
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.seam</url-pattern>
</servlet-mapping>
<!-- Listeners used by application -->
<listener>
<listener-class>com.akson.encuesta.session.helper.LogoutListener</listener-class>
</listener>
<security-constraint>
<display-name>Restrict raw XHTML Documents</display-name>
<web-resource-collection>
<web-resource-name>XHTML</web-resource-name>
<url-pattern>*.xhtml</url-pattern>
</web-resource-collection>
<auth-constraint />
</security-constraint>
...更多代码
当我删除标签时,服务器不会出现错误,但是当标签在 web.xml 中时,服务器会出现错误(下一个是日志的一部分):
EjbSynchronizations/local - EJB3.x Default Local Business Interface
EjbSynchronizations/local-org.jboss.seam.transaction.LocalEjbSynchroniza
tions - EJB3.x Local Business Interface
12:16:12,550 INFO [SessionSpecContainer] Starting jboss.j2ee:jar=demoencuesta06
.war,name=TimerServiceDispatcher,service=EJB3
12:16:12,551 INFO [EJBContainer] STARTED EJB: org.jboss.seam.async.TimerService
Dispatcher ejbName: TimerServiceDispatcher
12:16:12,557 INFO [JndiSessionRegistrarBase] Binding the following Entries in G
lobal JNDI:
TimerServiceDispatcher/local - EJB3.x Default Local Business Interface
TimerServiceDispatcher/local-org.jboss.seam.async.LocalTimerServiceDispa
tcher - EJB3.x Local Business Interface
12:16:12,559 WARN [TimerServiceContainer] EJBTHREE-2193: using deprecated Timer
ServiceFactory for restoring timers
12:16:12,763 INFO [TomcatDeployment] deploy, ctxPath=/demoencuesta06
12:16:12,806 ERROR [[/demoencuesta06]] Error configurando escuchador de aplicaci
¾n de clase com.akson.encuesta.session.helper.LogoutListener: java.lang.ClassNot
FoundException: com.akson.encuesta.session.helper.LogoutListener
at java.net.URLClassLoader$1.run(URLClassLoader.java:202) [:1.6.0_33]
at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_33
]
at java.net.URLClassLoader.findClass(URLClassLoader.java:190) [:1.6.0_33
]
at java.lang.ClassLoader.loadClass(ClassLoader.java:306) [:1.6.0_33]
at java.lang.ClassLoader.loadClass(ClassLoader.java:247) [:1.6.0_33]
at org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(Tom
catInjectionContainer.java:278) [:6.1.0.Final]
at org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(Tom
catInjectionContainer.java:264) [:6.1.0.Final]
at org.apache.catalina.core.StandardContext.contextListenerStart(Standar
dContext.java:3319) [:6.1.0.Final]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3
828) [:6.1.0.Final]
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy
Internal(TomcatDeployment.java:294) [:6.1.0.Final]
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy
(TomcatDeployment.java:146) [:6.1.0.Final]
at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeploy
ment.java:476) [:6.1.0.Final]
at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118) [:6
.1.0.Final]
at org.jboss.web.deployers.WebModule.start(WebModule.java:95) [:6.1.0.Fi
nal]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_3
3]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39) [:1.6.0_33]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25) [:1.6.0_33]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_33]
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:157) [:6.0.0.GA]
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96) [:6.0.0.G
A]
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) [:6.0.0.GA]
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:271) [:6.0.0.GA]
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:670)
[:6.0.0.GA]
at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java
:206) [:2.2.0.SP2]
at $Proxy41.start(Unknown Source) at org.jboss.system.microcontain
er.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:53) [:2.
2.0.SP2]
at org.jboss.system.microcontainer.StartStopLifecycleAction.installActio
n(StartStopLifecycleAction.java:41) [:2.2.0.SP2]
at org.jboss.dependency.plugins.action.SimpleControllerContextAction.sim
pleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.
2.0.SP2]
at org.jboss.dependency.plugins.action.AccessControllerContextAction.ins
tall(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractControllerContextActions.install
(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractControllerContext.install(Abstra
ctControllerContext.java:379) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.system.microcontainer.ServiceControllerContext.install(Serv
iceControllerContext.java:301) [:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.install(AbstractContr
oller.java:2044) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.incrementState(Abstra
ctController.java:1083) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.executeOrIncrementSta
teDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(Abstr
actController.java:1246) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(Abstr
actController.java:1139) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.change(AbstractContro
ller.java:939) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.change(AbstractContro
ller.java:654) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.system.ServiceController.doChange(ServiceController.java:67
1) [:6.1.0.Final (Build SVNTag:JBoss_6.1.0.Final date: 20110816)]
at org.jboss.system.ServiceController.start(ServiceController.java:443)
[:6.1.0.Final (Build SVNTag:JBoss_6.1.0.Final date: 20110816)]
at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java
:189) [:6.1.0.Final]
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.jav
a:102) [:6.1.0.Final]
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.jav
a:49) [:6.1.0.Final]
at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.i
nternalDeploy(AbstractSimpleRealDeployer.java:63) [:2.2.2.GA]
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(
AbstractRealDeployer.java:55) [:2.2.2.GA]
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(Deployer
Wrapper.java:179) [:2.2.2.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(Deployer
sImpl.java:1832) [:2.2.2.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFi
rst(DeployersImpl.java:1550) [:2.2.2.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFi
rst(DeployersImpl.java:1571) [:2.2.2.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(Deployers
Impl.java:1491) [:2.2.2.GA]
at org.jboss.dependency.plugins.AbstractControllerContext.install(Abstra
ctControllerContext.java:379) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.install(AbstractContr
oller.java:2044) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.incrementState(Abstra
ctController.java:1083) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.executeOrIncrementSta
teDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(Abstr
actController.java:1246) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(Abstr
actController.java:1139) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.change(AbstractContro
ller.java:939) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.change(AbstractContro
ller.java:654) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersI
mpl.java:1983) [:2.2.2.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(Deployers
Impl.java:1076) [:2.2.2.GA]
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeploye
rImpl.java:679) [:2.2.2.GA]
at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.p
rocess(MainDeployerPlugin.java:106) [:6.1.0.Final]
at org.jboss.profileservice.dependency.ProfileControllerContext$Delegate
Deployer.process(ProfileControllerContext.java:143) [:0.2.2]
at org.jboss.profileservice.dependency.ProfileDeployAction.deploy(Profil
eDeployAction.java:151) [:0.2.2]
at org.jboss.profileservice.dependency.ProfileDeployAction.installAction
Internal(ProfileDeployAction.java:94) [:0.2.2]
at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction
(InstallsAwareAction.java:54) [jboss-kernel.jar:2.2.0.SP2]
at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction
(InstallsAwareAction.java:42) [jboss-kernel.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.action.SimpleControllerContextAction.sim
pleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.
2.0.SP2]
at org.jboss.dependency.plugins.action.AccessControllerContextAction.ins
tall(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractControllerContextActions.install
(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractControllerContext.install(Abstra
ctControllerContext.java:379) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.install(AbstractContr
oller.java:2044) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.incrementState(Abstra
ctController.java:1083) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.executeOrIncrementSta
teDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(Abstr
actController.java:1246) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(Abstr
actController.java:1139) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.change(AbstractContro
ller.java:939) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.change(AbstractContro
ller.java:654) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.profileservice.dependency.ProfileActivationWrapper$BasicPro
fileActivation.start(ProfileActivationWrapper.java:190) [:0.2.2]
at org.jboss.profileservice.dependency.ProfileActivationWrapper.start(Pr
ofileActivationWrapper.java:87) [:0.2.2]
at org.jboss.profileservice.dependency.ProfileActivationService.activate
Profile(ProfileActivationService.java:215) [:0.2.2]
at org.jboss.profileservice.dependency.ProfileActivationService.activate
(ProfileActivationService.java:159) [:0.2.2]
at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.ac
tivate(AbstractProfileServiceBootstrap.java:112) [:0.2.2]
at org.jboss.profileservice.resolver.BasicResolverFactory$ProfileResolve
rFacade.deploy(BasicResolverFactory.java:87) [:0.2.2]
at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.st
art(AbstractProfileServiceBootstrap.java:91) [:0.2.2]
at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceB
ootstrap.start(BasicProfileServiceBootstrap.java:132) [:6.1.0.Final]
at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceB
ootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.1.0.Final]
at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(A
bstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]
at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.r
un(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_33]
12:16:12,899 ERROR [[/demoencuesta06]] Se ha saltado la instalaci¾n de escuchado
res de aplicaci¾n debido a error(es) previo(s)
12:16:12,900 ERROR [StandardContext] Error listenerStart
12:16:12,900 ERROR [StandardContext] Fall¾ en arranque del Contexto [/demoencues
ta06] debido a errores previos
12:16:12,917 ERROR [AbstractKernelController] Error installing to Start: name=jb
oss.web.deployment:war=/demoencuesta06 state=Create mode=Manual requiredState=In
stalled: org.jboss.deployers.spi.DeploymentException: URL file:/D:/jboss-6.1.0.F
inal/server/default/deploy/demoencuesta06.war/ deployment failed
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy
Internal(TomcatDeployment.java:325) [:6.1.0.Final]
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy
我使用 Eclipse Indigo、Jboss、Seam、RichFaces
谢谢你