If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

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
Contributor
tomgibson
Posts: 11
Registered: ‎12-10-2012
My Device: Developer (Curve 9360)
My Carrier: Orange
Accepted Solution

Eclipse fails to package project every other time I try to Run on BlackBerry Simulator

[ Edited ]

I have a simple project that I have set up using the BlackBerry 7.1 SDK, there are no external dependencies.

 

Almost without fail, every other time I hit 'Run on BlackBerry Simulator' I get an error similar to the following:

 

Packaging project BlackBerryApplication
C:\Eclipse\plugins\net.rim.ejde.componentpack7.1.0_7.1.0.10\components\bin\rapc.exe -convertpng -quiet codename=deliverables\Standard\7.1.0\BlackBerryApplication -sourceroot=D:\Git\BlackBerry Application\BlackBerryApplication\src;D:\Git\BlackBerry Application\BlackBerryApplication\res;D:\Git\BlackBerry Application\BlackBerryApplication -import=C:\Eclipse\plugins\net.rim.ejde.componentpack7.1.0_7.1.0.10\components\lib\net_rim_api.jar deliverables\Standard\7.1.0\BlackBerryApplication.rapc D:\Git\BlackBerry Application\BlackBerryApplication\bin
JAR file creation failed with error -1
The preverified classes if any are in tmp28761. See jar log of errors in C:\Users\t_gibson\AppData\Local\Temp\rapc_71af6d24.dir\jarlog.txt 
Error!: Error: preverifier failed: C:\Eclipse\plugins\net.rim.ejde.componentpack7.1.0_7.1.0.10\components\bin\preverify.exe -d C:\Users\ ...
Packaging project BlackBerryApplication failed (took 0.584 seconds) 

It doesn't matter if I clean project or clean simulator I still get the same error every other compile. Does anyone have any idea what could cause this? If I hit 'Run on BlackBerry Simulator' straight after the error it works fine.

 

I'm using the 9900 simulator with Eclipse 3.7.2 and the BlackBerry SDK 7.1.0.10. The plugin version is 2.0.0.201207181003.

 

Thanks!

 

EDIT: I should clarify that when I say cleaning the project doesn't make any difference, what I mean is that cleaning the project once means it compiles OK next time, but unless it is cleaned again after the first compile, compiling a second time will fail. So although cleaning the project before every compile would cause it to compile every time, this doesn't solve the problem in that there is still something left in an inconsistent state after a successful compile.

Please use plain text.
Developer
crispyoz
Posts: 223
Registered: ‎10-01-2011
My Device: Bold 9900

Re: Eclipse fails to package project every other time I try to Run on BlackBerry Simulator

If you refresh the project before you run does this resolve the issue?

Please use plain text.
Contributor
tomgibson
Posts: 11
Registered: ‎12-10-2012
My Device: Developer (Curve 9360)
My Carrier: Orange

Re: Eclipse fails to package project every other time I try to Run on BlackBerry Simulator

Unfortunately refreshing doesn't make any difference.

 

In any case I'd prefer not to have an extra step to get it to compile I would like to understand the root cause of the problem so it can be rectified.

 

Please also see my edit above clarifying my meaning around project cleaning.

Please use plain text.
Developer
crispyoz
Posts: 223
Registered: ‎10-01-2011
My Device: Bold 9900

Re: Eclipse fails to package project every other time I try to Run on BlackBerry Simulator [

[ Edited ]

The reason I asked about refreshing is because I had this issue before and it took me weeks to work out the cause. The cause was that I had the output directory open in another application. Only cleaning then refreshing resolved the issue, finally I worked out that it was a windows thing that eclipse wasn't reporting.  Try using a file monitor to check if the file system is being updated so eclipse can detect the change.   On windows you an use filemon.

 

 

Please use plain text.
Contributor
tomgibson
Posts: 11
Registered: ‎12-10-2012
My Device: Developer (Curve 9360)
My Carrier: Orange

Re: Eclipse fails to package project every other time I try to Run on BlackBerry Simulator [

Ah OK, thanks for that suggestion I'll try it out and report back!

Please use plain text.
Contributor
tomgibson
Posts: 11
Registered: ‎12-10-2012
My Device: Developer (Curve 9360)
My Carrier: Orange

Re: Eclipse fails to package project every other time I try to Run on BlackBerry Simulator [

Hi, I used procmon to see what applications were accessing the directory in question, but in both cases the only applications were eclipse.exe, java.exe, preverify.exe and rapc.exe

 

Any other suggestions? I've also tried the same project on another PC but I have the same problem.

 

Interestingly the error log file that should exists at C:\Users\t_gibson\AppData\Local\Temp\rapc_71af6d24.dir\jarlog.txt doesn't exist, there are no rapc_ folders in Temp.

Please use plain text.
Contributor
tomgibson
Posts: 11
Registered: ‎12-10-2012
My Device: Developer (Curve 9360)
My Carrier: Orange

Re: Eclipse fails to package project every other time I try to Run on BlackBerry Simulator [

Anyone else got any thoughts?

Please use plain text.
Developer
crispyoz
Posts: 223
Registered: ‎10-01-2011
My Device: Bold 9900

Re: Eclipse fails to package project every other time I try to Run on BlackBerry Simulator [

Have you tried running in administration mode?

 

Please use plain text.
Contributor
tomgibson
Posts: 11
Registered: ‎12-10-2012
My Device: Developer (Curve 9360)
My Carrier: Orange

Re: Eclipse fails to package project every other time I try to Run on BlackBerry Simulator [

I've tried with and without administrator rights. I think it must be something specific to the project configuration as I don't have the same problem with the sample project from the public git samples I am using.

Please use plain text.
Contributor
tomgibson
Posts: 11
Registered: ‎12-10-2012
My Device: Developer (Curve 9360)
My Carrier: Orange

Re: Eclipse fails to package project every other time I try to Run on BlackBerry Simulator

I have determined the source of the problem was an incorrect setting in the project configuration that I made when I created the project, I had mistakenly added the project's root folder to the source folders on build path option. The error in the rapc.exe line is highlighted below

 

Packaging project BlackBerryApplication
C:\Eclipse\plugins\net.rim.ejde.componentpack7.1.0_7.1.0.10\components\bin\rapc.exe -convertpng -quiet codename=deliverables\Standard\7.1.0\BlackBerryApplication -sourceroot=D:\Git\BlackBerry Application\BlackBerryApplication\src;D:\Git\BlackBerry Application\BlackBerryApplication\res;D:\Git\BlackBerry Application\BlackBerryApplication -import=C:\Eclipse\plugins\net.rim.ejde.componentpack7.1.0_7.1.0.10\components\lib\net_rim_api.jar deliverables\Standard\7.1.0\BlackBerryApplication.rapc D:\Git\BlackBerry Application\BlackBerryApplication\bin
JAR file creation failed with error -1
The preverified classes if any are in tmp28761. See jar log of errors in C:\Users\t_gibson\AppData\Local\Temp\rapc_71af6d24.dir\jarlog.txt 
Error!: Error: preverifier failed: C:\Eclipse\plugins\net.rim.ejde.componentpack7.1.0_7.1.0.10\components\bin\preverify.exe -d C:\Users\ ...
Packaging project BlackBerryApplication failed (took 0.584 seconds)

 

 

Please use plain text.