4 Replies Latest reply on Jun 4, 2009 11:12 AM by Matt Kohanek

    all my richfaces imports all of a sudden underlined in red,

    Matt Kohanek Novice

      All of the org.richfaces imports are all of a sudden underlined in red, and of course any thing in the code that uses them. So of course my jsf pages that use these beans will not load. When i tried to load one I see:

      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: Servlet execution threw an exception
       org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
       org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
       org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
       org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
      
      
      root cause
      
      java.lang.Error: Unresolved compilation problems:
       The import org.richfaces cannot be resolved
       The import org.richfaces cannot be resolved
       The import org.richfaces cannot be resolved
       The import org.richfaces cannot be resolved
       The import org.richfaces cannot be resolved
       TreeNode cannot be resolved to a type
       TreeNode cannot be resolved to a type
       TreeNodeImpl cannot be resolved to a type
       TreeNodeImpl cannot be resolved to a type
       TreeNode cannot be resolved to a type
       TreeNodeImpl cannot be resolved to a type
       TreeNode cannot be resolved to a type
       NodeSelectedEvent cannot be resolved to a type
       HtmlTree cannot be resolved to a type
       HtmlTree cannot be resolved to a type
       TreeNode cannot be resolved to a type
       TreeNode cannot be resolved to a type
       TreeNode cannot be resolved to a type
       TreeNode cannot be resolved to a type
       TreeNode cannot be resolved to a type
       TreeNode cannot be resolved to a type
      
       deviceContainer.SimpleTreeBean.<init>(SimpleTreeBean.java:16)
       sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
       sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
       sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
       java.lang.reflect.Constructor.newInstance(Constructor.java:513)
       java.lang.Class.newInstance0(Class.java:355)
       java.lang.Class.newInstance(Class.java:308)
       com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:186)
       com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:106)
       com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:368)
       com.sun.faces.mgbean.BeanManager.create(BeanManager.java:222)
       com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:86)
       javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
       com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
       org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:61)
       org.apache.el.parser.AstValue.getValue(AstValue.java:107)
       org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
       com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
       javax.faces.component.UIData.getValue(UIData.java:609)
       org.ajax4jsf.component.UIDataAdaptor.getValue(UIDataAdaptor.java:1644)
       org.richfaces.component.UITree.createDataModel(UITree.java:679)
       org.ajax4jsf.component.UIDataAdaptor.getExtendedDataModel(UIDataAdaptor.java:621)
       org.ajax4jsf.component.UIDataAdaptor.setRowKey(UIDataAdaptor.java:339)
       org.richfaces.renderkit.TreeRendererBase.writeContent(TreeRendererBase.java:660)
       org.richfaces.renderkit.TreeRendererBase.encodeChildren(TreeRendererBase.java:601)
       javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
       javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
       javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
       javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
       javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
       javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
       com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
       org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
       org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
       com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
       com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
       com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
       javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
       org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
       org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
       org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
       org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
      
      
      note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.
      
      
      --------------------------------------------------------------------------------
      
      Apache Tomcat/6.0.18


      Is my prject broken now, do I need to recreate everything, or is there a way to fix this...I really have no idea what is going on here.

      All I did was add in httpclient-commons jar to get some httpclient stuff working, restarted eclipse a few times, and upon about third time restarting this happens all of a sudden. ANy ideas?

        • 1. Re: all my richfaces imports all of a sudden underlined in r
          Matt Kohanek Novice

          I was able to retyp all the lines that were underlined in red, and they no longer had errors. But when I try to launch a page that uses the beans that were red, it still gives me the above error. For some reason the jsf pages are telling me I have deployment problems and my java code is saying otherwise

          • 2. Re: all my richfaces imports all of a sudden underlined in r
            Matt Kohanek Novice

            and now this

            SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
            com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED!
             Source Document: jndi:/localhost/NIRAP/WEB-INF/faces-config.xml
             Cause: Unable to find class 'com.sun.facelets.FaceletViewHandler'
             at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:213)
             at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:196)
             at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
             at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
             at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
             at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
             at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
             at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:627)
             at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
             at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
             at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
             at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
             at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
             at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
             at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
             at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
             at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
             at org.apache.catalina.core.StandardService.start(StandardService.java:516)
             at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
             at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:597)
             at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
             at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
            Caused by: com.sun.faces.config.ConfigurationException:
             Source Document: jndi:/localhost/NIRAP/WEB-INF/faces-config.xml
             Cause: Unable to find class 'com.sun.facelets.FaceletViewHandler'
             at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:248)
             at com.sun.faces.config.processor.ApplicationConfigProcessor.setViewHandler(ApplicationConfigProcessor.java:382)
             at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:231)
             at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:108)
             at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:119)
             at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:108)
             at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:132)
             at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:203)
             ... 25 more
            Jun 3, 2009 10:45:58 AM org.apache.catalina.core.StandardConte


            man...

            • 3. Re: all my richfaces imports all of a sudden underlined in r
              Wolfgang Knauf Master

              Hi,

              where are your richfaces/facelet jars placed? Are they in WEB-INF\lib of your current project, or somewhere in the server?

              Best regards

              Wolfgang

              • 4. Re: all my richfaces imports all of a sudden underlined in r
                Matt Kohanek Novice

                I had been messing around with JAR setup. I went ahead and made a new project though and it is better set up than this one was so Im just going to use that anyway,
                thanks for the reply though.
                It seems things are working better now that I put them all in the lib folder