Thanks Lance, for the time being I have it working with URIBuilder, so I'll just wait for the real issue to be fixed and move back to it.
On Thu, Jan 22, 2015 at 11:28 AM, Lance Java <lance.j...@googlemail.com> wrote: > Perhaps tapestry-offline could help > https://github.com/uklance/tapestry-offline > On 20 Jan 2015 09:24, "George Christman" <gchrist...@cardaddy.com> wrote: > >> I'm using T5 beta-25 and I have the following code and I'm noticing >> when the scheduler fires off my service, my PageRenderLinkSource does >> not work. If I manually fire it off through the admin with an >> actionlink, it works without issue. >> >> AppModule.class >> >> @Startup >> public static void initApplication(SchedulerService scheduler) { >> scheduler.init(); >> } >> >> SchedulerService.class >> >> executor.addJob(new CronSchedule("0 09 4 * * ?"), >> "Cleanup Listings", () -> { >> try { >> System.out.println("sitemap"); >> sitemap.buildSitemap(); >> } catch (JAXBException | IOException ex) { >> >> Logger.getLogger(SchedulerServiceImpl.class.getName()).log(Level.SEVERE, >> null, ex); >> } >> }); >> >> >> SitemapService.class >> >> private final PageRenderLinkSource linkSource; >> >> public SitemapImpl(PageRenderLinkSource linkSource) { >> this.linkSource = linkSource; >> } >> >> private void setSitemapXML(Class<?> clazz, UrlSet urlset, Object[] object) >> { >> SitemapXML siteMapXML = new SitemapXML(); >> System.out.println("link"); >> >> Link link = linkSource.createPageRenderLinkWithContext(clazz, >> object); >> System.out.println(link.toAbsoluteURI()); >> >> link.setSecurity(LinkSecurity.SECURE); >> siteMapXML.setChangefreq(ChangeFreq.ALWAYS.toString()); >> siteMapXML.setLoc(link.toAbsoluteURI()); >> siteMapXML.setPriority(0.5); >> urlset.getSitemaps().add(siteMapXML); >> } >> >> I'm seeing the following exception >> java.lang.NullPointerException: Unable to delegate method invocation >> to property 'request' of <Proxy for >> RequestGlobals(org.apache.tapestry5.services.RequestGlobals)>, because >> the property is null. >> >> Any idea why this isn't working? >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> -- George Christman CEO www.CarDaddy.com P.O. Box 735 Johnstown, New York --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org