MIDlet installation problem - 906 invalid descriptor status report

  • Thread starter Farrukh K. Muhammad via JavaKB.com
  • Start date
F

Farrukh K. Muhammad via JavaKB.com

Hi,

I have been facing a problem, when installing/downloading the MIDlet-suite.
The descriptor attribute MIDlet-Install-Notify returns "906 invalid
descriptor" but the installation fails near the end of the progress bar (if
descriptor is invalide then the download should be cancelled).

the contents of JAD file are as follows

MIDlet-1: myMidlet, /icon.png, myMidlet
MIDlet-Icon: /icon.png
MIDlet-Jar-Size: 80159
MIDlet-Name: myMidlet
MIDlet-Vendor: Unknown
MIDlet-Jar-URL: http://url/NokiaSeries60/myMidlet.jar
MIDlet-Install-Notify: http://url:8380/installstatus?uId=5187423677150000
MIDlet-Version: 2.0
MicroEdition-Configuration: CLDC-1.0
MicroEdition-Profile: MIDP-1.0
ImageEnabled: 1
uId: 5187423677150000
Server-Request: http://url:8380
appId: 6
mModel: Nokia6600

Some of the unknown attributes are used by the midlet (e.g. "Server-
Request" = connecting to a remote server for downloading data, uId for
authentication etc) and are inserted into the JAD file at run time (by the
server) . The link to the application is sent to the user via WAP Push SI
message.

Now when the user opens the link in the message a request is made to the
server and the above file is generated. The installation begins as normal,
and starts asking installation specific choices (install myMIdlet? etc).
After allowing the midlet to be installed, the progress bar starts filling
up untill its almost finished, but near the end the mobile displays a
message "Unable to install. Invalid file!". On the other hand the Server
recieves "906 invalid descriptor" status report.

Now I assume that the problem is connected to the Manifest file inside the
MIDlet jar file. Coz when the server generates the attributes in the JAD
file, inconsistancy occurs between Manifest file and the Descriptor. The
resources found by googling state that it is not manditory except for
MIDlet-Name, MIDlet-Vendor, and MIDlet-Version attributes to be identical
which is the case.

I am deeply in need of help, please help me if any one knows what is the
reason this problem is occuring.

BTW the MIDlet-JAR-URL, and MIDlet-Install-Notify attributes are also set
by the server at run time.

please mail me at strategy[dot]vs[dot]logic[at]gmail[dot]com

thanking in anticipation
 
D

Darryl Pierce

Farrukh said:
Hi,

I have been facing a problem, when installing/downloading the MIDlet-suite.
The descriptor attribute MIDlet-Install-Notify returns "906 invalid
descriptor" but the installation fails near the end of the progress bar (if
descriptor is invalide then the download should be cancelled).

The I would think the problem is that the values in the JAD don't match
the values in your JAR's manifest file. Either that, or the actual
download size of the JAR has exceeded the specified length in the JAD file.

Now, based on the error, I'm going to assume that you're using a
SprintPCS phone. I'm also going to assume that you've tried recently to
download a JAR with the same filename as the one you're trying to
download now. This error is documented in the J2ME FAQ
<http://mcpierce.mypage.org/j2mefaq.html> along with ways around the
problem.

Now I assume that the problem is connected to the Manifest file inside the
MIDlet jar file. Coz when the server generates the attributes in the JAD
file, inconsistancy occurs between Manifest file and the Descriptor. The
resources found by googling state that it is not manditory except for
MIDlet-Name, MIDlet-Vendor, and MIDlet-Version attributes to be identical
which is the case.

Not mandatory, yes, but discrepancies aren't required to be tolerated
either. The code validating your manifest against your JAD may not care
whether they're the five required fields and may fail if the same field
shows up in two places but with different values. So, the best practice
is to make them *match* in both places, otherwise don't include them..

<snip>
 
F

Farrukh K. Muhammad via JavaKB.com

thanks for the response.

The MIDlet is developed for nokia series 60 devices, and i am using Nokia
6600. I have tried the solutions suggested at the J2ME FAQ but no luck.
However, I have just tried to the download and install the MIDlet with the
JAD file as generated by ktoolbar with out any alterations by the server,
and also compared the contents with the JAR's manifest file which was
positive match. But the whole installation process was repeated and still i
got the same invalid descriptor message.

I am runing out of brain cells... any other ideas
 
D

Darryl Pierce

Farrukh said:
thanks for the response.

The MIDlet is developed for nokia series 60 devices, and i am using Nokia
6600. I have tried the solutions suggested at the J2ME FAQ but no luck.
However, I have just tried to the download and install the MIDlet with the
JAD file as generated by ktoolbar with out any alterations by the server,
and also compared the contents with the JAR's manifest file which was
positive match. But the whole installation process was repeated and still i
got the same invalid descriptor message.

The problem is that Sprint caches the MIDlet suite. So, even though
you're downloading a new JAD file, it's trying to send you the first
version of the JAR that you downloaded, which is the one still in the
cache. So when you receive *that* JAR (and not your updated one), the
byte size of the JAR doesn't match the byte size in the JAD and you get
the 906 error message. That is specifically explained in the J2ME FAQ
along with the solution (rotating the name of the JAR file).
 
F

Farrukh K. Muhammad via JavaKB.com

hi,

I have been able to install the application successfully. The reason behind
all that problem was not concerning the Cache of the server or the
attribute miss match within the JAD and JAR's manifest files, but the
problem was related with the JAD and JAR file names.

The link given to the mobile was /Applications.jsp which used to identify
the device type and send the relavent jad file of the applications. It used
to work fine when inserted directly to the Mobile Browser, but when it came
to (WAP Push Service Indication) message, the mobile used to treat the
downloading the installing of applications differently. On finding the name
of JAD file to be Application.jsp and the name of the JAR file to be
MyMidlet.jar it used to send back a 906 invalid descriptor message.

So I constructed a servlet that responeds back without any name of the
content (servlet access path = http://url/app/; the /app/ is mapped to the
servlet performing the tasks), and now here i make the assumption that on
finding no names for the JAD file the JAM assumes the name to be the same
as the JAR file and installs successfully.

Thanks for the help...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top