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
Developer
Posts: 5,339
Registered: ‎09-20-2008
My Device: ***
My Carrier: ***

Re: Signed .code still generates unsigned error on device

csl and cso files are important and are using to determine keys to be used to sign your application.
Developer
Posts: 5,339
Registered: ‎09-20-2008
My Device: ***
My Carrier: ***

Re: Signed .code still generates unsigned error on device

Do not specify rim in your package names.

 

Package name along with class name makes the fully qualified class name that must be unique into one RIM JVM.

 

In case there is the same class with the same full qualified name the application will fail.

 

Make your package names unique.

 

Like that:

 

com.yourwebsite.yourapptitle.YourClass

 

 

Developer
Posts: 5,339
Registered: ‎09-20-2008
My Device: ***
My Carrier: ***

Re: Signed .code still generates unsigned error on device

Also as you are a newbie check this link:

 

http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&thread.id=13264&jump=true

 

there is helpful information for you.

 

Also I would recommend to read this very good book on Java: Thinking in Java, by Bruce Eckel

New Developer
Posts: 6
Registered: ‎05-28-2009
My Device: Not Specified

Re: Signed .code still generates unsigned error on device

Thanks for all your help.  I'll go and set the solution mark now.

 

-Ean

New Developer
Posts: 1
Registered: ‎10-08-2009
My Device: Not Specified

Re: Signed .code still generates unsigned error on device

Hello,
I'm new in Java programming. I'm trying to write a J2ME program on my Blackberry 8100 to search for Bluetooth devices. I try to run the program, but there exists an error on simulator. I guess that Simulator support no Bluetooth. I try to transfer this program on my Blackberry, and then comes an error “Error starting Bluetooth_probe: Unsigned module "Bluetooth_probe" may not contain classes in com.rim (except com.rim.samples), net.rim, net.blackberry, java or". Though I have already signed the program.

 

package man.blue_sample;


import java.io.IOException;
import java.util.Vector;
import javax.bluetooth.DeviceClass;
import javax.bluetooth.DiscoveryAgent;
import javax.bluetooth.DiscoveryListener;

import javax.bluetooth.LocalDevice;
import javax.bluetooth.RemoteDevice;
import javax.bluetooth.ServiceRecord;

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



public class BluetoothDevice extends UiApplication
{
    public static void main (String[] args)
    {
        BluetoothDevice app= new BluetoothDevice();
        app.enterEventDispatcher();
    }
    public BluetoothDevice()
    {
        pushScreen(new Bluetooth());
    }
}


final class Bluetooth extends MainScreen implements DiscoveryListener
{   
    Bluetooth listener = new Bluetooth();
    //Vektor für gefundene Geräte
    private static Vector vecDevices=new Vector();
    public Bluetooth()
    {
        super();
        LabelField title= new LabelField("Bluetooth Geräte Suchen");
        setTitle(title);
       
    }
//suchen Bluetooth Geräte
    public void DeviceDiscovery() 
    {
        try{
            LocalDevice localdevice= LocalDevice.getLocalDevice();
            //find devices
             DiscoveryAgent agent = localdevice.getDiscoveryAgent();
             agent.startInquiry(DiscoveryAgent.GIAC,listener);
        }catch (Exception e){
            System.out.println("Problen beim Finden anderer Geräte");
            System.out.println("Problem beim Finden anderer Bluetoothgeräte.");
            e.printStackTrace();
        }
    }
//speichern gefundene Geräte
    public void deviceDiscovered(RemoteDevice btDevice, DeviceClass cod)
    {
        try{
            System.out.println("Bluetooth Adresse: " + btDevice.getBluetoothAddress());
            System.out.println("Bluetooth Friendly Name: " + btDevice.getFriendlyName(true));
            //add the device to the vector
            if(!vecDevices.contains(btDevice))
            {
                vecDevices.addElement(btDevice);
            }
            //print all devices in vecDevices
              
        }catch (Exception e){
            System.out.println("Fehler bei Gerätentdeckung.");
            e.printStackTrace();
        }
    }
// Ausgabe der gefundenen Geräte
    public void DevicePrint ()
    {
        int deviceCount=vecDevices.size();
        if(deviceCount <= 0)
        {
              System.out.println("Kein Gerät gefunden .");
        }
        else
        {
            //print bluetooth device addresses and names in the format [ No. address (name) ]
            System.out.println("Bluetooth Devices: ");
            for (int i = 0; i <4; i++)
            {
                RemoteDevice remoteDevice=(RemoteDevice)vecDevices.elementAt(i);
               //System.out.println((i+1)+". "+remoteDevice.getBluetoothAddress()+" ("+remoteDevice.getFriendlyName(true)+")");
                try {
                       System.out.println((i+1)+". "+remoteDevice.getBluetoothAddress()+" ("+remoteDevice.getFriendlyName(true)+")");
                       
                } catch (IOException e) {
                    System.out.println("Problem bei der Anzeige der Geräte");
                    e.printStackTrace();
                }
            }
        }
    }
//Abschließen das Suchen
    //object used for waiting
    private static Object lock=new Object();
       
    public void inquiryCompleted(int discType)
    {
           synchronized(lock)
           {
               lock.notify();
           }
 
           switch (discType)
           {
                   case DiscoveryListener.INQUIRY_COMPLETED :
                       System.out.println("INQUIRY_COMPLETED");
                                     
                       break;
                   case DiscoveryListener.INQUIRY_TERMINATED :
                       System.out.println("INQUIRY_TERMINATED");
                      
                       break;
                   case DiscoveryListener.INQUIRY_ERROR :
                       System.out.println("INQUIRY_ERROR");
                                        
                       break;
                   default :
                       System.out.println("Unknown Response Code");
                      

                       break;
           }
    }
   

    public void serviceSearchCompleted(int transID, int respCode) {
        // TODO Auto-generated method stub
       
    }

    public void servicesDiscovered(int transID, ServiceRecord[] servRecord) {
        // TODO Auto-generated method stub
       
    }
   
}    

 

 

 

Can someone please tell me what steps are wrong or missing?

Thank you very much

Developer
Posts: 36
Registered: ‎02-06-2011
My Device: bold 9900
My Carrier: Vodacom

Re: Signed .code still generates unsigned error on device

I have the same problem and just cannot seem to solve it. There is also no much assistance on the error.

 

I have a simple HelloWorld application (jre v4.7) designed in BlackBerry Java Plug-in for Eclipse v1.3.0. I have optained the signing keys from RIM and signed the cod file. Application works fine on 9550 but when I load it to my 9520 (v5.0.0.743) I get the following error "Error starting HelloWorld: HelloWorld may not contain classes in com.rim, net.rim, net.blackberry, java, or javax packages"

I tried the following

1. Resign cod a hundred times.

2. Rebuild the application a hundred times.

3. Delete the .alx, .cod, .cso, .jad, .jar, .rapc files from the deliverables folder and from within eclipse

4. Created new projects with different names but the same code

 

Nothing worked. If there is anyone that can help. PLEASE.

 

Developer
Posts: 36
Registered: ‎02-06-2011
My Device: bold 9900
My Carrier: Vodacom

Re: Signed .code still generates unsigned error on device

Sorry Guys, I did not realise there was a second page to this post. After reading all of it, I changed my package name as suggested and my application is running on the 9520 divice.

 

I however have another problem. After the application is loaded on my 9520, when I start the applicaiton it bring up the PERMISSION SETTING, and I give trusted permissions.

 

When I start the application it will not start. It doesnt even give an error message. It only starts when I remove the battery and reboot the phone.

 

It also starts after I go to options-->applications-->permission and set the permissions manually to allow. Is there a way I can get my application to start right away without going thought these pains.

Highlighted
Regular Contributor
Posts: 67
Registered: ‎11-14-2010
My Device: 9900 7.0 PAQUETE 2395 (V7.0.0.579,PLATAFORMA 5.0.0.735)
My Carrier: MOVISTAR Venezuela

Re: Signed .code still generates unsigned error on device

I tried everything mentioned changing package name deleting all files but project and compiles mperfect sign no errors but when started it says before it was multiply defined also class in java all this started when i was mixing 3rd party applications in my program and i do not remember where is the call or file that arises the problem

debug messages

 

Starting ElRecreoGPS
Searching installed codfiles for alias 'net_rim_json_org'
Searching uninstalled codfiles for alias 'net_rim_json_org'
Module 'net_rim_json_org' not found.
Error starting ElRecreoGPS: Module 'net_rim_json_org' not found.
JVM: bklt @403156: timer
JVM: bklt[1] @403156: usrIdle 5, usrTime 30, usrAct 1
JVM: bklt[1] @403156: chkIdle 17, currTime 30
JVM: bklt @403156: setTimer 25
Starting ElRecreoGPS
Module 'ElRecreoGPS' has verification errors.
Error starting ElRecreoGPS: Module 'ElRecreoGPS' has verification errors.

Starting ElRecreoGPSSearching installed codfiles for alias 'net_rim_json_org'Searching uninstalled codfiles for alias 'net_rim_json_org'Module 'net_rim_json_org' not found.Error starting ElRecreoGPS: Module 'net_rim_json_org' not found.JVM: bklt @403156: timerJVM: bklt[1] @403156: usrIdle 5, usrTime 30, usrAct 1JVM: bklt[1] @403156: chkIdle 17, currTime 30JVM: bklt @403156: setTimer 25Starting ElRecreoGPSModule 'ElRecreoGPS' has verification errors.Error starting ElRecreoGPS: Module 'ElRecreoGPS' has verification errors.