Deploying MyFaces 2.2.8 on WildFly 8.2.0 - cdi

Environment :
JAVA EE 7
CDI
WildFly 8.2.0
MyFaces 2.2.8
Issue :
I am trying to run WildFly 8.2.0 with myFaces 2.2.8 as default JSF implementation.
Installion is completed . The details for this are on another SO question :
Installing Apache MyFaces 2 on WildFly 8.2.0
When my application war is deployed on WildFly 8.2.0 , the following exception is thrown and deployment doesn't complete.
Caused by: java.lang.ClassNotFoundException: org.apache.tomcat.InstanceManager from [Module "com.sun.jsf-impl:myfaces-2.2.8" from local module loader #736e9adb
(finder: local module finder #6d21714c (roots: C:\Users\xyz\wildfly-8.2.0.Final\modules,C:\Users\xyz\wildfly-8.2.0.Final\modules\system\layers\base))]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final]
at org.apache.myfaces.spi.impl.Tomcat7AnnotationInjectionProvider.initManager(Tomcat7AnnotationInjectionProvider.java:182)
at org.apache.myfaces.spi.impl.Tomcat7AnnotationInjectionProvider.postConstruct(Tomcat7AnnotationInjectionProvider.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_60]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_60]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_60]
at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_60]
at javax.faces.FactoryFinder.injectAndPostConstruct(FactoryFinder.java:415)
at javax.faces.FactoryFinder.newFactoryInstance(FactoryFinder.java:519)
at javax.faces.FactoryFinder._getFactory(FactoryFinder.java:361)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:225)
at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:186)
at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:131)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:203)
... 10 more
I have searched for the issue on web and found out same problem here http://www.hivmr.com/db/3jsapc8j3xz3js1dsasjxjpkx37379cm , but no solution has been found.
The issue can be described as :
1) MyFaces uses Tomcat7AnnotationInjectionProvider for annotation processing which requires org.apache.tomcat.InstanceManager which is not available.
2) One solution is to use CDIAnnotationDelegateInjectionProvider , but how to configure it in MyFaces is not known ?
3) How to hook MyFaces in WildFly so that JBOSS Weld can process annotations instead of MyFaces supplied class ?

Wildfly uses Mojarra as their implementation choice of JSF. To use MyFaces you can follow their installation steps explained here [1]
[1] https://developer.jboss.org/wiki/StepsToAddMyFacesSupportToWildFly

Related

Primefaces Extension 11 error [...] monacoeditor.EditorOptions not present

Serious error when running primefaces-extensions. From the message, it says that EditorOptions is not present:
SEVERE: java.lang.TypeNotPresentException: Type org.primefaces.extensions.model.monacoeditor.EditorOptions not present.
Log:
INFORMAÇÕES: Loading application compras done in 17.059 ms
INFORMAÇÕES: Using OmniFaces version 3.13
INFORMAÇÕES: Registering WebSocket filter for url pattern /*
INFORMAÇÕES: Initializing Soteria 1.1-b01.payara-p5 for context '/compras'
INFORMAÇÕES: Inicializando Mojarra |version.string| para o contexto '/compras'
GRAVE: java.lang.TypeNotPresentException: Type org.primefaces.extensions.model.monacoeditor.EditorOptions not present
at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:117)
at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125)
at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
at sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Reifier.java:68)
at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:138)
at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
at sun.reflect.generics.repository.ClassRepository.getSuperclass(ClassRepository.java:90)
at java.lang.Class.getGenericSuperclass(Class.java:777)
at org.jboss.weld.util.reflection.HierarchyDiscovery.discoverFromClass(HierarchyDiscovery.java:139)
at org.jboss.weld.util.reflection.HierarchyDiscovery.discoverTypes(HierarchyDiscovery.java:132)
at org.jboss.weld.util.reflection.HierarchyDiscovery.discoverFromClass(HierarchyDiscovery.java:139)
at org.jboss.weld.util.reflection.HierarchyDiscovery.discoverTypes(HierarchyDiscovery.java:113)
at org.jboss.weld.util.reflection.HierarchyDiscovery.<init>(HierarchyDiscovery.java:94)
at org.jboss.weld.util.reflection.HierarchyDiscovery.<init>(HierarchyDiscovery.java:87)
at org.jboss.weld.annotated.enhanced.TypeClosureLazyValueHolder.computeValue(TypeClosureLazyValueHolder.java:41)
at org.jboss.weld.annotated.enhanced.TypeClosureLazyValueHolder.computeValue(TypeClosureLazyValueHolder.java:31)
at org.jboss.weld.util.LazyValueHolder.get(LazyValueHolder.java:46)
at org.jboss.weld.annotated.slim.backed.BackedAnnotated.getTypeClosure(BackedAnnotated.java:27)
at org.jboss.weld.annotated.AnnotatedTypeValidator.validateAnnotated(AnnotatedTypeValidator.java:44)
at org.jboss.weld.annotated.AnnotatedTypeValidator.validateAnnotatedType(AnnotatedTypeValidator.java:62)
at org.jboss.weld.manager.BeanManagerImpl.getInjectionTargetFactory(BeanManagerImpl.java:1503)
at org.jboss.weld.manager.BeanManagerImpl.createInjectionTarget(BeanManagerImpl.java:1019)
at org.glassfish.weld.services.JCDIServiceImpl.injectManagedObject(JCDIServiceImpl.java:357)
at org.glassfish.faces.integration.GlassFishInjectionProvider.inject(GlassFishInjectionProvider.java:203)
at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:233)
at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:199)
at com.sun.faces.config.processor.RenderKitConfigProcessor.addRenderers(RenderKitConfigProcessor.java:291)
at com.sun.faces.config.processor.RenderKitConfigProcessor.process(RenderKitConfigProcessor.java:167)
at com.sun.faces.config.ConfigManager.lambda$initialize$1(ConfigManager.java:341)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:318)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:206)
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:5178)
at com.sun.enterprise.web.WebModule.contextListenerStart(WebModule.java:681)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5756)
at com.sun.enterprise.web.WebModule.start(WebModule.java:619)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:958)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:941)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:694)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1851)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1603)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:107)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:123)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:292)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:361)
at com.sun.enterprise.v3.server.ApplicationLifecycle.initialize(ApplicationLifecycle.java:623)
at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:335)
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:303)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:351)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:463)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:281)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:65)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2102)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:67)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1213)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1144)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: org.primefaces.extensions.model.monacoeditor.EditorOptions
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1819)
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1660)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:114)
... 61 more
INFORMAÇÕES: Running on PrimeFaces 11.0.0
INFORMAÇÕES: Running on PrimeFaces Extensions 11.0.2
Has anyone already found a solution to this problem?
Primefaces 11, Primefaces extension 11.0.2, Mojarra 2.3.14, Payara 5.2021.10.
This is due to the way Payara is scanning for classes. For some bizarre reason Payara seems to class load where other containers such as Jboss Wildfly do not and thus do not have this issue.
See issue: https://github.com/primefaces-extensions/primefaces-extensions/issues/718
There is an EASY solution...simply include the Monaco extension in your pom.xml and then Payara will be happy.
<dependency>
<groupId>org.primefaces.extensions</groupId>
<artifactId>resources-monacoeditor</artifactId>
<version>11.0.2</version>
</dependency>
That will make Payara work happily again.

Migration from Jboss 4.0.3SP1 to 4.0.4GA. Could not inherit from final class. Deployment failed:

I am trying to migrate from my .war application from JBoss 4.0.3 SP1 to 4.0.4 GA. I am not able to deploy the .war files here in JBoss 4.0.4 getting some VerifyError: Cannot inherit from final class which I don't get it when I deploy in my previous version JBoss. FYI, my application uses JSF for UI. Is there some library changes that does not work for the JSF in this 4.0.4 GA version or can someone tell me why my .war files are not getting deployed?
15:44:52,636 ERROR [MainDeployer] Could not create deployment: file:/C:/jboss-4.0.4.GA/server/default/deploy/bland.war/
java.lang.VerifyError: Cannot inherit from final class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247

Deploying a JSF webapp results in java.lang.ClassNotFoundException: javax.servlet.jsp.jstl.core.Config [duplicate]

This question already has answers here:
java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config
(2 answers)
Closed 7 years ago.
I get an error, when I started my JavaServer Faces application. On the browser I get following error:
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: javax/servlet/jsp/jstl/core/Config
javax.faces.webapp.FacesServlet.service(FacesServlet.java:229)
root cause
java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config
org.apache.myfaces.view.jsp.JspViewDeclarationLanguage.buildView(JspViewDeclarationLanguage.java:91)
org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:77)
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:241)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:199)
root cause
java.lang.ClassNotFoundException: javax.servlet.jsp.jstl.core.Config
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
org.apache.myfaces.view.jsp.JspViewDeclarationLanguage.buildView(JspViewDeclarationLanguage.java:91)
org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:77)
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:241)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:199)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.12 logs.
On my Eclipse IDE follwoing error:
Nov 19, 2013 8:37:17 PM org.apache.catalina.startup.Catalina start
Information: Server startup in 2518 ms
Nov 19, 2013 8:37:18 PM org.apache.catalina.core.StandardWrapperValve invoke
Schwerwiegend: Servlet.service() for servlet [Faces Servlet] in context with path [/de.xxx.jsf.first] threw exception [javax/servlet/jsp/jstl/core/Config] with root cause
java.lang.ClassNotFoundException: javax.servlet.jsp.jstl.core.Config
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
at org.apache.myfaces.view.jsp.JspViewDeclarationLanguage.buildView(JspViewDeclarationLanguage.java:91)
at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:77)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:241)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:199)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:395)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:250)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:166)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
How is this caused and how can I solve it?
java.lang.ClassNotFoundException: javax.servlet.jsp.jstl.core.Config
A ClassNotFoundException means that the specified class is missing in the runtime classpath. As the package name hints, it's part of JSTL.
JSF (more specifically, Facelets) has indeed a dependency on JSTL for the <c:xxx> tags. When JSF loads, it's implicitly also loading JSTL core taglib configuration. However, if it cannot be found, you'll get exactly this exception.
JSTL (and JSF!) is normally already provided out the box on Java EE container such as JBoss AS/EAP/WildFly, GlassFish, TomEE, WebLogic, etcetera. However, you're using Tomcat, which is a barebones JSP/Servlet container and doesn't ship with JSTL out the box. If upgrading to e.g. TomEE is not an option, you'd need to manuall supply JSTL along with the webapp, like as you did for JSF.
Just download jstl-1.2.jar and drop it in /WEB-INF/lib folder of your webapp, along with the JSF JAR(s).
See also:
Our JSTL wiki page
It seems you are missing lib.
check if JSTL 1.1 - jstl.jar is added in your classpath.
Add jstl maven dependency in pom.xml:
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>

java.lang.NoClassDefFoundError: javax/el/ELResolver when running SimpleHelloByEnteringName JSF example

I am new to JSF. I am using Tomcat 7.0.14 and trying to run SimpleHelloByEnteringName example but getting following errors in startup and at runtime
Startup Console message:
INFO: Deploying web application directory SimpleHelloByEnteringName
Jun 15, 2011 7:35:42 AM com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Mojarra 2.0.3 (FCS b03) for context '/SimpleHelloByEnteringName'
Jun 15, 2011 7:35:43 AM com.sun.faces.spi.InjectionProviderFactory createInstance
INFO: JSF1048: PostConstruct/PreDestroy annotations present. ManagedBeans methods marked with these annotations will have said annotations processed.
**Jun 15, 2011 7:35:44 AM com.sun.faces.config.processor.NavigationConfigProcessor addNavigationCasesForRule
WARNING: JSF1058: The resource referred to by to-view-id, 'result.jsp', for navigation from '/pages/inputname.jsp', does not start with '/'. This will be added for you, but it should be corrected.**
Jun 15, 2011 7:35:44 AM com.sun.faces.config.ConfigureListener$WebConfigResourceMonitor$Monitor <init>
INFO: Monitoring jndi:/localhost/SimpleHelloByEnteringName/WEB-INF/faces-config.xml for modifications
Jun 15, 2011 7:35:44 AM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["http-apr-8081"]
Jun 15, 2011 7:35:44 AM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["ajp-apr-8009"]
Jun 15, 2011 7:35:44 AM org.apache.catalina.startup.Catalina start
and runtime error when trying to run http://localhost:8081/SimpleHelloByEnteringName/
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/el/ELResolver
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:342)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause
java.lang.NoClassDefFoundError: javax/el/ELResolver
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
java.lang.ClassLoader.defineClass(ClassLoader.java:615)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
java.net.URLClassLoader.access$000(URLClassLoader.java:58)
java.net.URLClassLoader$1.run(URLClassLoader.java:197)
java.security.AccessController.doPrivileged(Native Method)
java.net.URLClassLoader.findClass(URLClassLoader.java:190)
sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229)
java.lang.ClassLoader.loadClass(ClassLoader.java:306)
java.lang.ClassLoader.loadClass(ClassLoader.java:295)
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
java.lang.ClassLoader.loadClass(ClassLoader.java:295)
java.lang.ClassLoader.loadClass(ClassLoader.java:247)
org.apache.jasper.runtime.JspFactoryImpl.getJspApplicationContext(JspFactoryImpl.java:220)
org.apache.jsp.index_jsp._jspInit(index_jsp.java:23)
org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:49)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:171)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:356)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause
java.lang.ClassNotFoundException: javax.el.ELResolver
java.net.URLClassLoader$1.run(URLClassLoader.java:202)
java.security.AccessController.doPrivileged(Native Method)
java.net.URLClassLoader.findClass(URLClassLoader.java:190)
sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229)
java.lang.ClassLoader.loadClass(ClassLoader.java:306)
java.lang.ClassLoader.loadClass(ClassLoader.java:247)
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
java.lang.ClassLoader.defineClass(ClassLoader.java:615)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
java.net.URLClassLoader.access$000(URLClassLoader.java:58)
java.net.URLClassLoader$1.run(URLClassLoader.java:197)
java.security.AccessController.doPrivileged(Native Method)
java.net.URLClassLoader.findClass(URLClassLoader.java:190)
sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229)
java.lang.ClassLoader.loadClass(ClassLoader.java:306)
java.lang.ClassLoader.loadClass(ClassLoader.java:295)
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
java.lang.ClassLoader.loadClass(ClassLoader.java:295)
java.lang.ClassLoader.loadClass(ClassLoader.java:247)
org.apache.jasper.runtime.JspFactoryImpl.getJspApplicationContext(JspFactoryImpl.java:220)
org.apache.jsp.index_jsp._jspInit(index_jsp.java:23)
org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:49)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:171)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:356)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.14 logs.
How is this problem caused and how can I solve it?
WARNING: JSF1058: The resource referred to by to-view-id, 'result.jsp', for navigation from '/pages/inputname.jsp', does not start with '/'. This will be added for you, but it should be corrected.
The warning is not relevant to the problem. JSF has already fixed it for you, but it is telling you that you should fix it yourself in the faces-config.xml.
java.lang.ClassNotFoundException: javax.el.ELResolver
This is however pretty serious. This can have several causes:
You are actually not running Tomcat 7.0 at all, but Tomcat 5.5 which is missing this class. Doublecheck it.
You have dropped a bunch of servletcontainer specific libraries such as el-api.jar, jsp-api.jar, etc of a different servletcontainer make/version (perhaps Tomcat 5.5?) in webapp's WEB-INF/lib or in Java's JRE/lib folder. Probably to overcome compilation problems. Moving/copying servletcontainer specific JARs around is the wrong solution. Undo it and remove them all.
Your web.xml is not declared conform at least the Servlet 2.5 specification. Since you mention to be using Tomcat 7.0, which is a Servlet 3.0 container, you should be declaring the web.xml conform Servlet 3.0:
<?xml version="1.0" encoding="UTF-8"?>
<web-app
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="WebApp_ID" version="3.0">
<!-- Your config here -->
</web-app>
Update: oh wait ... I googled on the "SimpleHelloByEnteringName" and I discovered that this is actually a Roseindia.net (shudder) example as presented here: Downloading and Installing "SimpleHelloByEnteringName" JSF Example. I would like to stress that this site is the worst Java EE learning resource on the interwebs. I strongly recommend to head to other resources.
Coreservlets.com JSF 2.0 tutorial
Java EE 6 tutorial - JSF
Mkyong.com JSF 2.0 tutorials
My JSF 2.0 tutorial with Eclipse and Glassfish
I had a similar problem when executing a Dynamic web project in Eclipse.
java.lang.NoClassDefFoundError: javax/el/ELResolver
Here the problem is the Classes you use in your project are not defined in the classpath. In my case, I had to add
el-api.jar
jsp-api.jar
servlet-api.jar
into my Tomcat's classpath under Bootstrap entries.
So, In your case, check whether, these 3 jar's are present in C:\Tomcat\lib directory. Add it to the classpath if not present.
Hope this solves your problem.

java.lang.NoClassDefFoundError: org/ajax4jsf/resource/InternetResourceBuilder

My application, which uses JSF 2 and Richfaces 3.3.3, and mojarra 2.0.2 works fine on Glassfish 3.1 , but whenever i port it on Tomcat 7.0.10, every time i get one or the other problem.
It started with failure to detect jsf_core.tld , followed by some JSF rendering issue and finally this one.
Lastly i found some which i m mentioning here and which i cannot find a way around to fix.
Mar 31, 2011 8:57:52 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! org/ajax4jsf/resource/InternetResourceBuilder
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:294)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4651)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5154)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5149)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Caused by: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! org/ajax4jsf/resource/InternetResourceBuilder
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:357)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:226)
... 8 more
Caused by: java.lang.NoClassDefFoundError: org/ajax4jsf/resource/InternetResourceBuilder
at org.ajax4jsf.renderkit.ChameleonRenderKitFactory.<init>(ChameleonRenderKitFactory.java:62)
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 javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:586)
at javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:472)
at javax.faces.FactoryFinder.access$400(FactoryFinder.java:139)
at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:796)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:306)
at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:294)
at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:213)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:338)
... 9 more
You've the RichFaces impl JAR file, but not the RichFaces API JAR in the runtime classpath.
The stacktrace is evidence of this:
Caused by: java.lang.NoClassDefFoundError: org/ajax4jsf/resource/InternetResourceBuilder
at org.ajax4jsf.renderkit.ChameleonRenderKitFactory.<init>(ChameleonRenderKitFactory.java:62)
The at org.ajax4jsf.renderkit.ChameleonRenderKitFactory line indicates that this particular class was successfully loaded and executed (otherwise it wouldn't have shown up as an at xxx in the stacktrace at all). This class is part of RichFaces impl JAR file. The InternetResourceBuilder is in turn part of the RichFaces API JAR file. This is apparently missing in the runtime classpath. At least, that's just exactly what the exception is telling us.
From the exception it seems that Richfaces cannot be found. Put the jar in your classpath (for Tomcat WEB-INF/lib or WEB-INF/classes) and try again.

Resources