Skip to main content

Another BlackBerry problem: getAppProperty

10 replies [Last post]
Anonymous

I've got another BlackBerry-related query.

In order to personalise each MIDlet, we add some values to a JAD
template on each request. I don't think this is particularly uncommon.

However, it seems that MIDlet.getAppProperty() on the Pearl is only able
to find properties held within the manifest file in the COD and not any
that are in the JAD alone. This is obviously contrary to the spec.

Has anyone else come up against this and know of a solution? I'm really
trying to avoid having to build a new JAD and COD pair for every
download request.

Cheers,
Kirwan

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
a san juan

This is the JVM error that shows up right before that dialog message:
http://www.blueboard.com/temporary/jvm_error_104.jpg

I think I'll have to do some big debugging, although the app runs fine on any other simulator :-(

Eric Giguere wrote: Is the application a MIDlet or a BlackBerry application? It makes a
difference.

Eric

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".
[att1.html]

Ludovic Dewailly

Hi,

I came across the same issue and posted a question on
blackberryforums.com. I was told that it's not possible because it seems
that the properties are stored in the cod file and any extra propety
added in jad is ignored.

For reference:
http://www.blackberryforums.com/developer-forum/74930-jad-properties-los
t.html

br,
Ludovic

-----Original Message-----
From: A mailing list for KVM discussion
[mailto:KVM-INTEREST@JAVA.SUN.COM] On Behalf Of Stefan Haustein
Sent: 10 May 2007 11:14
To: KVM-INTEREST@JAVA.SUN.COM
Subject: Re: Another BlackBerry problem: getAppProperty

Hi Kirwan,

as far as I know, the MIDP 2.0 spec requires that all custom JAD
properties are also present in the manifest, and the manifest takes
precedence. The reason is that in the case of signed MIDlets, only the
JAR contents can be trusted.

With the manifest one needs to be extra careful: empty lines usually
lead to undesired results (new group), and certain characters are not
allowed in keys (one of . and -, not sure at the moment).

Best regards,
Stefan

Kirwan Lyster wrote:
> I've got another BlackBerry-related query.
>
> In order to personalise each MIDlet, we add some values to a JAD
> template on each request. I don't think this is particularly uncommon.
>
> However, it seems that MIDlet.getAppProperty() on the Pearl is only
> able to find properties held within the manifest file in the COD and
> not any that are in the JAD alone. This is obviously contrary to the
spec.
>
> Has anyone else come up against this and know of a solution? I'm
> really trying to avoid having to build a new JAD and COD pair for
> every download request.
>
> Cheers,
> Kirwan
>
> ======================================================================
> =====
>
> To unsubscribe, send email to listserv@java.sun.com and include in the

> body of the message "signoff KVM-INTEREST". For general help, send
> email to listserv@java.sun.com and include in the body of the message
> "help".

========================================================================
===
To unsubscribe, send email to listserv@java.sun.com and include in the
body of the message "signoff KVM-INTEREST". For general help, send
email to listserv@java.sun.com and include in the body of the message
"help".
The information contained in this email is strictly confidential and for the use of the addressee only, unless otherwise indicated. If you are not the intended recipient, please do not read, copy, use or disclose to others this message or any attachment. Please also notify the sender by replying to this email or by telephone +44 (0)20 7896 0011 and then delete the email and any copies of it. Opinions, conclusions (etc.) that do not relate to the official business of this company shall be understood as neither given nor endorsed by it. IG Markets Limited and IG Index Plc are authorised and regulated by the Financial Services Authority and, in Australia, by the Australian Securities and Investments Commission.

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

Kirwan Lyster

Thanks. That's the answer I didn't want but did expect.

Looks like it'll have to be COD-building on the fly then. Great!

Ludovic Dewailly wrote:
> Hi,
>
> I came across the same issue and posted a question on
> blackberryforums.com. I was told that it's not possible because it seems
> that the properties are stored in the cod file and any extra propety
> added in jad is ignored.
>
> For reference:
> http://www.blackberryforums.com/developer-forum/74930-jad-properties-los
> t.html
>
>
> br,
> Ludovic
>
> -----Original Message-----
> From: A mailing list for KVM discussion
> [mailto:KVM-INTEREST@JAVA.SUN.COM] On Behalf Of Stefan Haustein
> Sent: 10 May 2007 11:14
> To: KVM-INTEREST@JAVA.SUN.COM
> Subject: Re: Another BlackBerry problem: getAppProperty
>
> Hi Kirwan,
>
> as far as I know, the MIDP 2.0 spec requires that all custom JAD
> properties are also present in the manifest, and the manifest takes
> precedence. The reason is that in the case of signed MIDlets, only the
> JAR contents can be trusted.
>
> With the manifest one needs to be extra careful: empty lines usually
> lead to undesired results (new group), and certain characters are not
> allowed in keys (one of . and -, not sure at the moment).
>
> Best regards,
> Stefan
>
>
> Kirwan Lyster wrote:
>
>> I've got another BlackBerry-related query.
>>
>> In order to personalise each MIDlet, we add some values to a JAD
>> template on each request. I don't think this is particularly uncommon.
>>
>> However, it seems that MIDlet.getAppProperty() on the Pearl is only
>> able to find properties held within the manifest file in the COD and
>> not any that are in the JAD alone. This is obviously contrary to the
>>
> spec.
>
>> Has anyone else come up against this and know of a solution? I'm
>> really trying to avoid having to build a new JAD and COD pair for
>> every download request.
>>
>> Cheers,
>> Kirwan
>>
>> ======================================================================
>> =====
>>
>> To unsubscribe, send email to listserv@java.sun.com and include in the
>>
>
>
>> body of the message "signoff KVM-INTEREST". For general help, send
>> email to listserv@java.sun.com and include in the body of the message
>> "help".
>>
>
> ========================================================================
> ===
> To unsubscribe, send email to listserv@java.sun.com and include in the
> body of the message "signoff KVM-INTEREST". For general help, send
> email to listserv@java.sun.com and include in the body of the message
> "help".
> The information contained in this email is strictly confidential and for the use of the addressee only, unless otherwise indicated. If you are not the intended recipient, please do not read, copy, use or disclose to others this message or any attachment. Please also notify the sender by replying to this email or by telephone +44 (0)20 7896 0011 and then delete the email and any copies of it. Opinions, conclusions (etc.) that do not relate to the official business of this company shall be understood as neither given nor endorsed by it. IG Markets Limited and IG Index Plc are authorised and regulated by the Financial Services Authority and, in Australia, by the Australian Securities and Investments Commission.
>
> ===========================================================================
> To unsubscribe, send email to listserv@java.sun.com and include in the body
> of the message "signoff KVM-INTEREST". For general help, send email to
> listserv@java.sun.com and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".
[att1.html]

a san juan

Anyone had this problem with Blackberry before?

I searched through web but could not find answer...

I used the Blackberry IDE on netbeans-created Jar/Jad files to create COD file and modify the JAD. because the app was a bit large I used winzip to open up the cod file and separate the two sub-cod files.

I uploaded the lot to our web server and then used the simulator browser to download the JAD/COD file, and everything installed fine, no errors.

However, even after rebooting, the application doe NOT show up in the application area, although it does show up in the OPTIONS --> ADVANCED -->APPLICATIONS

Anyone know what's going on? How do I run this? The app uses MMAPI, don't know whether that's the problem....

Thanks....

The jad is:

Manifest-Version: 1.0
MIDlet-Version: 1.0
RIM-COD-Creation-Time: 1183570883
RIM-COD-Module-Dependencies: net_rim_cldc
RIM-COD-SHA1-1: 5f 93 da 92 3a 92 65 49 48 5f 52 64 7d 5b 6b c2 b1 4b 74 28
RIM-COD-URL-1: helloOTA.cod
RIM-COD-Size-1: 57440
RIM-COD-SHA1-2: 9b 6f 10 89 67 83 41 42 92 af 71 74 c7 ac 02 ac 6a 37 63 04
RIM-COD-URL-2: voizpodOTA-1.cod
RIM-COD-Size-2: 32180
RIM-COD-Module-Name: hello
MIDlet-Name: HelloMidlet
MIDlet-1: Hello,/res/main_logo.png,hello.main.HelloMidlet
MIDlet-Vendor: Company LLC

Kirwan Lyster wrote: Thanks. That's the answer I didn't want but did expect.

Looks like it'll have to be COD-building on the fly then. Great!

Ludovic Dewailly wrote:
Hi,

I came across the same issue and posted a question on
blackberryforums.com. I was told that it's not possible because it seems
that the properties are stored in the cod file and any extra propety
added in jad is ignored.

For reference:
http://www.blackberryforums.com/developer-forum/74930-jad-properties-los t.html br, Ludovic -----Original Message----- From: A mailing list for KVM discussion =========================================================================== To unsubscribe, send email to listserv@java.sun.com and include in the body of the message "signoff KVM-INTEREST". For general help, send email to listserv@java.sun.com and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".
[att1.html]

Eric Giguere

Make sure the main cod file is marked as an application and not a
library. In the JDE, right click on the project file (.jdp) and select
"Properties". On the "Application" tab make sure it says "CLDC Application".

Eric
http://blackberry.synclastic.com

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

a san juan

Thanks Eric, but no go....

Here's the properties dialog box for the project:
http://www.blueboard.com/temporary/project_settings.jpg

I left everything blank except for the CLDC option...

I uploaded the jad file plus the 2 cod files to the server and then pointed the browser to the jad file...it downloaded and installed ok...i restarted the simulator, but the app did not show in the application area, although it was listed in the OPTIONS --> ADVANCED ---> APPLICATION area, and a module was also listed in the modules area.

Here is the jad file...

Manifest-Version: 1.0
MIDlet-Version: 1.0
MIDlet-Jar-Size: 104078
MicroEdition-Configuration: CLDC-1.1
MIDlet-Jar-URL: TestApp.jar
RIM-COD-Module-Dependencies: net_rim_cldc
RIM-COD-URL-1: testapp-1.cod
RIM-COD-SHA1-1: c7 09 7e 4a 7b 9a f7 09 67 b3 75 af c3 ce 51 f4 80 30 5b 02
RIM-COD-Size-1: 32180
RIM-COD-Module-Name: testapp
MIDlet-Name: TestApp
RIM-COD-Size: 57440
RIM-COD-Creation-Time: 1183599249
MIDlet-1: TestApp,/res/main_logo.png,testapp.main.TestAppMidlet
RIM-COD-URL: testapp.cod
RIM-COD-SHA1: 93 7e ef 28 df ec 24 d0 e4 f8 f4 dd a4 6c 9a 65 56 1e e4 18
MicroEdition-Profile: MIDP-2.0
MIDlet-Vendor: Test LLC

Here's the app area that does not show the app:
http://www.blueboard.com/temporary/application_area.jpg

Is there any way to run the thing from the OPTIONS --> ADVANCED --> APPLICATIONS menu?

Eric Giguere wrote: Make sure the main cod file is marked as an application and not a
library. In the JDE, right click on the project file (.jdp) and select
"Properties". On the "Application" tab make sure it says "CLDC Application".

Eric
http://blackberry.synclastic.com

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".
[att1.html]

Eric Giguere

Is the application a MIDlet or a BlackBerry application? It makes a
difference.

Eric

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

a san juan

ahhh...it's a midlet, made on netbeans....thanks

i changed it to Midlet, and added the midlet name...now the cod files seem to create an app icon...however, when i start it, i get this error:

"Error Starting testApp: Module testApp has verification error 2850 at offset 0fe8"

Now, why the heck should it have an error when i BUILT IT using the Blackberry IDE from JAR/JAD from netsuite and got no errors?

Eric Giguere wrote: Is the application a MIDlet or a BlackBerry application? It makes a
difference.

Eric

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".
[att1.html]

Stefan Haustein

Hi Kirwan,

as far as I know, the MIDP 2.0 spec requires that all custom JAD
properties are also present in the manifest, and the manifest takes
precedence. The reason is that in the case of signed MIDlets, only the
JAR contents can be trusted.

With the manifest one needs to be extra careful: empty lines usually
lead to undesired results (new group), and certain characters are not
allowed in keys (one of . and -, not sure at the moment).

Best regards,
Stefan

Kirwan Lyster wrote:
> I've got another BlackBerry-related query.
>
> In order to personalise each MIDlet, we add some values to a JAD
> template on each request. I don't think this is particularly uncommon.
>
> However, it seems that MIDlet.getAppProperty() on the Pearl is only able
> to find properties held within the manifest file in the COD and not any
> that are in the JAD alone. This is obviously contrary to the spec.
>
> Has anyone else come up against this and know of a solution? I'm really
> trying to avoid having to build a new JAD and COD pair for every
> download request.
>
> Cheers,
> Kirwan
>
> ===========================================================================
>
> To unsubscribe, send email to listserv@java.sun.com and include in the
> body
> of the message "signoff KVM-INTEREST". For general help, send email to
> listserv@java.sun.com and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

armand dos santos

Hi,

>as far as I know, the MIDP 2.0 spec requires that all custom JAD
>properties are also present in the manifest, and the manifest takes
>precedence. The reason is that in the case of signed MIDlets, only the
>JAR contents can be trusted.

It is not exactly what I understand from the MIDP2.0 spec. For customized
attribute, I think that the following rules (should) apply:

In untrusted mode:
(in JAD) & !(in JAR) => value(in JAD)
(in JAD) & (in JAR) => value(in JAD)
!(in JAD) & (in JAR) => value(in JAR)

in trusted mode:
(in JAD) & !(in JAR) => value(in JAD)
(in JAD) & (in JAR) => value(in JAD) == value(in JAR)? value(in JAR): error
(installation fails)
!(in JAD) & (in JAR) => value(in JAR)

Regards,
Armand

On 5/10/07, Stefan Haustein < sh@kobjects.org > wrote:
>
> Hi Kirwan,
>
> as far as I know, the MIDP 2.0 spec requires that all custom JAD
> properties are also present in the manifest, and the manifest takes
> precedence. The reason is that in the case of signed MIDlets, only the
> JAR contents can be trusted.
>
> With the manifest one needs to be extra careful: empty lines usually
> lead to undesired results (new group), and certain characters are not
> allowed in keys (one of . and -, not sure at the moment).
>
> Best regards,
> Stefan
>
>
> Kirwan Lyster wrote:
> > I've got another BlackBerry-related query.
> >
> > In order to personalise each MIDlet, we add some values to a JAD
> > template on each request. I don't think this is particularly uncommon.
> >
> > However, it seems that MIDlet.getAppProperty () on the Pearl is only
> able
> > to find properties held within the manifest file in the COD and not any
> > that are in the JAD alone. This is obviously contrary to the spec.
> >
> > Has anyone else come up against this and know of a solution? I'm really
> > trying to avoid having to build a new JAD and COD pair for every
> > download request.
> >
> > Cheers,
> > Kirwan
> >
> >
> ===========================================================================
> >
> > To unsubscribe, send email to listserv@java.sun.com and include in the
> > body
> > of the message "signoff KVM-INTEREST". For general help, send email to
> > listserv@java.sun.com and include in the body of the message "help".
>
> ===========================================================================
>
> To unsubscribe, send email to listserv@java.sun.com and include in the
> body
> of the message "signoff KVM-INTEREST". For general help, send email to
> listserv@java.sun.com and include in the body of the message "help".
>

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".
[att1.html]