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

Reply
New Developer
Posts: 32
Registered: ‎08-15-2011
My Device: 8520
My Carrier: vodacom

Building Worspace has encountered a problem.

Hi guys

 

I'm using BlackBerry_JDE_Plugin_Full.

 

I was altering some code on my project and wanted to debug it on my device then I get this error message

 

"Building Worspace has encountered a problem.

Errors occurred during the build

Errors running builder 'Java Builder' on project "my-projec

java.lang.IllegealArgumentException

Please help

Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Building Worspace has encountered a problem.

Hello LeloTheGreat,

 

If the project is not too large, are you able to provide source here? Also, have you attempted to create a new BlackBerry Project and only import the source .java files? This would ensure that any project-specific files are recreated (if they have been modified.)

 

Erik Oros

BlackBerry Development Advisor


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
New Developer
Posts: 32
Registered: ‎08-15-2011
My Device: 8520
My Carrier: vodacom

Re: Building Worspace has encountered a problem.

Hi Erik

 

Yes. I imported JSR-180 into my existing BlackBerry project. Is this maybe the issue?

Here's my code..

 

 

package com.Lelo;

import net.rim.device.api.ui.container.MainScreen;
import javax.microedition.io.*;


import java.io.*;

/**
 * A class extending the MainScreen class, which provides default standard
 * behaviour for BlackBerry GUI applications.
 */
public final class TuneIn_Screen extends MainScreen {

    String str = "testing udp";
    byte[] msg = str.getBytes();
    String peerAddress = "my.ip.address";
    String peerPort = "5030";
    String source_port = "5030";
    String url = "udp://" + peerAddress + ":" + peerPort + ";" + source_port+";deviceside=true";           
    System.out.println(url);
    
    {start(){
    /**
     * Creates a new TuneIn_Screen object
     * @param string
     */
        new Thread(){
            
            public void run()
            {
               try
                {
                   UDPDatagramConnection socketEnvio = (UDPDatagramConnection) Connector.open(url);
                    Datagram dgram = socketEnvio.newDatagram(msg, msg.length);
                    socketEnvio.send(dgram);
                }
            
        
        
    }
        
    
        
        
        
    public TuneIn_Screen()
    {
        
    
        // Set the displayed title of the screen       
        setTitle("Tune In");
        

    }
}




   

Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Building Worspace has encountered a problem.

Hello LeloTheGreat,

 

I've created a new BlackBerry project and brought your source in; and am seeing ten (10) immediate problems being reported by Eclipse which would prevent a successful build.

 

A few issues that stand out are:

 

System.out.println(url); is not inside of a function; but instead inside the scope of the Class's variable definitions. This would need to be moved inside of a function. In your case, inside of the Constructor would seem appropriate.

 

{start(){ appears to to defining a function however is not in a usable format. You will need to define the access (public, private, etc.) and return type (void, int, etc.)

 

In addition, in the same start() definition, there appear to be a number of opening brackets { however some of the closing brackets } are missing. The initial { before start() is also not necessary.

 

Finally, your try block is missing its corresponding catch. Sample of try/catch:

http://supportforums.blackberry.com/t5/Java-Development/How-can-I-catch-exception-on-addMenuItem-in/...

 

Just to confirm, is your Eclipse IDE reporting any problems when you try to build? Let me know if you have any questions.

 

Erik Oros

BlackBerry Development Advisor


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
New Developer
Posts: 32
Registered: ‎08-15-2011
My Device: 8520
My Carrier: vodacom

Re: Building Worspace has encountered a problem.

Hi Erik

 

I've deleted my project and started afresh. I get no more building workspace problem.

 

My objective is to establish a connection to my sip servlet. Are you familiar with SIP?

I've imported the JSR-180 lib into my project and now working the examples.

Though my project doesn't start/launch on my Curve 8520, yet it's visible (the icon is there).

I've started a new thread on the subject, please check it out.

 

Thank you for your help Erik Smiley Happy