0

I am new to JavaEE and now trying to setup a project using Richfaces 4.x with Geronimo v3.

I just copy the source from richfaces showcases (here) but the page cannot function until I press Enter, seems the ajax / event is not working in my case.

There is a warning: The page /test.xhtml declares namespace http://richfaces.org/a4j and uses the tag a4j:ajax , but no TagLibrary associated to namespace. I am not sure why this warning.

I am using Eclipse Luna to build and deploy the application.

Library included:

Library included

I am not sure I choose the right combination of the technology, but finally I would aim to make the application run on WebSphere v8.5.5. Thanks.

Updates:

500 after adding Richfaces 4.2.3 as WEB-INF/lib

enter image description here

exception

javax.servlet.ServletException
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:229)
root cause

java.lang.reflect.InvocationTargetException
    sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    java.lang.reflect.Constructor.newInstance(Constructor.java:408)
    org.apache.myfaces.shared.util.ClassUtils.buildApplicationObject(ClassUtils.java:561)
    org.apache.myfaces.shared.util.ClassUtils.buildApplicationObject(ClassUtils.java:487)
    org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:542)
    org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:419)
    org.apache.myfaces.config.FacesConfigurator.update(FacesConfigurator.java:365)
    org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:111)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)

root cause

java.lang.NoClassDefFoundError: com/google/common/base/Function
    org.richfaces.resource.ResourceHandlerImpl.<init>(ResourceHandlerImpl.java:63)
    sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    java.lang.reflect.Constructor.newInstance(Constructor.java:408)
    org.apache.myfaces.shared.util.ClassUtils.buildApplicationObject(ClassUtils.java:561)
    org.apache.myfaces.shared.util.ClassUtils.buildApplicationObject(ClassUtils.java:487)
    org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:542)
    org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:419)
    org.apache.myfaces.config.FacesConfigurator.update(FacesConfigurator.java:365)
    org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:111)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)

If I include Mojarra 2.1.6 into WEB-INF/lib, eclipse cannot deploy.

Calvin
  • 21
  • 1
  • 7
  • You added RichFaces as user defined library instead of web library. So it doesn't end up in webapp's default runtime classpath. That is the problem. Is this acceptable as dupe? http://stackoverflow.com/questions/7005644/classnotfoundexception-when-using-user-libraries-in-eclipse-build-path – BalusC Jul 30 '15 at 09:57
  • I tried to add my the richfaces as deployment assembly, but I got 500 error then. – Calvin Jul 30 '15 at 10:44
  • 1
    Great, this indicates that it finally ended up in the runtime classpath. That 500 error is just an obvious consequence of an exception in the application, most likely caused by configuration or developer's mistake. Simply read server log to find the root cause so you can naildown and fix it. – BalusC Jul 30 '15 at 10:51

0 Answers0