myfacesapache-tomeetomee-7

TomEE - java.lang.NoClassDefFoundError: javax/faces/application/ResourceHandlerWrapper


I can't start my server in Eclipse (Neon). The server is TomEE 7.0.2 Plus. I configured it as Tomcat 8.5

When I start the server I get the following error.

Okt 26, 2017 11:08:42 AM sun.reflect.NativeMethodAccessorImpl invoke
INFORMATION: Server version:        Apache Tomcat (TomEE)/8.5.6 (7.0.2)
Okt 26, 2017 11:08:42 AM sun.reflect.NativeMethodAccessorImpl invoke
INFORMATION: Server built:          Oct 6 2016 20:15:31 UTC
Okt 26, 2017 11:08:42 AM sun.reflect.NativeMethodAccessorImpl invoke
INFORMATION: Server number:         8.5.6.0
Okt 26, 2017 11:08:42 AM sun.reflect.NativeMethodAccessorImpl invoke
INFORMATION: OS Name:               Windows 7
Okt 26, 2017 11:08:42 AM sun.reflect.NativeMethodAccessorImpl invoke
INFORMATION: OS Version:            6.1
Okt 26, 2017 11:08:42 AM sun.reflect.NativeMethodAccessorImpl invoke
INFORMATION: Architecture:          amd64
Okt 26, 2017 11:08:42 AM sun.reflect.NativeMethodAccessorImpl invoke
INFORMATION: Java Home:             C:\Program Files\Java\jdk1.8.0_60\jre
Okt 26, 2017 11:08:42 AM sun.reflect.NativeMethodAccessorImpl invoke
INFORMATION: JVM Version:           1.8.0_60-b27
Okt 26, 2017 11:08:42 AM sun.reflect.NativeMethodAccessorImpl invoke
INFORMATION: JVM Vendor:            Oracle Corporation
Okt 26, 2017 11:08:42 AM sun.reflect.NativeMethodAccessorImpl invoke
INFORMATION: CATALINA_BASE:         C:\data\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1
Okt 26, 2017 11:08:42 AM sun.reflect.NativeMethodAccessorImpl invoke
INFORMATION: CATALINA_HOME:         D:\Programme\TomEE Plus
Okt 26, 2017 11:08:42 AM sun.reflect.NativeMethodAccessorImpl invoke
INFORMATION: Command line argument: -Dcatalina.base=C:\data\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1
Okt 26, 2017 11:08:42 AM sun.reflect.NativeMethodAccessorImpl invoke
INFORMATION: Command line argument: -Dcatalina.home=D:\Programme\TomEE Plus
Okt 26, 2017 11:08:42 AM sun.reflect.NativeMethodAccessorImpl invoke
INFORMATION: Command line argument: -Dwtp.deploy=C:\data\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps
Okt 26, 2017 11:08:42 AM sun.reflect.NativeMethodAccessorImpl invoke
INFORMATION: Command line argument: -Djava.endorsed.dirs=D:\Programme\TomEE Plus\endorsed
Okt 26, 2017 11:08:42 AM sun.reflect.NativeMethodAccessorImpl invoke
INFORMATION: Command line argument: -Dfile.encoding=Cp1252
Okt 26, 2017 11:08:42 AM sun.reflect.DelegatingMethodAccessorImpl invoke
INFORMATION: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.8.0_60\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre1.8.0_102/bin/server;C:/Program Files/Java/jre1.8.0_102/bin;C:/Program Files/Java/jre1.8.0_102/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\CheckPoint\Endpoint Security\Endpoint Common\bin;C:\Program Files (x86)\apache-maven-3.5.0\bin;C:\Windows\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Common Files\Siemens\System;C:\Program Files (x86)\IBM\Lotus\Notes\;C:\Program Files (x86)\PuTTY\;C:\Program Files\nodejs\;C:\Users\hansma4\AppData\Roaming\npm;C:\Program Files\Microsoft VS Code\bin;C:\Program Files (x86)\eclipse neon;;.
Okt 26, 2017 11:08:42 AM sun.reflect.DelegatingMethodAccessorImpl invoke
INFORMATION: Initializing ProtocolHandler ["http-nio-8080"]
Okt 26, 2017 11:08:42 AM sun.reflect.DelegatingMethodAccessorImpl invoke
INFORMATION: Using a shared selector for servlet write/read
Okt 26, 2017 11:08:42 AM sun.reflect.DelegatingMethodAccessorImpl invoke
INFORMATION: Initializing ProtocolHandler ["ajp-nio-8009"]
Okt 26, 2017 11:08:42 AM sun.reflect.DelegatingMethodAccessorImpl invoke
INFORMATION: Using a shared selector for servlet write/read
Okt 26, 2017 11:08:43 AM org.apache.openejb.util.OptionsLog info
INFORMATION: Using 'openejb.jdbc.datasource-creator=org.apache.tomee.jdbc.TomEEDataSourceCreator'
Okt 26, 2017 11:08:43 AM org.apache.openejb.OpenEJB$Instance <init>
INFORMATION: ********************************************************************************
Okt 26, 2017 11:08:43 AM org.apache.openejb.OpenEJB$Instance <init>
INFORMATION: OpenEJB http://tomee.apache.org/
Okt 26, 2017 11:08:43 AM org.apache.openejb.OpenEJB$Instance <init>
INFORMATION: Startup: Thu Oct 26 11:08:43 CEST 2017
Okt 26, 2017 11:08:43 AM org.apache.openejb.OpenEJB$Instance <init>
INFORMATION: Copyright 1999-2016 (C) Apache OpenEJB Project, All Rights Reserved.
Okt 26, 2017 11:08:43 AM org.apache.openejb.OpenEJB$Instance <init>
INFORMATION: Version: 7.0.2
Okt 26, 2017 11:08:43 AM org.apache.openejb.OpenEJB$Instance <init>
INFORMATION: Build date: 20161106
Okt 26, 2017 11:08:43 AM org.apache.openejb.OpenEJB$Instance <init>
INFORMATION: Build time: 07:23
Okt 26, 2017 11:08:43 AM org.apache.openejb.OpenEJB$Instance <init>
INFORMATION: ********************************************************************************
Okt 26, 2017 11:08:43 AM org.apache.openejb.OpenEJB$Instance <init>
INFORMATION: openejb.home = D:\Programme\TomEE Plus
Okt 26, 2017 11:08:43 AM org.apache.openejb.OpenEJB$Instance <init>
INFORMATION: openejb.base = C:\data\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1
Okt 26, 2017 11:08:43 AM org.apache.openejb.cdi.CdiBuilder initializeOWB
INFORMATION: Created new singletonService org.apache.openejb.cdi.ThreadSingletonServiceImpl@65d6b83b
Okt 26, 2017 11:08:43 AM org.apache.openejb.cdi.CdiBuilder initializeOWB
INFORMATION: Succeeded in installing singleton service
Okt 26, 2017 11:08:43 AM org.apache.openejb.config.ConfigUtils searchForConfiguration
INFORMATION: Cannot find the configuration file [conf/openejb.xml].  Creating one at C:\data\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\conf\openejb.xml
Okt 26, 2017 11:08:43 AM org.apache.openejb.config.ConfigurationFactory init
INFORMATION: TomEE configuration file is 'C:\data\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\conf\openejb.xml'
Okt 26, 2017 11:08:43 AM org.apache.openejb.config.ConfigurationFactory configureService
INFORMATION: Configuring Service(id=Tomcat Security Service, type=SecurityService, provider-id=Tomcat Security Service)
Okt 26, 2017 11:08:43 AM org.apache.openejb.config.ConfigurationFactory configureService
INFORMATION: Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager)
Okt 26, 2017 11:08:43 AM org.apache.openejb.config.ConfigurationFactory configureService
INFORMATION: Configuring Service(id=My DataSource, type=Resource, provider-id=Default JDBC Database)
Okt 26, 2017 11:08:43 AM org.apache.openejb.config.ConfigurationFactory configureService
INFORMATION: Configuring Service(id=My Unmanaged DataSource, type=Resource, provider-id=Default JDBC Database)
Okt 26, 2017 11:08:43 AM org.apache.openejb.config.ConfigurationFactory configureService
INFORMATION: Configuring Service(id=My Singleton Container, type=Container, provider-id=Default Singleton Container)
Okt 26, 2017 11:08:43 AM org.apache.openejb.config.ConfigurationFactory configureService
INFORMATION: Configuring Service(id=My Stateful Container, type=Container, provider-id=Default Stateful Container)
Okt 26, 2017 11:08:43 AM org.apache.openejb.config.ConfigurationFactory configureService
INFORMATION: Configuring Service(id=My Stateless Container, type=Container, provider-id=Default Stateless Container)
Okt 26, 2017 11:08:43 AM org.apache.openejb.config.DeploymentsResolver loadFrom
WARNUNG: File error: <Deployments dir="apps/"> - Does not exist: C:\data\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\apps
Okt 26, 2017 11:08:43 AM org.apache.openejb.util.OptionsLog info
INFORMATION: Using 'openejb.deployments.classpath=false'
Okt 26, 2017 11:08:43 AM org.apache.openejb.assembler.classic.Assembler createRecipe
INFORMATION: Creating TransactionManager(id=Default Transaction Manager)
Okt 26, 2017 11:08:43 AM org.apache.openejb.assembler.classic.Assembler createRecipe
INFORMATION: Creating SecurityService(id=Tomcat Security Service)
Okt 26, 2017 11:08:43 AM org.apache.openejb.assembler.classic.Assembler createRecipe
INFORMATION: Creating Resource(id=My DataSource)
Okt 26, 2017 11:08:50 AM org.apache.catalina.core.StandardContext listenerStart
SCHWERWIEGEND: Exception sending context initialized event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener
java.lang.NoClassDefFoundError: javax/faces/application/ResourceHandlerWrapper
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:411)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1204)
    at org.apache.tomee.catalina.TomEEWebappClassLoader.loadClass(TomEEWebappClassLoader.java:204)
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at org.apache.myfaces.shared.util.ClassUtils.classForName(ClassUtils.java:187)
    at org.apache.myfaces.shared.util.ClassUtils.simpleClassForName(ClassUtils.java:213)
    at org.apache.myfaces.shared.util.ClassUtils.buildApplicationObject(ClassUtils.java:547)
    at org.apache.myfaces.shared.util.ClassUtils.buildApplicationObject(ClassUtils.java:519)
    at org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:733)
    at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:595)
    at org.apache.myfaces.webapp.AbstractFacesInitializer.buildConfiguration(AbstractFacesInitializer.java:416)
    at org.apache.myfaces.webapp.Jsp21FacesInitializer.initContainerIntegration(Jsp21FacesInitializer.java:73)
    at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:172)
    at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:121)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4725)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5189)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: javax.faces.application.ResourceHandlerWrapper
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 37 more

Okt 26, 2017 11:08:50 AM sun.reflect.NativeMethodAccessorImpl invoke
SCHWERWIEGEND: One or more listeners failed to start. Full details will be found in the appropriate container log file
Okt 26, 2017 11:08:50 AM sun.reflect.NativeMethodAccessorImpl invoke
SCHWERWIEGEND: Context [] startup failed due to previous errors

The server is empty and if I add an application, I just get the NoClassDefFoundError two times. Does anyone know how to solve this problem. If anything is missing please let me know.


Solution

  • I think I solved my problem. I had a jar in my %Java_Home%\jre\lib\ext\ folder. This jar destroyed my ResourceHandlerWrapper. After removing the jar my server could start up normally.