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
Contributor
Posts: 13
Registered: ‎03-25-2011
My Device: bold 9000
My Carrier: STC

sqlite demo on the device

hi all, i am trying to run sqlite demo on my blackberry device, i register the keys then i load it to my device and when i run it gives me the following error "Uncaught exception: error decrypting header" ?? what should i do?
Contributor
Posts: 13
Registered: ‎03-25-2011
My Device: bold 9000
My Carrier: STC

Re: sqlite demo on the device

Guys no one know what's the problem is?

Developer
Posts: 77
Registered: ‎04-01-2011
My Device: Bold 9700
My Carrier: Rogers

Re: sqlite demo on the device

I had a similar problem. I used the demo to try and manage a Sqlite database, and then got that error when I tried to use it later.

 

For me, I didn't really need my database encrypted, so I commented out the "DatabaseFactory.encrypt()" call. I had to eventually recreate my DB from scratch, as it seemed to be encrypted and I had no way to "unencrypt" it.

 

I know this isn't a complete solution, but perhaps with some luck it will give you some ideas :-)

Contributor
Posts: 13
Registered: ‎03-25-2011
My Device: bold 9000
My Carrier: STC

Re: sqlite demo on the device

Did you remove the file  XYZ.key  from the project?
and what is Exactly cod that make it you make it comment

 

// Retrieve the code signing key for the XYZ key file
//CodeSigningKey codeSigningKey = CodeSigningKey.get(CodeModuleManager.getModuleHandle( "SQLiteDemo" ), "XYZ"); 
// try

// { // Encrypt and protect the database. If the database is already // encrypted, the method will exit gracefully.
// DatabaseFactory.encrypt(uri, new DatabaseSecurityOptions(codeSigningKey)); // }
// catch(DatabaseException dbe) 
// { 
//errorDialog("Encryption failed - " + dbe.toString());
// } 

 

and is it work  well with you?

 

Developer
Posts: 77
Registered: ‎04-01-2011
My Device: Bold 9700
My Carrier: Rogers

Re: sqlite demo on the device

Yes, I've commented out exactly the part that you have commented out.

 

I've also removed the keys from my project, although I don't know if that makes any difference if they aren't being used (ie you aren't calling DatabaseSecurityOptions).

 

I'm using this code regularly (although only in the simulator with Eclipse) and it's working fine.

Contributor
Posts: 13
Registered: ‎03-25-2011
My Device: bold 9000
My Carrier: STC

Re: sqlite demo on the device

yes it is work with me only in simulator but when i load the project to device it cause problem with the same massege do try to load your project in the blackberry device?
Developer
Posts: 77
Registered: ‎04-01-2011
My Device: Bold 9700
My Carrier: Rogers

Re: sqlite demo on the device

Not yet. The reason I removed the code-signing code was because I had problems with my code signing keys and they haven't been resolved, so I have no way of running it on the device yet.
Developer
Posts: 77
Registered: ‎04-01-2011
My Device: Bold 9700
My Carrier: Rogers

Re: sqlite demo on the device

Just wanted to update you that I was able to resolve my code signing issues and deploy to my device and it worked properly.
BlackBerry Development Advisor
Posts: 15,885
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: sqlite demo on the device

 


carol_smith wrote:
yes it is work with me only in simulator but when i load the project to device it cause problem with the same massege do try to load your project in the blackberry device?

This is explained in this post:  http://supportforums.blackberry.com/t5/Java-Development/SQLite-Demo-from-JDE-6-0/m-p/697365#M137159

 

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.