Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

<t:inputCalendar (getting a NoClassDefError

 
Ali Khalfan
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm trying to use tomahok's inputCalendar tag and I placed it in a jsp page:





when i run the jsp page however, i get the following stacktrace


deployed with moduleid = WebApplication2
Initializing Sun's JavaServer Faces implementation (1.2_04-b20-p03) for context '/WebApplication2'
log4j:WARN No appenders could be found for logger (org.apache.myfaces.webapp.filter.ServeResourcePhaseListener).
log4j:WARN Please initialize the log4j system properly.
phase(RESTORE_VIEW 1,com.sun.faces.context.FacesContextImpl@99bd71) threw exception: javax.faces.FacesException: java.lang.NoClassDefFoundError: org/apache/commons/el/Logger java.lang.NoClassDefFoundError: org/apache/commons/el/Logger
org.apache.myfaces.webapp.filter.ServeResourcePhaseListener.beforePhase(ServeResourcePhaseListener.java:106)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
phase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@99bd71) threw exception: java.lang.NoClassDefFoundError: Could not initialize class org.apache.myfaces.shared_tomahawk.config.MyfacesConfig Could not initialize class org.apache.myfaces.shared_tomahawk.config.MyfacesConfig
org.apache.myfaces.renderkit.html.util.ExtensionsPhaseListener.writeCodeBeforeBodyEnd(ExtensionsPhaseListener.java:129)
org.apache.myfaces.renderkit.html.util.ExtensionsPhaseListener.getCodeBeforeBodyEnd(ExtensionsPhaseListener.java:104)
org.apache.myfaces.renderkit.html.util.ExtensionsPhaseListener.getJavaScriptCodeAndStoreInRequest(ExtensionsPhaseListener.java:94)
org.apache.myfaces.renderkit.html.util.ExtensionsPhaseListener.afterPhase(ExtensionsPhaseListener.java:70)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:280)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
java.lang.NoClassDefFoundError: Could not initialize class org.apache.myfaces.shared_tomahawk.config.MyfacesConfig
at org.apache.myfaces.renderkit.html.util.AddResourceFactory.getInstance(AddResourceFactory.java:275)
at org.apache.myfaces.custom.calendar.HtmlCalendarRenderer.addScriptAndCSSResources(HtmlCalendarRenderer.java:368)
at org.apache.myfaces.custom.calendar.HtmlCalendarRenderer.renderPopup(HtmlCalendarRenderer.java:167)
at org.apache.myfaces.custom.calendar.HtmlCalendarRenderer.encodeEnd(HtmlCalendarRenderer.java:149)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:836)
at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChild(RendererUtils.java:420)
at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChildren(RendererUtils.java:401)
at org.apache.myfaces.renderkit.html.ext.HtmlGroupRenderer.encodeEnd(HtmlGroupRenderer.java:71)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:836)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:896)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:245)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:176)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)


any warriors on this one?
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ali Khalfan wrote:
java.lang.NoClassDefFoundError: org/apache/commons/el/Logger

That just means that the mentioned class is missing in the classpath. Add it (actually, the JAR file with it) to the classpath and the error message should disappear. As the package name already hints, it is part of the Apache Commons EL API which you can get from http://commons.apache.org/el
 
Ali Khalfan
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
genius
thanks

i needed the commons-el-1.0.jar
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome.

I was just translating the exception message -which on its turn should be fairly self-explaning if you look at it afterwards.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic