我是GlassFish Server的新手,所以我试图通过Web界面部署.war文件,但这给了我下一个错误:
Error occurred during deployment: Exception while deploying the app [ActivationCode] : The lifecycle method [stop] must not throw a checked exception. Related annotation information: annotation [@javax.annotation.PreDestroy()] on annotated element [public void weblogic.cluster.singleton.PreAdminSingletonServicesService.stop() throws weblogic.server.ServiceFailureException] of type [METHOD]. Please see server.log for more details.
在服务器日志文件中,这是错误:
Caused by: java.lang.IllegalArgumentException: The lifecycle method [stop] must not throw a checked exception
at com.sun.enterprise.deployment.annotation.handlers.AbstractResourceHandler.validateAnnotatedLifecycleMethod(AbstractResourceHandler.java:186)
at com.sun.enterprise.deployment.annotation.handlers.PreDestroyHandler.processAnnotation(PreDestroyHandler.java:69)
at com.sun.enterprise.deployment.annotation.handlers.AbstractResourceHandler.processAnnotation(AbstractResourceHandler.java:142)
at com.sun.enterprise.deployment.annotation.factory.SJSASFactory$LazyAnnotationHandler.processAnnotation(SJSASFactory.java:174)
at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:350)
... 84 more
但是我不知道为什么会这样,希望有人请帮助我。