Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
New Developer
Posts: 9
Registered: ‎12-02-2008
My Device: Not Specified
Accepted Solution

Error: The "MIDlet-Version" attribute is not a valid version number

I am having a hard time configuring my .jad file for OTA downloads.  I am recieving the following error when I try to navigate to the jad file from the BlackBerry Browser. 

 

"Error:  Invalid manifest or application descriptor.   The "MIDlet-Version" attribute is not a valid version number."

 

 

The contents of my jad file are as follows:

 

Manifest-Version: 1.0
MIDlet-Version: 1.0.0
MIDlet-Jar-Size: 379217
RIM-COD-URL-2: EveryTrail-2.cod
MicroEdition-Configuration: CLDC-1.1
MIDlet-Jar-URL: EveryTrailBBerry.jar
RIM-COD-Module-Dependencies: net_rim_cldc,net_rim_os,net_rim_bbapi_invoke,net_rim_locationapi,net_rim_xml,net_rim_xml_org
RIM-COD-SHA1-2: 91 64 64 84 7b 51 06 43 e6 f6 da 73 e3 43 fc b4 ed 4e 9a 1c
RIM-COD-URL-1: EveryTrail-1.cod
RIM-COD-SHA1-1: da d9 42 24 bd a5 fd 3f f6 a6 fe a4 6e 91 2f 3a 1a d7 e7 62
RIM-COD-Size-2: 47788
RIM-MIDlet-Flags-1: 0
RIM-COD-Size-1: 62672
RIM-COD-Module-Name: EveryTrail
MIDlet-Name: EveryTrailBBerry
RIM-COD-Size: 67732
RIM-COD-Creation-Time: 1233537686
MIDlet-1: EveryTrail,../../../BlackBerry/EveryTrail/src/everytrail-logo-small.png,
RIM-COD-URL: EveryTrail.cod
RIM-COD-SHA1: 64 b7 3b 1e 71 97 28 42 4d 36 0b 7e f6 94 2f 72 83 77 cb 99
MicroEdition-Profile: MIDP-2.0
MIDlet-Vendor: GlobalMotion

 

 

I was having prior success with OTA but the version number was showing as 0.0 and the vendor "<unknown>".  I believe this problem arose when I clicked "Title Resource Available" in the Resources tab of the project's properties.  So far, no different value of version number that I have tried has proved successful.  Anyone have any ideas?  Thanks!

New Developer
Posts: 9
Registered: ‎12-02-2008
My Device: Not Specified

Re: Error: The "MIDlet-Version" attribute is not a valid version number

**Update:    By creating a new project with a different name and regenerating the cod and jad files, I have been able to get OTA download working again.  However, despite the fact that I set Version number and Vendor in the project properties neither of these values are making their way into the .jad file. Interestingly enough though, the text I entered into the 'Description' field does show up in the JDE autogenerated .jad file.

 

I am now hesitant to adjust the version number and vendor on the .jad file manually in case I end up in my original (much worse) situation of getting an 'invalid version number' error.  Does anyone have any insight as to the cause of this behavior?

 

Thanks!

 

BTW, I'm compiling with version 4.3.0.1r of the JDE.

Developer
Posts: 168
Registered: ‎11-01-2008
My Device: Galaxy S II
My Carrier: Meteor (Ireland)

Re: Error: The "MIDlet-Version" attribute is not a valid version number

I had the same problem. The .jad file for a project does not seem to get automatically regenerated during a build so I have pre-build step defined in all my projects that deletes the .jad file, thereby causing it to be regenerated afresh each time. You can define a pre-build step on the Build tab of the project properties dialog. You'll want something along the lines of:

 

cmd.exe /C del com\company\product\AppName.jad

 

Note that the command executes with its working directory set to the location of the workspace file rather than the project file, i.e. you must specify the path to the .jad file relative to that.

New Developer
Posts: 9
Registered: ‎12-02-2008
My Device: Not Specified

Re: Error: The "MIDlet-Version" attribute is not a valid version number

Thanks dmcc.  Implementing the pre-build .jad delete step has worked great. 

 

Cheers,

 

Paul

Developer
Posts: 56
Registered: ‎01-11-2009
My Device: Not Specified

Re: Error: The "MIDlet-Version" attribute is not a valid version number

David, Pablo,

 

Did you find out the source of the problem in the .jad file?

Having same problem and it did go away after I regenerated the .jad file.

 

But still wondering what the exact cause is?

 

Olaf

 

New Developer
Posts: 9
Registered: ‎12-02-2008
My Device: Not Specified

Re: Error: The "MIDlet-Version" attribute is not a valid version number

Sorry olubeck, I never figured it out.
New Developer
Posts: 2
Registered: ‎09-30-2009
My Device: Not Specified

Re: Error: The "MIDlet-Version" attribute is not a valid version number

All

Also having some issues getting my Hellow World WebIcon to be installed using OTA.  

 

Everything compiles fine but I have following when browsing directly to .jad file

 

Error: Invalid manifest or application descriptor

 

The MIDlet version attribute is not a valid version number.  Everything looks fine so I'm stuck as to how to proceed.

 

Any suggestions welcome.

Developer
Developer
Posts: 1,123
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook
My Carrier: Verizon

Re: Error: The "MIDlet-Version" attribute is not a valid version number

[ Edited ]
Can't really tell from your post, but from what I have experienced, if there is a space at the end of some lines then you get an error about an invalid property (Midlet-version is one that will throw this error). If you're editing the file by hand, you'll want to make sure each line ends with an EOL character.
Message Edited by CMY on 09-30-2009 06:36 PM
Developer
Developer
Posts: 21
Registered: ‎09-12-2009
My Device: Not Specified

Re: Error: The "MIDlet-Version" attribute is not a valid version number

I am having the same problem, and it's maddening.. I have started a new project from scratch, made a stripped down jad file, set the MIME types properly.. and I keep getting the MIDlet-Version error.. there are no spaces at the end of any lines in the jad file, I've tried making a jad file with windows CRLF and just LF.
New Contributor
Posts: 9
Registered: ‎04-06-2011
My Device: Bold 9000
My Carrier: Rogers

Re: Error: The "MIDlet-Version" attribute is not a valid version number

I changed the MIDlet-Version to 1.0.0.0

and magically everything works fine now.

 

BTW on my JDK it was inserting "Versioin 1.0"  ;D