BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 09-06-2007, 12:07 AM   #1 (permalink)
New Member
 
Join Date: Sep 2007
Model: 8830
PIN: N/A
Carrier: sprint
Posts: 5
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default java.lang.StringBuilder: Warning!: No definition found

Please Login to Remove!

Hi all,

I was attempting to build a BBWeather from sourcecode.

while executing rapc.exe with:

"C:\Program Files\Research In Motion\BlackBerry JDE Component Package 4.2.1/bin/rapc.exe" -quiet import="C:\Program Files\Research In Motion\BlackBerry JDE Component Package 4.2.1/lib/net_rim_api.jar" library=C:\wrk\bbtools\bbweather\build\lib\BBWeat herIcons C:\wrk\bbtools\bbweather\build\BBWeatherIcons.rap c C:\wrk\bbtools\bbweather\build\lib\BBWeatherIcons .jar

i get the following errors:

java.lang.StringBuilder: Warning!: No definition found
org.bbweather.utils.IconUtils: Warning!: Reference to undefined class: java.lang.StringBuilder

along with numerous other similar errors

I've searched but there are no references to "StringBuilder" anywhere in the project.

any ideas?
Offline  
Old 09-06-2007, 01:55 AM   #2 (permalink)
Thumbs Must Hurt
 
Join Date: Jun 2007
Location: Bangladesh
Model: 8800
PIN: N/A
Carrier: EDGE
Posts: 93
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi taktix2003,

It's better you do use java.lang.StringBuffer instead of java.lang.StringBuilder.

Cheers,
ARIF
Offline  
Old 09-06-2007, 09:41 AM   #3 (permalink)
New Member
 
Join Date: Sep 2007
Model: 8830
PIN: N/A
Carrier: sprint
Posts: 5
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by arifzaman View Post
Hi taktix2003,

It's better you do use java.lang.StringBuffer instead of java.lang.StringBuilder.

Cheers,
ARIF
there are no uses of java.lang.StringBuilder, but there are uses of java.lang.StringBuffer. thats the problem. I can't remove references that don't exist.
Offline  
Old 09-06-2007, 01:07 PM   #4 (permalink)
Retired BBF Moderator
 
Mark Rejhon's Avatar
 
Join Date: Aug 2004
Location: Ottawa, Ontario, Canada
Model: Bold
Carrier: Rogers
Posts: 4,870
Post Thanks: 1
Thanked 0 Times in 0 Posts
Default

Try running a find utility to grep through the source code, to see if there's a hidden reference -- for example, some dormant reference that can easily be removed...

(If you're running cygwin or UNIX tools suite for win32, you use this below command)
c:\cygwin\bin\find c:\projects\BBWeather -exec grep -i "StringBuilder" {} ;
or if your command line grep.exe supports recursion,
grep -r -i "StringBuilder" c:\projects\BBWeather

Or instead, use the 'search' feature of your development environment. (as long as it follows folders recursively, and can search all files including non-source-code files, even binary files...)

Any of the above may reveal a file that pinpoints hidden references to an obsolete class. Hiding deep inside an old makefile, a definition file, a configuration file, a project workspace file, even if the reference is not in the source code itself... Even an old object file that's inadvertently recycled (this can happen with some development environments, if installing a project inadvertently includes object files that the compiler doesn't overwrite, if it thinks it's current)

P.S. Please note, I am not the developer of BBWeather, so can't answer specific questions about BBWeather. However, I'd like one of you BBWeather developer to add an automatic "area code" search into BBWeather, so I can just type in the city name instead of trying to remember 8-character codes such as CAXX0351. It may be as simple as sending a regular HTML search query http://www.weather.com/search/enhanced?where=<cityname> to weather.com and then parsing the resulting HTML screen for the 8-digit code. There may be multiple search results, so if that happens, just pop up a BlackBerry screen giving a choice of matching search results.
__________________
Thanks,
Mark Rejhon
Author of XMPP extension XEP-0301:
www.xmpp.org/extensions/xep-0301.html - specification
www.realjabber.org - open source

Last edited by Mark Rejhon : 09-06-2007 at 01:15 PM.
Offline  
Old 09-06-2007, 01:29 PM   #5 (permalink)
New Member
 
Join Date: Sep 2007
Model: 8830
PIN: N/A
Carrier: sprint
Posts: 5
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

i had already done a complete search of all files and came up with nothing. I used grep on my linux workstation, search all files in intellij, search all on my windows box.

I'm quite positive that there is not a single reference to java.lang.StringBuilder in this project.

Quote:
peter@floyd:~/wrk/bbtools$ grep -ri java.lang.StringBuilder *
peter@floyd:~/wrk/bbtools$ grep -ri StringBuilder *
peter@floyd:~/wrk/bbtools$ grep -ri StringBuffer *
bbutils/src/org/bbutils/HttpUtils.java: StringBuffer result = new StringBuffer();
bbutils/src/org/bbutils/HttpUtils.java: StringBuffer buf = new StringBuffer((str.length() + 2) / 3 * 4);
bbweather/src/org/bbweather/WeatherThreadManager.java: StringBuffer sb = new StringBuffer();
Offline  
Old 09-06-2007, 01:35 PM   #6 (permalink)
New Member
 
Join Date: Sep 2007
Model: 8830
PIN: N/A
Carrier: sprint
Posts: 5
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Mark Rejhon View Post
P.S. Please note, I am not the developer of BBWeather, so can't answer specific questions about BBWeather. However, I'd like one of you BBWeather developer to add an automatic "area code" search into BBWeather, so I can just type in the city name instead of trying to remember 8-character codes such as CAXX0351. It may be as simple as sending a regular HTML search query http://www.weather.com/search/enhanced?where=<cityname> to weather.com and then parsing the resulting HTML screen for the 8-digit code. There may be multiple search results, so if that happens, just pop up a BlackBerry screen giving a choice of matching search results.
This seemed more like a general compilation problem, why i asked here.

I planned on fixing the startup bug with 0.74 first (app locks phone up when it has no city code configured). After that i can add a city search fairly easy.

I'm not a BBWeather developer either i just wanted a good weather app without writing it entirely from scratch.
Offline  
Old 09-06-2007, 04:44 PM   #7 (permalink)
New Member
 
Join Date: Sep 2007
Model: none
PIN: N/A
Carrier: none
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default try earlier jdk

It sounds like you may be compiling with a too recent version of the jre. String concatenation ("a" + "b") is done, behind the scenes, by StringBuilder or StringBuffer. The 1.4- series of the jre used StringBuffer, 1.5+ uses StringBuilder.

There is a compiler argument you can set to 1.4, but I am not sure how to do this with the bb jde.

You could also put the 1.4 jre in your Window's path variable (and remove other jres/jdks).
Offline  
Old 09-06-2007, 06:31 PM   #8 (permalink)
New Member
 
Join Date: Sep 2007
Model: 8830
PIN: N/A
Carrier: sprint
Posts: 5
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by craigger View Post
It sounds like you may be compiling with a too recent version of the jre. String concatenation ("a" + "b") is done, behind the scenes, by StringBuilder or StringBuffer. The 1.4- series of the jre used StringBuffer, 1.5+ uses StringBuilder.
that was it. I use intellij for an IDE so it was just a matter of selecting 1.4 instead of 1.5. kind of annoying since the blackberry site said to use 1.5...
Offline  
Old 09-06-2007, 11:30 PM   #9 (permalink)
Thumbs Must Hurt
 
Rose's Avatar
 
Join Date: Nov 2006
Location: India
Model: 9700
OS: Windows 7
Carrier: Airtel
Posts: 121
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Is there a chance that it may be a user defined library.
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





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