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: 4
Registered: ‎06-10-2009
My Device: Not Specified

Errors running builder 'BlackBerry Resources Builder' An error occurred while traversing resources.

Hello. I'm new to BlackBerry Java development.

 

I tried searching the forum but can't find the solution.



These are the error messages I'm getting:

 

 ---------------------------------------------------------------------

Errors during build.
  Errors running builder 'BlackBerry Resources Builder' on project [project name here].
  An error occurred while traversing resources.
  String index out of range: -3
 ---------------------------------------------------------------------

 

 

 

The situation:

- I'm porting a JavaME game to BlackBerry devices. The jar size of the game is about 500kb.

- I'm using the BlackBerry JDE plug-in for Eclipse version 1.0.0.67

 

- I put all the source and resource in src/res folder respectively. And configured the build path to include both folder.

 

- The game runs fine on the emulator.

 

- I've created the .rrh file.

 

 

I'm posting this out of curiousity(since the game runs fine).  It's quite annoying to see error message each time I build the project.

 

Thanks in advance. =)

Developer
Posts: 984
Registered: ‎02-10-2009
My Device: Not Specified

Re: Errors running builder 'BlackBerry Resources Builder' An error occurred while traversing resourc

[ Edited ]

I think your way of adding resources to the project in inappropriate.

 

You will get help on how to add resources to your project appropriately in the doc.

   http://na.blackberry.com/eng/developers/resources/A12_Localizing_V2.pdf

 

 

Regards

Bikas

Message Edited by bikas on 06-11-2009 12:42 PM
New Developer
Posts: 7
Registered: ‎08-27-2008
My Device: Curve - 8330

Re: Errors running builder 'BlackBerry Resources Builder' An error occurred while traversing resourc

Has a solution to this issue been found? I must have made some setting change that broke my build. I get this same error:

 

Errors during build.

 Errors running builder 'BlackBerry Resources Builder' on project 'MyProject'

 An error occurred while traversing resources.

 String index out of range: -1

 

Developer
Posts: 94
Registered: ‎10-01-2009
My Device: Not Specified

Re: Errors running builder 'BlackBerry Resources Builder' An error occurred while traversing resourc

 


Igmcben wrote:
I'm posting this out of curiousity(since the game runs fine).

Does "runs fine" mean the resource files work in all the languages they should?

 

I've spent a little while trying to find some way to make this error happen, without success.  It sounds like something is out of sync -- the .rrh with the .rrc, or both with the derived .java file in the .tmp directory.  I got some interesting results, but not the one you guys are seeing. I didn't try anything really drastic, like replacing RIM's int keys with "normal" String keys.  But since that seems to be where the OP started, maybe that's where the trigger lies. "Is a puzzlement."

 

Anyway, if one of you wouldn't mind digging into the .rrh and .rrc files separately, and then looking at the derived .java file to see if the generated indexes/keys are all right, maybe you could turn up some anomaly.  Maybe post bits of all three?

 

Meanwhile, my usual comments: do use the resource editor so the files stay in sync -- what Bikas said about doing it RIM's way is good advice.  And do make sure the package statement in the .rrh really says what you think it should -- remember that if you move a resource file to a different package or to a different source directory, the eclipse plug-in does not automatically update the package statement, with somewhat strange results.  And it doesn't always catch all the imports, either.  Wonder if they fixed that in 1.1 ...

Contributor
Posts: 13
Registered: ‎02-20-2010
My Device: Bold 9700
My Carrier: Rogers

Re: Errors running builder 'BlackBerry Resources Builder' An error occurred while traversing resourc

I just encountered this error myself.  I'll throw in what I've noticed in chasing down the problem and it may or may not apply to your case.

 

I'm running Windows XP as a virtualized system (inside a VirtualBox guest OS on a Linux/Ubuntu Host).  I've been doing my darndest to keep the storage of all the project resources (source files, etc.) on the Linux filesystem (its RAIDed, regularly backed up, and I can use powerful linux file search tools... although eclipse is looking pretty powerful itself).  I started with VirtualBox Shared FOlders, this didn't work.  Then I recently try a SAMBA fileshare, which SEEMed to work for about 12 hours today, then just 30 minutes ago I started experiencing this issue with "traversing".   I'm versioning everything in SVN, so I was able to switch to a workspace that was stored on the local XP filesystem (i.e., C:\workspace) using the exact same set of files, and the issue is gone.  When I switch back to the SAMBA workspace the issue is still there.

 

SOO, all that to say, maybe its a filesystem issue.  Are you doing anything funny with where you store the files?