View Single Post
Old 10-12-2012, 02:09 AM   #87 (permalink)
New Member
Join Date: Oct 2012
Model: 9790
Carrier: Sun
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: Ksoap2 tutorial with Eclipse plugin 1.1

Originally Posted by brooza View Post
Hi, has anyone tried the tutorial with BlackBerry Java Plug-in for Eclipse v1.1? I have Eclipse 3.5 and the 1.1. plugin with component pack 4.5?

Here is what I did:
1) New - Other - BlackBerry project - called Ksoap2, JRE: BB JRE 4.5 - Finish
2) In BB app descriptor window I have changed app type to Library and saved
3) right click on project - New - Folder - called lib
4) right click on folder - import - filesystem - jar provided in this tutorial
5) right click on project - properties - java build path: a) tab source - add folder - check Ksoap2/lib b) tab Libraries - add jars.. - Ksoap2/lib/the jar file c) tab Order and Export - check the jar file ok

And now the testing project:
1) New - Other - BlackBerry project - called Ksoap2Test, JRE: BB JRE 4.5 - Finish
2) right click on Ksoap2Test - properties - Java build path: a) tab Projects - check Ksoap2 b) tab Libraries - add Ksoap2/bin/the jar file c) tab Order and export - check the jar and project Ksoap2
3) right click on KsoapTest - new - class: called Ksoap2Demo, package mypackage - Finish
4) Copy the source code of java file provided in tutorial, change the mistakes in name of classes (StockQuoteDemo>Ksoap2Demo and StockQuoteScreen>Ksoap2DemoScreen), check the package and save
5) Run - Run as - BB simulator

Until running the project, everything seems to be fine but unfortunatelly the app doesnt run, just simulator without the app. In eclipse console I have found this:
Packaging project Ksoap2
C:\Program Files\Eclipse\plugins\net.rim.ejde.componentpack4. 5.0_4.5.0.21\components\bin\rapc.exe -quiet library=deliverables\4.5.0\Ksoap2 deliverables\4.5.0\Ksoap2.rapc -sourceroot=C:\Users\JB.s4u\workspace\Ksoap2\src;C: \Users\JB.s4u\workspace\Ksoap2\lib;C:\Users\JB.s4u \workspace\Ksoap2\res -import=C:\Program Files\eclipse\plugins\net.rim.ejde.componentpack4. 5.0_4.5.0.21\components\lib\net_rim_api.jar;C:\Use rs\JB.s4u\workspace\Ksoap2\lib\ksoap2-j2me-core-prev-2.1.2.jar C:\Users\JB.s4u\workspace\Ksoap2\bin
JAR file creation failed with error -1
The preverified classes if any are in tmp8965. See jar log of errors in C:\Users\JB.s4u\AppData\Local\Temp\rapc_191cb4a2.d ir\jarlog.txt
Error!: Error: preverifier failed: C:\Program Files\Eclipse\plugins\net.rim.ejde.componentpack4. 5.0_4.5.0.21\components\bin\preverify.ex ...
Packaging project Ksoap2 failed (took 0.464 seconds)

Packaging project Ksoap2Test
C:\Program Files\Eclipse\plugins\net.rim.ejde.componentpack4. 5.0_4.5.0.21\components\bin\rapc.exe -quiet codename=deliverables\4.5.0\Ksoap2Test deliverables\4.5.0\Ksoap2Test.rapc -sourceroot=C:\Users\JB.s4u\workspace\Ksoap2Test\sr c;C:\Users\JB.s4u\workspace\Ksoap2Test\res -import=C:\Program Files\eclipse\plugins\net.rim.ejde.componentpack4. 5.0_4.5.0.21\components\lib\net_rim_api.jar;C:\Use rs\JB.s4u\workspace\Ksoap2\bin\ksoap2-j2me-core-prev-2.1.2.jar;..\Ksoap2\deliverables\4.5.0\Ksoap2.jar C:\Users\JB.s4u\workspace\Ksoap2Test\bin
I/O Error: Import file not found: ..\Ksoap2\deliverables\4.5.0\Ksoap2.jar
Packaging project Ksoap2Test failed (took 0.967 seconds)

I do not understand what does the error report say. Could anyone give me a tip where the problem might be or can you try my steps to resolve if this is general or just my configuration problem.
Thank you very much.
Instead of doing b) tab Libraries - add Ksoap2/bin/the jar file in the testing project, import the Ksoap2.jar in the Ksoap2/deliverables (either in the sub-folder Standard/ or Web/. I chose Standard/). I followed the instructions until I got the same error (just so Eclipse would build Ksoap2 and produce the Deliverables folder and files) then I just went back to the Ksoap2Test - properties - Java build path - tab Libraries then removed the jar from Ksoap2/bin/ and then added the one in Ksoap2/deliverables
Offline   Reply With Quote