This is happening when there are no <Require> features, not when there is
nothing in the content section. It appears to be happening somewhere in
GadgetFeatureRegistry.getIncludedFeatures and / or the main gadget server
loop, but so far I haven't been able to come up with a test that reproduces
the behavior, and debugging the servlets directly is a pain.

Has anyone had any luck with the jetty launcher patch? I was unable to get
it to load any features.

On Thu, Feb 21, 2008 at 9:42 PM, Luciano Resende <[EMAIL PROTECTED]>
wrote:

> I took a quick look at the problem reported in SHINDIG-86, and I'm not
> sure if I'm taking a too simplistic step here, but should the fix for
> this be to check if contents actually have childs inside
> GadgetSpecParser ? Below is a quick diff for discussion, feel free to
> tell me the issue is much bigger then this :) and need further
> investigation.
>
>
> Index: src/main/java/org/apache/shindig/gadgets/GadgetSpecParser.java
> ===================================================================
> --- src/main/java/org/apache/shindig/gadgets/GadgetSpecParser.java
>  (revision 630088)
> +++ src/main/java/org/apache/shindig/gadgets/GadgetSpecParser.java
>  (working copy)
> @@ -322,14 +322,17 @@
>       Node viewNode = attrs.getNamedItem("view");
>       String viewStr = (viewNode == null) ? "" : viewNode.getNodeValue();
>       String[] views = viewStr.split(",");
> -      Node child = content.getFirstChild();
> -      String contentData = content.getTextContent();
> -      if (contentData.length() > 0) {
> -        for (String view : views) {
> -          spec.addContent(view, contentData);
> -        }
> -      } else {
> -        throw new SpecParserException("Empty or malformed <Content>
> section!");
> +
> +      if (content.hasChildNodes()) {
> +         Node child = content.getFirstChild();
> +          String contentData = content.getTextContent();
> +          if (contentData.length() > 0) {
> +            for (String view : views) {
> +              spec.addContent(view, contentData);
> +            }
> +          } else {
> +            throw new SpecParserException("Empty or malformed
> <Content> section!");
> +          }
>        }
>     }
>   }
>
>
> On Thu, Feb 21, 2008 at 5:16 PM, Kevin Brown <[EMAIL PROTECTED]> wrote:
> > This is a known issue. Current workaround is to require some arbitrary
> >  feature.
> >
> >  On Thu, Feb 21, 2008 at 2:50 PM, Phillip Rhodes <
> [EMAIL PROTECTED]>
> >  wrote:
> >
> >
> >
> >  > Bruno Bowden wrote:
> >  > > I'm also looking in to this:
> >  > >   https://issues.apache.org/jira/browse/SHINDIG-86
> >  >
> >  >
> >  > Aaah, OK.  Thanks for pointing that out.  At least I know
> >  > it's not just me now.  :-)
> >  >
> >  >
> >  > TTYL,
> >  >
> >  >
> >  > --
> >  > Phillip Rhodes
> >  > Chief Architect - OpenQabal
> >  > https://openqabal.dev.java.net
> >  > LinkedIn: http://www.linkedin.com/in/philliprhodes
> >  >
> >
> >
> >
> >  --
> >  ~Kevin
> >
> >  If you received this email by mistake, please delete it, cancel your
> mail
> >  account, destroy your hard drive, silence any witnesses, and burn down
> the
> >  building that you're in.
> >
>
>
>
> --
> Luciano Resende
> Apache Tuscany Committer
> http://people.apache.org/~lresende <http://people.apache.org/%7Elresende>
> http://lresende.blogspot.com/
>



-- 
~Kevin

If you received this email by mistake, please delete it, cancel your mail
account, destroy your hard drive, silence any witnesses, and burn down the
building that you're in.

Reply via email to