java - GWT environment errors within ScheduledThreadPoolExecutor threads -


i trying write server-side component of gwt application should pull xml file every 3 minutes , keep hashtable date after parsing xml.

after research, set thread using scheduledthreadpoolexecutor

stationparser = new tflstationsparserthread(bikestations); scheduler.schedulewithfixeddelay(stationparser, 2, 180, seconds); 

the tflstationsparserthread has minimal constructor, , run() method

public void run() {     system.out.println("tflstationsparserthread run()");     stationparser.refreshstationdata(stations); } 

the stationparser gets data following command

httpresponse response = urlfetchservicefactory.geturlfetchservice().fetch(request); 

here problem: when .fetch() run within scheduledthreadpoolexecutor following error

com.google.apphosting.api.apiproxy$callnotfoundexception: api package 'urlfetch' or call 'fetch()' not found.     @ com.google.apphosting.api.apiproxy.makesynccall(apiproxy.java:98)     @ com.google.appengine.api.urlfetch.urlfetchserviceimpl.fetch(urlfetchserviceimpl.java:37)     @ couk.mtaylor.bikes.server.tflstationsparser.refreshstationdata(tflstationsparser.java:66)     @ couk.mtaylor.bikes.server.tflstationsparserthread.run(tflstationsparserthread.java:35)     ... 

if comment out schedulewithfixeddelay scheduler , call refreshstationdata directly no such issue.

this leads me believe thread missing required gwt libraries, beyond knowledge , cannot find solutions online helping.

why getting these gwt error messages within scheduled thread not when call method directly?

i cannot confirm this, think might gae's way of telling me not how threads in gae. code works fine if remove gae buildpath , stop using .fetch().

for i'm dropping idea of writing gae while more used java.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -