Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sun emulator can't OTA my app from a remote web server

 
Daniel Moore
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,
I'm developing a MIDP1.0 application. I have installed the WTK2.0
succesfully on linux, and the application runs fine when I use the 'Run'
and 'Run via OTA' options. However, when I push the jad and jar files to
my web server, I have issues. When I run the emulator on the command line:
emulator -Xjam
and enter in the address to the jad file, it fails with the error 'No Midlet
Suites found. Check the URL to make sure it is correct'. I've verified
that I can download the jad file with a browser. And I can see the
emulator in the logs, getting the jad file.
I've also tried the IP address and I get the same error (and see the request in the logs).
I've tried increasing the verbosity level of the emulator, but either I
target the wrong area and don't get relevant information, or I turn on
-Xverbose:all and get way too much to see what's going wrong.
I've googled on this, but found not much. I've also looked through this:
OTA doc from Sun
Any ideas?
Dan
 
serge masse
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I were you, I would first make sure to use a later version of the WTK 2.0.
There are two later versions:
WTK20_01 = version 2.0.01
and
WTK 2.1 at http://java.sun.com/products/j2mewtoolkit/index.html
I use WTK20_01 myself but I will soon migrate to 2.1.
Also I would make sure that the web server is configured for the MIME type:
*text/vnd.sun.j2me.app-descriptor*.
For Apache you can modify the .htaccess file by adding a AddType definition for the MIME type.
http://javascriptkit.com/howto/htaccess9.shtml
hope this helps
keep us posted on your progress, I sure would like to know what is the problem.
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You cannot directly point to the jad file. Instead, you have to make a wml file that contains a link to the jad file, point your phone to the wml file and follow the link to OTA install the MIDlet.
 
B Rook
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I disagree. I've been working on this project with the original poster. It is not necessary to point to a .wml file to point to a .jad file. We have successfully installed on several devices by making a request to the .jad file alone.
 
serge masse
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Michael,
Why in this case is a *wml* file needed instead of an *html* file? In my tests with WTK20_01 the emulator creates an html file containing an href anchor pointing to the jad file.
Is it because it is a MIDP 1 MIDlet? Is it because most MIDP 1 decice have a WAP browser instead of an HTML one?
serge
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by serge masse:
Michael,
Why in this case is a *wml* file needed instead of an *html* file? In my tests with WTK20_01 the emulator creates an html file containing an href anchor pointing to the jad file.

Because wml is safer as not all phone browsers support xHTML but nearly everyone supports wml. If your phone supports HTML, then ".html" would work just fine.
cheers
Michael
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by B Rook:
I disagree. I've been working on this project with the original poster. It is not necessary to point to a .wml file to point to a .jad file. We have successfully installed on several devices by making a request to the .jad file alone.

Well, direct link to the jad file may work on *some* devices. But there are 150+ different J2ME devices out there. Not every one of them has the same OTA characteristics. My NexTel phone would only install jad files that I upload into its application manager web site.
You were having problems with WTK, right? I was trying o point out the way WTK works (and I think this was what the OTA recommendation says).
cheers
Michael
 
serge masse
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Man! this is a good forum.
 
Daniel Moore
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone.
What Michael suggested (creating a .html file that had a link to the .jad file) worked just fine for my version of WTK:
[moore@localhost WTK2.0]$ ./bin/emulator -version
J2ME Wireless Toolkit 2.0_01
Profile: MIDP-2.0
Configuration: CLDC-1.0
Thanks for all the help.
 
Longb Nguyen
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

It does not work with the live web server. When I enter "http://localhost:8080/j2me/HelloMIDlet.html" on my emulator, it works. However, when I enter "http://www.mydomain.com/j2me/HelloMIDlet.html", it does not work. It gives me "No MIDlet Suites found. Check the URL to make sure it is correct" message.

I have Tomcat 5.0.28 web server.

Any help or suggestion would be greatly appreciated. I've trying for almost a week without success. I've been searching all the forums, but could not find any solution.

Please, please, please help.

Best Regards,
Long B. Nguyen
 
Andrew Morrow
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just as note: the Sun OTA installer is quite picky.

http://developers.sun.com/mobility/midp/ttips/wtkota/

The web server has to support the jad and jar MIME types and the "MIDlet Suites" page must be HTML. As far as I can tell, it does not support an xHTML response such as those given at

http://www.mobilerated.com/doom-1310.html

http://www.mobilerated.com/balance-1305.html

To be even more annoying, even if I compose my own page to point to the Balance JAD file,

http://www.mobilerated.com/consumer/free/downloads/aab/1305/balance.jad

in this page

http://www.geocities.com/andrew_morrow62/midlet_suite.htm

it works OK, but pointing to an older JAD file such as

http://www.mobilerated.com/consumer/free/downloads/aab/1310/doom.jad

because of the older info in that JAD file. Of course, you can download the corresponding JAR file and load it locally on the Sun emulator, but how annoying. The Sun OTA tool should have tried to be more robust.
 
Andrew Morrow
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh, it seems that you can embed both *.jad and *.jar files into the HTML page. For the *.jad files, the Sun OTA installer can report the file size whereas it just takes the jar as-is.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic