6 Replies Latest reply on Jan 8, 2008 6:58 AM by Techie Exchange

    WAS: ResourceNotFoundException (no scripts loaded)

    Techie Exchange Newbie

      Hi,
      My application:
      Seam2+Richfaces 3.1.3 GA+JPA
      Websphere 6.1 (with fix pack)

      Application works fine but none of RichFaces/A4J scripts loaded.

      Obviously due to this none of JS function (like changing Tab, model panel etc.) works.

      See error trace:


      [04.01.08 15:37:45:984 CET] 00000021 WebApp E [Servlet Error]-[Faces Servlet]: org.ajax4jsf.resource.ResourceNotFoundException: Resource not registered : org.ajax4jsf.javascript.ImageCacheScript.seam
       at org.ajax4jsf.resource.ResourceBuilderImpl.getResource(ResourceBuilderImpl.java:393)
       at org.ajax4jsf.resource.ResourceBuilderImpl.getResourceForKey(ResourceBuilderImpl.java:337)
       at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:155)
       at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:144)
       at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:265)
       at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
       at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
       at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:766)
       at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:674)
       at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:498)
       at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)
       at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3276)
       at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)
       at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
       at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455)
       at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:113)
       at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:454)
       at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:383)
       at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:263)
       at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
       at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
       at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
       at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
       at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
       at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
       at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
       at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
       at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
       at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
      ...
      
      ....
      [04.01.08 15:39:09:437 CET] 00000022 WebApp E [Servlet Error]-[Faces Servlet]: org.ajax4jsf.resource.ResourceNotFoundException: Resource not registered : org.ajax4jsf.javascript.AjaxScript.seam
      
      [04.01.08 15:39:09:515 CET] 00000022 WebApp E [Servlet Error]-[Faces Servlet]: org.ajax4jsf.resource.ResourceNotFoundException: Resource not registered : org.ajax4jsf.javascript.PrototypeScript.seam
      
      [04.01.08 15:39:09:562 CET] 00000022 WebApp E [Servlet Error]-[Faces Servlet]: org.ajax4jsf.resource.ResourceNotFoundException: Resource not registered : org/richfaces/renderkit/html/scripts/browser_info.js.seam
      
      [04.01.08 15:39:09:531 CET] 00000022 WebApp E [Servlet Error]-[Faces Servlet]: org.ajax4jsf.resource.ResourceNotFoundException: Resource not registered : org/richfaces/renderkit/html/scripts/modalPanel.js.seam
      


      Here's my web.xml file:

      <?xml version="1.0" encoding="UTF-8"?>
      <web-app id="WebApp_ID" version="2.4"
       xmlns="http://java.sun.com/xml/ns/j2ee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
      
      
       <!-- WAS requires the filter to be mapped to a suffix, so can't use built in Seam filter -->
       <filter>
       <display-name>RichFaces Filter</display-name>
       <filter-name>richfaces</filter-name>
       <filter-class>org.ajax4jsf.Filter</filter-class>
       </filter>
      
       <filter-mapping>
       <filter-name>richfaces</filter-name>
       <servlet-name>Faces Servlet</servlet-name>
       <dispatcher>REQUEST</dispatcher>
       <dispatcher>FORWARD</dispatcher>
       <dispatcher>INCLUDE</dispatcher>
       </filter-mapping>
      
       <!-- Seam -->
      
       <listener>
       <listener-class>
       org.jboss.seam.servlet.SeamListener
       </listener-class>
       </listener>
      
       <filter>
       <filter-name>Seam Filter</filter-name>
       <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
       </filter>
      
       <filter-mapping>
       <filter-name>Seam Filter</filter-name>
       <url-pattern>/*</url-pattern>
       </filter-mapping>
      
       <servlet>
       <servlet-name>Seam Resource Servlet</servlet-name>
       <servlet-class>
       org.jboss.seam.servlet.SeamResourceServlet
       </servlet-class>
       </servlet>
      
       <servlet-mapping>
       <servlet-name>Seam Resource Servlet</servlet-name>
       <url-pattern>/seam/resource/*</url-pattern>
       </servlet-mapping>
      
      
       <!-- Faces Servlet -->
      
       <servlet>
       <servlet-name>Faces Servlet</servlet-name>
       <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
       <load-on-startup>1</load-on-startup>
       </servlet>
      
       <!-- Faces Servlet Mapping -->
      
       <servlet-mapping>
       <servlet-name>Faces Servlet</servlet-name>
       <url-pattern>*.seam</url-pattern>
       </servlet-mapping>
      
       <!-- JSF parameters -->
      
       <context-param>
       <param-name>org.richfaces.SKIN</param-name>
       <param-value>#{skinBean.skin}</param-value>
       </context-param>
      
       <context-param>
       <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
       <param-value>.xhtml</param-value>
       </context-param>
      
       <context-param>
       <param-name>facelets.DEVELOPMENT</param-name>
       <param-value>true</param-value>
       </context-param>
      
       <listener>
       <listener-class>
       com.sun.faces.config.ConfigureListener
       </listener-class>
       </listener>
      
       <welcome-file-list>
       <welcome-file>index.html</welcome-file>
       </welcome-file-list>
      
      
       <session-config>
       <session-timeout>10</session-timeout>
       </session-config>
      
       <security-constraint>
       <display-name>Restrict raw XHTML Documents</display-name>
       <web-resource-collection>
       <web-resource-name>XHTML</web-resource-name>
       <url-pattern>*.xhtml</url-pattern>
       </web-resource-collection>
       <auth-constraint />
       </security-constraint>
      
       <error-page>
       <error-code>404</error-code>
       <location>/error404.seam</location>
       </error-page>
      
      </web-app>
      


      I tried Ctrl+F5 and placing resource-config.xml inside WEB-INF/classes/META-INF but no succes.

      Please help me !

      Thanks