Return-Path: Delivered-To: apmail-shale-issues-archive@locus.apache.org Received: (qmail 67218 invoked from network); 14 Apr 2007 04:21:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Apr 2007 04:21:04 -0000 Received: (qmail 82140 invoked by uid 500); 14 Apr 2007 04:21:10 -0000 Delivered-To: apmail-shale-issues-archive@shale.apache.org Received: (qmail 82093 invoked by uid 500); 14 Apr 2007 04:21:10 -0000 Mailing-List: contact issues-help@shale.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@shale.apache.org Delivered-To: mailing list issues@shale.apache.org Received: (qmail 82080 invoked by uid 99); 14 Apr 2007 04:21:10 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Apr 2007 21:21:10 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Apr 2007 21:21:03 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4AAD6714071 for ; Fri, 13 Apr 2007 21:20:43 -0700 (PDT) Message-ID: <26873276.1176524443257.JavaMail.jira@brutus> Date: Fri, 13 Apr 2007 21:20:43 -0700 (PDT) From: "Craig McClanahan (JIRA)" To: issues@shale.apache.org Subject: [jira] Resolved: (SHALE-434) Shale Remoting throws NPE when FacesServlet is not found In-Reply-To: <31625291.1176493731367.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/struts/browse/SHALE-434?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Craig McClanahan resolved SHALE-434. ------------------------------------ Resolution: Fixed Fix Version/s: 1.1.0-SNAPSHOT Fixed in nightly build 20070414. Thanks for the patch! > Shale Remoting throws NPE when FacesServlet is not found > -------------------------------------------------------- > > Key: SHALE-434 > URL: https://issues.apache.org/struts/browse/SHALE-434 > Project: Shale > Issue Type: Bug > Components: Remoting > Affects Versions: 1.1.0-SNAPSHOT > Environment: All > Reporter: Ken Paulsen > Fix For: 1.1.0-SNAPSHOT > > > Shale Remoting looks for the FacesServlet, if it can't find it and throws a NPE on line #429 of MappingsHelper.java b/c name is null: > if (name.equals(servletName)) { > I see that I can work-a-round this issue by supplying a context-param, I tested this... it works. However, since the SWDP may impose shale on all apps, shale should not require apps that do this sort of thing to implement work-a-rounds. So I tested a fix that avoids the NPE, it also works. I also modified an existing log message in the Bundle.properies file to make it more clear (which interestingly did not seem to be used anywhere). > Please apply this patch to resolve this issue. > Thanks! > Ken > Index: MappingsHelper.java > =================================================================== > --- MappingsHelper.java (revision 528551) > +++ MappingsHelper.java (working copy) > @@ -408,6 +408,12 @@ > name = servletName; > } > } > + if (null == name) { > + if (log().isInfoEnabled()) { > + log().info(bundle.getString("xhtml.noServletMapping")); > + } > + return new String[0]; > + } > } > // Identify the URL patterns to which this servlet is mapped > Index: Bundle_no.properties > =================================================================== > --- Bundle_no.properties (revision 528618) > +++ Bundle_no.properties (working copy) > @@ -31,4 +31,4 @@ > xhtml.noMappings = "Mappings" instansen for denne applikasjonen er ikke konfigurert enn\u00E5 - sjekk tjener loggene for \u00E5 forsikre deg om at det ikke var oppstarts unntak. > xhtml.noMechanism = Ressurs mekanismen du har spesifisert er tom > xhtml.noResourceId = Ressurs identifikatoren du spesifiserte er tom > -xhtml.noServletMapping = "Mappings" instansen er ikke konfigurert for servlet tilknyttning(er) for javax.facesl.webapp.FacesServlet -- sjekk web.xml filen for \u00E5 forsikre deg om at denne servlet er deklarert og tilknyttet. > +xhtml.noServletMapping = "Mappings" instansen er ikke konfigurert for servlet tilknyttning(er) for javax.faces.webapp.FacesServlet -- sjekk web.xml filen for \u00E5 forsikre deg om at denne servlet er deklarert og tilknyttet. > Index: Bundle.properties > =================================================================== > --- Bundle.properties (revision 528618) > +++ Bundle.properties (working copy) > @@ -25,4 +25,4 @@ > xhtml.noMappings=The "Mappings" instance for this application has not yet been configured -- check your server logs to ensure there were no startup exceptions > xhtml.noMechanism=The resource mechanism you have specified is null > xhtml.noResourceId=The resource identifier you have specified is null > -xhtml.noServletMapping=The "Mappings" instance is not configured with the servlet mapping(s) for javax.facesl.webapp.FacesServlet -- check your web.xml file to make sure this servlet is declared and mapped > +xhtml.noServletMapping=The "Mappings" instance is not configured with the servlet mapping(s) for javax.faces.webapp.FacesServlet -- check your web.xml file to make sure this Servlet is declared and mapped, or that you have identified it with the "org.apache.shale.remoting.FACES_SERVLET_NAME" context-param. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.