06-24-2012 02:07 PM
I have an app say test 1.0 on my BB . Now i have built test 2.0 and I am trying to install the same on the BB . Basically trying to replace the version 1.0 with 2.0.
Some imp points:
1. Both project names are same-- built on eclipse..
2. Both built on same 5.0.
3.Both cod files /builds have same name.
So here's the problem.
Test 1.0 exists on BB. I connect the BB and load the build through Eclipse-- Works perfectly.. no problem.
But when I try to load through javaloader
There is some error, it exits the command prompt so soon that I am unable to read the error.
And when I try to load OTA
I get downloading failed, or 907 error on the BB.
Please let me know of a solution to this,as soon as you can , since its extemely urgent.
06-24-2012 07:28 PM
I suspect you have changed the 'signature' of some persisted class. Eclipse recognizes this and removes the previous application and the previous versions saved data. So you should be able to do the same - delete the old version and you will be able to install the new version.
If you want to be able to upgrade over the top, then don't change the signature of any persisted class.
Hope this helps.
06-25-2012 03:36 AM
To solve the problem, delete the "deliverables" folder of your project, Again sign the project using signature tools(Have u installed all 3 signature tools??).
Now load the project using eclipse option "Load project on device" option.
It will work for you.
06-25-2012 04:56 AM
Thanks Peter .
Yes i did change the key of the persisted class. And I have to upgrade it over the top.
If i revert it to the previous key my doubt is:
The data structure of the data bean has changed as in there are more attributes added to it.
Will it not create a problem if I use the same old key for persisted class?
It will take me a while to test this, I will let you know if this worked. Could you please clarify my doubt ?
06-25-2012 06:11 AM
06-25-2012 06:15 AM
Yes I have signed all files , it works fine when loaded on the BB by itslef. Only when I try to overwrite an existing version it creates the above mentioned problem
06-25-2012 08:44 AM
I am surprised it works on OS 7.0.
Changing the key you use is actually not relevant. The OS checks that the class used in currently persisted storage is the same as the one you are using now.
In your case I would do two things:
1) Copy your old Persisted class and give it a different class name. Swap all references to the old name to your new class. Then you leave your old class in your application, but it is not used anywhere. This will install correctly.
2) Change your new class so that it is possible to extend the class without changing the Signature. For example, you can add a Hashtable to the new class. Say you need to add a new text attribute. The obvious thing is to add a new String variable to the class, but that will stop the upgrade. Instead you just create a new Key and store the new attribute in the Hashtable. This is not using any new class variables, and so will upgrade OK. But you have an extra attribute.
I always have an IntHashtable in my persisted classes to do just this...
Hope this all makes sense.
06-25-2012 02:06 PM
that definately help me narrow down the problem in a way but it still persists. U are right,It is not working on OS 7 too.
THere were 2 builds.. test 1.0 and test 2.0. Test 2.0 was not replacing test 1.0. So going by the persistant store approach, I retained the same key and added extra attributes on data bean - let this version be 3.0.
3.0 replaced 2.0 on the fone perfectly.
Tried deleting attributes n made a 4.0. 4.0 replaced 3.0 perfectly.
But the problem with the original existing version of 1.0 and the latest 2.0 still persists .
whenever i try and replace 2.0 with 1.0 this is what happens:
I get this prompt as soon as i start the download:
"<Application2>" contains a module called "<module_name>". A module with that name already exists in the "<Application1>" application. If you proceed, "<Application1>" will be replaced by "<Application2>". Proceed?
I click on yes and after th entire download progess bar, it says download failed... details- 907 error.
I already checked this out : http://supportforums.blackberry.com/t5/Testing-and
Resolution 1 does not seem like a solution. 2 and 3 I am not able to relate to my situation here.
Please guide me.What am I missing here??