From: Alistair Y. <ali...@sm...> - 2005-07-13 20:52:15
|
> [template-compiler] Error(s) found with > "style_default/default/applettop.html": > [template-compiler] Technical error trying to insert iteractive item. got that without the patch. With the patch I couldn't get that far as it barfed on style_0/recycler/main.html instead. Without the patch, removing the localised literal fixed the problem. However, it shouldn't have been localised in the first place. This is what I meant by #define. I should have said enumeration. The template is calling Facility and passing what is essentially an enum to get the Facility method to do something. >> I'm getting a NullPointerException for style_0/recycler/main.html when > Is this with my patch applied? yes > I don't see the NPE. sorry, I sort of hacked my way into it - XmlTemplate.compileCall() catche= s a RuntimeException, which turns out to be the NPE > So you hardcode the resource > properties in the .java file that the compiler produces? yes. There was a debate ages ago whether to substitute a <localise> element with the actual text or write code into the template class to dynamically call the Localiser. We choose the dynamic method as that lets you update the properties file without recompiling the template. > Although if I set the build not to compile templates I was getting the > same error when Bodington was deployed localy. interesting. Ant has deployed it ok here. It's localised as we had problems with the Localiser and whitespace, which we've fixed. The literals are being localised ok here. Ant doesn't have your patch though. > Are you on Jabber or IRC? nope! never got that far! playing with the cat just now :) Maybe I'll have more ideas by the morning. Thanks for looking into it. Alistair --=20 Alistair Young Senior Software Engineer UHI@Sabhal M=F2r Ostaig Isle of Skye Scotland > Alistair Young wrote: >> Thanks Mathew, >> >> I copied this into my tree with no effect. I'm not convinced the probl= em >> lies here. Template compilation used to work. I think it was using the >> bat >> file before. It's using an ant task now. > > Ok. But with an up to date checkout of bodington HEAD (without my patch= ) > do you see this error when attempting to compile the templates through > the ant task? > > [template-compiler] Compiling 459 templates to > /home/buckett/workspace/bodington/build/bodington/WEB-INF/template_clas= ses > [template-compiler] Error(s) found with > "style_default/default/applettop.html": > [template-compiler] Technical error trying to insert iteractive item. > >> I'm getting a NullPointerException for style_0/recycler/main.html when >> it >> XmlTemplate tries to compile: >> <literal type=3D"String"></literal> >> There isn't any localisation in this template. > > Is this with my patch applied? > >> The lack of a string causes the exception. Which leads me to think tha= t: >> <literal type=3D"String"><localise id=3D"enter.website" /></literal> >> in style_default/default/login_anon.html >> has the same problem - I verified it has a NullPointerException too. > > I don't see the NPE. > >> XmlTemplate.getCharacterData() replaces the <localise> element in a >> <literal> element with the text that the Localiser returns. > > Ok thanks, I hadn't spotted that, thanks. So you hardcode the resource > properties in the .java file that the compiler produces? > >> This seems to point to the Localiser not being either available or not >> finding the properties file when XmlTemplate is invoked from the ant >> task. > > Although if I set the build not to compile templates I was getting the > same error when Bodington was deployed localy. > >> That wouldn't explain why <literal type=3D"String"></literal> causes a >> NullPointerException now. It didn't before. > > Indeed. > >> any ideas? > > I'm looking..... Are you on Jabber or IRC? > > -- > +--Matthew Buckett-----------------------------------------+ > | VLE Developer, Learning Technologies Group | > | Tel: +44 (0) 1865 283660 http://www.oucs.ox.ac.uk/ | > +------------Computing Services, University of Oxford------+ > > > ------------------------------------------------------- > This SF.Net email is sponsored by the 'Do More With Dual!' webinar > happening > July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dua= l > core and dual graphics technology at this free one hour event hosted by > HP, > AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar > _______________________________________________ > Bodington-developers mailing list > Bod...@li... > https://lists.sourceforge.net/lists/listinfo/bodington-developers > |