View Single Post
Old 07-15-2008, 09:43 AM   #1 (permalink)
myworldntl
New Member
 
Join Date: Jul 2008
Model: none
PIN: N/A
Carrier: none
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Newb Help??? - Uncaught Exception/ NoSuchFile.Java...?

Please Login to Remove!

Hi,

I'm new to blackberry development, and also to Java, so fun here... lol

Anyway, im trying to make a basic data entry page for now, i've not got as far as posting/saving the data yet, as i cant even get it to display on the simulator screen due to the following error(s)

--
'Uncaught exception thrown' displays as the JDE window Title, a load of:
'source code is not available'

Are repetivly displayed line after line in a 'NoSuchFile.Java' window within the JDE...

Also in the debug window, this message is shown:
'CodeStore.DependencyList.buildModuleDependencyLis t() took 10 - [16]'

And eventually, if i step though enough 'source code is not available' errors, then the following error is displayed on the simulators screen:

Uncaught Exception: java.lang.NullPointerException

Please see my code below, perhaps there is something very obvious wrong with it...??


Code:
/*
 * Main_File.java
 *
 *  <your company here>, 2003-2005
 * Confidential and proprietary.
 */

package com.rim.samples.Simon_Test;

import net.rim.device.api.ui.*;
import net.rim.device.api.ui.component.*;
import net.rim.device.api.ui.container.*;
import net.rim.device.api.system.*;
import net.rim.device.api.i18n.*;



/*
 *
 * 
 */
public class Lombard extends UiApplication
{
        public static void main(String[] args)
        {
                //create a new instance of the application
                //and start the application on the event thread
                Lombard app = new Lombard();
                app.enterEventDispatcher();
        }

        public Lombard()
        {
                //display a new screen
                pushScreen(new LombardScreen());
        }
}


final class LombardScreen extends MainScreen
{
//declare variables for later use


//Client Name
private AutoTextEditField clientNameText;
//Age (for sales margin)
private EditField ageValue;
//Gender (for sales margin)
private ObjectChoiceField genderChoice;
//Product name
private AutoTextEditField prodNameText;
//Name
private ObjectChoiceField partnerNameChoice;
//Name
private AutoTextEditField partnerNameText;
//Address
private AutoTextEditField addressText;
//Telephone Number
private AutoTextEditField telNumberText;
//Can the investment to be in Goldlist?
private ObjectChoiceField goldlistChoice;
//Broker Initial Commission
private EditField initialCommValue;
//Allocation Rate
private EditField allocationRateValue;
//Bid/Offer Spread
private EditField bidOfferSpreadValue;
//Guaranteed Administration Charge
private EditField adminChargeValue;
//Selected Months - Guaranteed Administration Charge
private EditField monthsAdminChargeValue;
//Underlying asset charges (e.g. on mutual fund)A
private EditField assestChargeAValue;
//Underlying asset charges (e.g. on mutual fund)B
private EditField assestChargeBValue;
//Renewal Commission
private EditField renCommissionValue;
//Investment Advisory Fee
private EditField AdFeeValue;
//Establishment Charge
private EditField estChargeValue;
//Selected Months - Establishment Charge
private EditField monthsEstChargeValue;
//Selected Premium/Fund - Establishment Charge
private ObjectChoiceField premfunEstChargeChoice;
//Policy Fee
private EditField policyFeeValue;
//Surrender penalty (value not year dependent)
private EditField surrPenValue;
//Selected Months - Surrender penalty (value not year dependent)
private EditField monthsSurrPenValue;
//Selected Premium/Fund - Surrender penalty (value not year dependent)
private ObjectChoiceField premfunSurrPenChoice;
//Surrender Penalty at end of year t
private EditField surrPenEoyValue;
//% of Premium - Surrender Penalty at end of year t
private EditField perOfPremiumSurrPenEoyValue;
//Trailer fee to LIA (for sales margin check):
private EditField trailerFeeValue;
//Premium
private EditField premiumValue;
//Premium Currency
private ObjectChoiceField currencyChoice;
//Premium Frequency
private ObjectChoiceField premFreqChoice;
//Premium Term (only for non-single premium)
private EditField premTermValue;
//Partial Surrenders (only for single premium policies)
private EditField partialSurrValue;
//Taken As - Partial Surrenders (only for single premium policies)
private ObjectChoiceField takenAsPartialSurrChoice;



public LombardScreen()
        {
                //invoke the MainScreen constructor
                //super();

                //add a screen title
                LabelField title = new LabelField("Lombard Client Illustration System - Version 2.6",
                                LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);
                setTitle(title);
                
                LabelField header1 = new LabelField("Client Details");
                add(header1);

                
                //add a text label
                add(clientNameText);
                add(ageValue);
                
                
                String choices1[] = {"Male", "Female"};
                genderChoice = new ObjectChoiceField("Gender", choices1);
                add(genderChoice);
                
                
                LabelField header2 = new LabelField("Product Details");
                add(header2);
                

                
                
                //Product name
                add(prodNameText);

                LabelField header3 = new LabelField("IFA Details");
                add(header3);


                //Name
                String choices2[] = {"Partner 1", "Partner 2", "Partner 3", "Partner 4", "Partner 5", "Partner 6", "Partner 7", "Partner 8", "Partner 9", "Partner 10", "Partner 11", "Partner 12", "Partner 13", "Partner 14", "Other"};
                partnerNameChoice = new ObjectChoiceField("Name", choices2);
                                add(partnerNameChoice);
                //Name
                add(partnerNameText);
                //Address
                add(addressText);
                //Telephone Number
                add(telNumberText);

                LabelField header4 = new LabelField("Fund Details");
                add(header4);



                //Can the investment to be in Goldlist?
                String choices3[] = {"No", "Yes"};
                goldlistChoice = new ObjectChoiceField("Can the investment to be in Goldlist?", choices3);
                                add(goldlistChoice);
                                

                LabelField header5 = new LabelField("Charges");
                add(header5);
                
                
                //Broker Initial Commission
                add(initialCommValue);
                //Allocation Rate
                add(allocationRateValue);
                //Bid/Offer Spread
                add(bidOfferSpreadValue);
                //Guaranteed Administration Charge
                add(adminChargeValue);
                //Selected Months - Guaranteed Administration Charge
                add(monthsAdminChargeValue);
                //Underlying asset charges (e.g. on mutual fund)A
                add(assestChargeAValue);
                //Underlying asset charges (e.g. on mutual fund)B
                add(assestChargeBValue);
                //Renewal Commission
                add(renCommissionValue);
                //Investment Advisory Fee
                add(AdFeeValue);
                //Establishment Charge
                add(estChargeValue);
                //Selected Months - Establishment Charge
                add(monthsEstChargeValue);
                
                //Selected Premium/Fund - Establishment Charge
                String choices4[] = {"Premium", "Fund"};
                premfunEstChargeChoice = new ObjectChoiceField("Establishment Charge", choices4);
                add(premfunEstChargeChoice);
                
                //Policy Fee
                add(policyFeeValue);
                //Surrender penalty (value not year dependent)
                add(surrPenValue);
                //Selected Months - Surrender penalty (value not year dependent)
                add(monthsSurrPenValue);
                
                //Selected Premium/Fund - Surrender penalty (value not year dependent)
                String choices5[] = {"Premium", "Fund"};
                premfunSurrPenChoice = new ObjectChoiceField("Surrender penalty (value not year dependent)", choices5);
                add(premfunSurrPenChoice);
                
                //Surrender Penalty at end of year t
                add(surrPenEoyValue);
                //% of Premium - Surrender Penalty at end of year t
                add(perOfPremiumSurrPenEoyValue);
                //Trailer fee to LIA (for sales margin check):
                add(trailerFeeValue);


                LabelField header6 = new LabelField("Other Assumptions");
                add(header6);


                //Premium
                add(premiumValue);
                
                //Premium Currency
                String choices6[] = {"ARP", "ATS", "AUD", "BEF", "CAD", "CHF", "DEM", "DKK", "ESP", "EUR", "FIM", "GBP", "FRF", "GRD", "IEP", "ITL", "JPY", "LUF", "NLG", "NOK", "NZD", "PTE", "SEK", "USD", "ZAR"};
                currencyChoice = new ObjectChoiceField("Premium Currency", choices6);
                add(currencyChoice);

                //Premium Frequency
                String choices7[] = {"Single", "Monthly", "Quarterly", "Twice Yearly", "Annually"};
                premFreqChoice = new ObjectChoiceField("Premium Frequency", choices7);
                add(premFreqChoice);

                
                //Premium Term (only for non-single premium)
                add(premTermValue);
                //Partial Surrenders (only for single premium policies)
                add(partialSurrValue);
                
                
                //Taken As - Partial Surrenders (only for single premium policies)
                String choices8[] = {"Monthly", "Quarterly", "Twice Yearly", "Annually"};
                takenAsPartialSurrChoice = new ObjectChoiceField("", choices8);
                add(takenAsPartialSurrChoice);                
         }

        //override onClose() to display a dialog box
        //when the application is closed
        public boolean onClose()
        {
                Dialog.alert("Goodbye!");
                System.exit(0);
                return true;
                }

private MenuItem _closeItem = new MenuItem("Close", 200000, 10) {
                public void run()
                {
                        onClose();
                }
        };

        //override makeMenu to add the new menu items
        protected void makeMenu( Menu menu, int instance )
        {
                menu.add(_closeItem);
        }


}
Offline   Reply With Quote