GlassFish 4.1上所有JSF注释类的ClassNotFoundException

时间:2015-03-30 07:27:18

标签: jsf primefaces glassfish

在使用Glassfish 4.1的EAR设置中使用PrimeFaces 5.1时,我获得了大量的SEVERE日志条目:为每个带注释的JSF类记录ClassNotFoundExceptions,甚至是PrimeFaces类(渲染器,验证器,转换器等)。如果我删除PrimeFaces依赖项一切正常(仍然有警告没有找到类,但没有SEVERE日志条目)。但是应用程序部署很好并且在两种情况下都可以使用,我只是在部署应用程序时讨论日志条目。

环境

  • Mojarra 2.2.7
  • PrimeFaces 5.1
  • GlassFish Server开源4.1版

设置

使用多个WAR模块,JAR模块和EJB模块进行EAR部署。

EAR文件

日志

[2015-02-16T14:32:34.785+0100] [glassfish 4.1] [WARNING] [AS-WEB-UTIL-00035] [javax.enterprise.web.util] [tid: _ThreadID=416 _ThreadName=admin-listener(45)] [timeMillis: 1424093554785] [levelValue: 900] [[
  Unable to load class org.primefaces.validate.DoubleRangeValidator, reason: java.lang.ClassNotFoundException: org.primefaces.validate.DoubleRangeValidator]]

[2015-02-16T14:32:34.786+0100] [glassfish 4.1] [WARNING] [AS-WEB-UTIL-00035] [javax.enterprise.web.util] [tid: _ThreadID=416 _ThreadName=admin-listener(45)] [timeMillis: 1424093554786] [levelValue: 900] [[
  Unable to load class org.primefaces.validate.RegexValidator, reason: java.lang.ClassNotFoundException: org.primefaces.validate.RegexValidator]]

[2015-02-16T14:32:34.788+0100] [glassfish 4.1] [WARNING] [AS-WEB-UTIL-00035] [javax.enterprise.web.util] [tid: _ThreadID=416 _ThreadName=admin-listener(45)] [timeMillis: 1424093554788] [levelValue: 900] [[
  Unable to load class org.primefaces.validate.LongRangeValidator, reason: java.lang.ClassNotFoundException: org.primefaces.validate.LongRangeValidator]]

[2015-02-16T14:32:34.789+0100] [glassfish 4.1] [WARNING] [AS-WEB-UTIL-00035] [javax.enterprise.web.util] [tid: _ThreadID=416 _ThreadName=admin-listener(45)] [timeMillis: 1424093554789] [levelValue: 900] [[
  Unable to load class org.primefaces.validate.LengthValidator, reason: java.lang.ClassNotFoundException: org.primefaces.validate.LengthValidator]]

[2015-02-16T14:32:35.165+0100] [glassfish 4.1] [SEVERE] [] [javax.enterprise.resource.webcontainer.jsf.config] [tid: _ThreadID=416 _ThreadName=admin-listener(45)] [timeMillis: 1424093555165] [levelValue: 1000] [[
  Unable to load annotated class: com.tsystems.ima.client.presentation.TestConverter]]

[2015-02-16T14:32:35.166+0100] [glassfish 4.1] [SEVERE] [] [javax.enterprise.resource.webcontainer.jsf.config] [tid: _ThreadID=416 _ThreadName=admin-listener(45)] [timeMillis: 1424093555166] [levelValue: 1000] [[

java.lang.ClassNotFoundException: com.tsystems.ima.client.presentation.TestConverter
        at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1783)
        at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1633)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:344)
        at com.sun.faces.util.Util.loadClass(Util.java:325)
        at com.sun.faces.config.AnnotationScanner.processClassList(AnnotationScanner.java:309)
        at com.sun.faces.config.DelegateToGlassFishAnnotationScanner.getAnnotatedClasses(DelegateToGlassFishAnnotationScanner.java:85)
        at com.sun.faces.config.DelegatingAnnotationProvider.getAnnotatedClasses(DelegatingAnnotationProvider.java:85)
        at com.sun.faces.config.ConfigManager$AnnotationScanTask.call(ConfigManager.java:932)
        at com.sun.faces.config.ConfigManager$AnnotationScanTask.call(ConfigManager.java:884)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:383)
        at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:221)
        at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:5394)
        at com.sun.enterprise.web.WebModule.contextListenerStart(WebModule.java:743)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:5932)
        at com.sun.enterprise.web.WebModule.start(WebModule.java:691)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1041)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:1024)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:747)
        at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2286)
        at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1932)
        at com.sun.enterprise.web.WebApplication.start(WebApplication.java:139)
        at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
        at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
        at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:500)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:360)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:360)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
        at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:253)
        at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:231)
        at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:275)
        at org.glassfish.admin.rest.resources.TemplateListOfResource.createResource(TemplateListOfResource.java:133)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:483)
        at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:151)
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:171)
        at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:104)
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:387)
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:331)
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:103)
        at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:271)
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
        at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:297)
        at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:254)
        at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1028)
        at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:365)
        at org.glassfish.admin.rest.adapter.RestAdapter$2.service(RestAdapter.java:316)
        at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:179)
        at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
        at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
        at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
        at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
        at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
        at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
        at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231)
        at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
        at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
        at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231)
        at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
        at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
        at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
        at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
        at java.lang.Thread.run(Thread.java:745)
]]

1 个答案:

答案 0 :(得分:1)

这是Glassfish中的错误:GLASSFISH-20720

另见:

现在似乎没有针对Glassfish的修复,但它已在Payara修复:https://github.com/payara/Payara/issues/374