BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 03-24-2008, 04:52 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: May 2007
Location: Bulgaria
Model: none
PIN: N/A
Carrier: Mtel
Posts: 150
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Starts an application - problem !

Please Login to Remove!

I have an application! The source files are in packages like "com.mycompany....". The main application .java file is in out of that package tree, it is in the src directory. The application is starting and everything is ok. I decided to move the main .java file in the package "com.mycompany" and build the project again. The application is not starting firstly, and throws an exception, i don't know what exactly, because i catches the Exception objects. When i starts the application again, it starts all right. That is the same every time i build the application when the main .java file is not in the src folder. Do you know what is the problem? Does the blackberry devices/simulators (where i tested this strange behaviour) want the main .java file not to be in a package? Or there is a place in the .alx or .jad file to set the path to the main .java file ? Thanks !
Offline  
Old 03-24-2008, 05:07 AM   #2 (permalink)
Thumbs Must Hurt
 
Join Date: May 2007
Location: Bulgaria
Model: none
PIN: N/A
Carrier: Mtel
Posts: 150
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well, i am sorry about that, the problem is not there. The NonPersistableObjectException is thrown! But it will be interesting to know how the blackberry finds the main classes, as nowhere in the .alx or .jad file the path is specified.
Offline  
Old 03-24-2008, 10:10 AM   #3 (permalink)
Talking BlackBerry Encyclopedia
 
richard.puckett's Avatar
 
Join Date: Oct 2007
Location: Seattle, WA
Model: 9020
PIN: N/A
Carrier: T-Mobile
Posts: 212
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

rapc will use the first "main" method that it finds on your build classpath; if your "src" folder is on your build classpath then it will get picked up. Do you have another "main" method somewhere in your app or is "src" included in your classpath?

Your exception means that you're persisting an object that does not implement Persistable.
__________________
Do your homework and know how to ask a good question.
Offline  
Old 03-24-2008, 11:00 AM   #4 (permalink)
Thumbs Must Hurt
 
Join Date: May 2007
Location: Bulgaria
Model: none
PIN: N/A
Carrier: Mtel
Posts: 150
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well i fixed the problem. It was not because of that i moved the position of the main class. The problem was that i have a class that implements Persistable but the interface did not extends Persistable, where the problem was.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Victor Oxygen Regulator with Guard and Flash Arrestor
$54.99
Victor Oxygen Regulator with Guard and Flash Arrestor pictureAstro Flash / Lectric Lites Co. # LL800
$150.0
Astro Flash / Lectric Lites Co.   # LL800 pictureMars AE2431D5 Bill acceptor validator Flash Vending Pop Snack Cold Food 9300L
$39.99
Mars AE2431D5 Bill acceptor validator Flash Vending Pop Snack Cold Food 9300L pictureAllen Bradley 1747-M13 /A SLC500 5/03 5/4 5/05 Flash Memory Module EEPROM 64K
$44.0
Allen Bradley 1747-M13 /A SLC500 5/03 5/4 5/05 Flash Memory Module EEPROM 64K pictureLaser Flashlamp Kentek LNS-7.5HP 6mm OD 5.5" Arc Length strobe flash lamp 7.5" L
$149.95
Laser Flashlamp Kentek LNS-7.5HP 6mm OD 5.5






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.