Skip to main content

SVG Makeover app doesn't work!

4 replies [Last post]
colinmccormack
Offline
Joined: 2009-12-29

Hi,

I'm very interested in SVG for an App i'm thinking about, and i'd like to see SVG Makeover in full action.

However after resolving some issues after pulling down HEAD from the SVN repository for the phoneME stuff - The SVG Makeover app starts - but when i go to search for a coffee shop or whatever, it says:

ERROR: Error connecting to search service - Turning on DEMO MODE

java.lang.NullPointerException
at com.sun.me.web.sample.local.LocalSearchMidlet.readResource(LocalSearchMidlet.java:803)
at com.sun.me.web.sample.local.LocalSearchMidlet.search(LocalSearchMidlet.java:839)
at com.sun.me.web.sample.local.LocalSearchMidlet.commandAction(LocalSearchMidlet.java:192)
at org.netbeans.microedition.svg.SVGPlayer.commandAction(+26)
at javax.microedition.lcdui.Display$DisplayAccessor.commandAction(Display.java:2047)
at javax.microedition.lcdui.Display$DisplayManagerImpl.commandAction(Display.java:2893)
at com.sun.midp.lcdui.DefaultEventHandler.commandEvent(DefaultEventHandler.java:325)
at com.sun.midp.lcdui.AutomatedEventHandler.commandEvent(AutomatedEventHandler.java:667)
at com.sun.midp.lcdui.DefaultEventHandler$QueuedEventHandler.handleVmEvent(DefaultEventHandler.java:793)
at com.sun.midp.lcdui.DefaultEventHandler$QueuedEventHandler.run(DefaultEventHandler.java:692)

It then stays in a constant loop of 'searching' after i proceed to run in Demo Mode...

The problems i overcame:

The jars needed from the MobileAJAX project had to be copied manually from that folder into my own lib folder that i created - then the issues in Netbeans cleared.
Also i had to get Sony Ericsson 2.5.0.3 and not 2.5.0.1 beta - this meant a change in a build xml file to expect the 2.5.0.3.

This app works fine in LWUIT - so i'm guessing my internet connection is fine and proxy whatever settings are also. I presume they use the RESTful code, in fact i know they do as Shah from LWUIT accredited Terence Barr for this REST-spine of the LWUIT version...

Java version is 1.6.0_16
All the WTKs possible
Have Sony Ericsson 2.5.0.3 SDK

Please help me solve this issue - thanks a lot in advance

Col

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
colinmccormack
Offline
Joined: 2009-12-29

Hi,

I think i know what's the stopper now - the code references

SVGAnimatorWrapper from a netbeans.org namespace. this is deprecated - as seen in my build output - doh.

This page: http://wiki.netbeans.org/MobilityNewAndNoteworthyM10
says to change to SVGPlayer.

I've replaced SVGAnimatorWrapper in most of the place however LocalSearchMidlet.java in the SVGMakeover demo doesn't allow me to edit it! It's like it has a lock on it - checked the OS dir it's on and i have full rights to edit this .java file - this ever happen to anyone?

Cheers

COl

colinmccormack
Offline
Joined: 2009-12-29

Ok - i've solved the can-not-edit: SVGAnimatorWrapper problem

still isn't the issue

What i think now is there's no resultDemoData.txt file as expected in the code on the file system...:

Line 839 of LocalSearchMidlet.java:
String content = readResource("/res/resultDemoData.txt");

Any clue anyone?

Cheers

Col

colinmccormack
Offline
Joined: 2009-12-29

Ok i''ve 'fixed' it...

Actually posting to this forum is kinda like a half-assed pair programming effort, and like pair programming - it works!

Any, after all the stuff i went through i said - does the yahooapis stuff work? is it coming back with anything - so when the app builds up the yahooapis string for casting out to the net (pun intended, not really) - the query string was broken!

This in a normal browser:
http://local.yahooapis.com/LocalSearchService/V2/localSearch?output=json...

Came back with:
{"Error":{"Title":"The following errors were detected:","Message":["invalid value: appid"]}}

So the appid - was not being populated - low and behold in the code there was a TODO:

/* TODO: Get own APP ID for Yahoo Local and Maps APIs */
private static final String APPID = "";

So after one google (sorry yahoo) i found that the appid could be populated to this:

/* TODO: Get own APP ID for Yahoo Local and Maps APIs */
private static final String APPID = "YahooDemo";

And i re-ran my demo app - and it worked.

You guys are useless! i.e. you's probably aren't stuck inside on a saturday afternoon France vs Ireland on the telly in the RBS 6 Nations!

Good luck to yis!

(PS - am posting this war story from some other unfortunate to maybe read and gain knowledge from - also my debugger doesn't work like most debugging attempts...)

Message was edited by: colinmccormack

colinmccormack
Offline
Joined: 2009-12-29

Replying to set the tick : Yes, my question has been answered.