|
Replies:
19
-
Last Post:
Mar 25, 2009 7:22 AM
by: dmitry_belov
|
|
|
|
|
|
|
Problem runing j2me project in BB
Posted:
Jun 6, 2008 2:26 AM
|
|
|
Hi, i would like to know how build my j2me project or uidemomidlet with the latest lwuit library in my blackberry device. Step by step. I'm trying to run the project in my blackberrry and it returns a verificacion error.
Thanks.
|
|
|
|
|
|
|
Re: Problem runing j2me project in BB
Posted:
Jun 6, 2008 3:04 AM
in response to: naruton
|
|
|
Hi Naruton, the BlackBerry seems to have an issue with its VM which is not compliant to the standard classloader behavior in Java. The instructions on how to build for the blackberry in the developer guide remain the same, however you will need to make a minor source change in the transition demo by removing all references to Transition3D & the M3G classes. We are looking into ways of removing this restriction.
Thanks, Shai.
> Hi, i would like to know how build my j2me project or uidemomidlet > with the latest lwuit library in my blackberry device. Step by > step. I'm trying to run the project in my blackberrry and it > returns a verificacion error. > > Thanks. > [Message sent by forum member 'naruton' (naruton)] > > http://forums.java.net/jive/thread.jspa?messageID=278740 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net > For additional commands, e-mail: users-help@lwuit.dev.java.net >
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net For additional commands, e-mail: users-help@lwuit.dev.java.net
|
|
|
|
|
|
|
|
Re: Problem runing j2me project in BB
Posted:
Jun 6, 2008 3:35 AM
in response to: Shai Almog
|
|
|
Hi Shai, thanks for your soon answer. I follow this instructions before, but i'm not using Transition3D neither M3G classes in my project, for that i don't understand the verification error in my BB.
In fact, i´ve tried this and obfuscate the code before the actual release, and i didn´t get success.
What can i do?
Thanks.
|
|
|
|
|
|
|
|
Re: Problem runing j2me project in BB
Posted:
Jun 6, 2008 3:37 AM
in response to: naruton
|
|
|
Hi Naruton, Are you getting a verification error in the device or the JDE? Try running through the JDE build to generate files for the BB in which case you should get the same error with a descriptive message.
You can use the obfuscator with logging turned on which allows you to map the error to a specific class.
E.g.:
Generate an obfuscated MIDlet with logging turned on as instructed here: http://proguard.sourceforge.net/
This should generate a text file mapping the obfuscated classes to class names before obfuscation.
Following this you can run through the JDE verification process (as explained in the developer guide).
When you get the verification error you can look up the classes that caused the failure in the obfuscator log.
If you are having problems with this you can attach the zipped files (log and verification error messages) to the next message.
Thanks, Shai.
> Hi Shai, thanks for your soon answer. I follow this instructions > before, but i'm not using Transition3D neither M3G classes in my > project, for that i don't understand the verification error in my BB. > > In fact, i´ve tried this and obfuscate the code before the actual > release, and i didn´t get success. > > What can i do? > > Thanks. > [Message sent by forum member 'naruton' (naruton)] > > http://forums.java.net/jive/thread.jspa?messageID=278750 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net > For additional commands, e-mail: users-help@lwuit.dev.java.net >
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net For additional commands, e-mail: users-help@lwuit.dev.java.net
|
|
|
|
|
|
|
|
Re: Problem runing j2me project in BB
Posted:
Jun 29, 2008 11:38 AM
in response to: naruton
|
|
|
I'm in the same boat as naruton and bill.
1. Not using Transition3d or m3g & still get verification error 2. Tried modifying the jar file to remove these classes (Transition3D & M3G) & still get verification error.
Note: for both steps 1 & steps 2, I followed the "Developer Guide -- Lightweight UI Toolkit" SUN pdf documentation as well as trying to build the jar as a seperate library file in the Blackberry JDE. All attempts with no success, I get the verification error:
verification error 2953 at offset bb3aError
Shai, might it be possible to post or send us the working Blackberry JAR file (even if it doesn't include transition3d & m3g)?
Or might Chen be able to give us some input on how we can get this to work?
Also, I'm using blackberry JDE 4.3.0
|
|
|
|
|
|
|
|
Re: Problem runing j2me project in BB
Posted:
Jun 29, 2008 11:38 AM
in response to: perkmobile_pn
|
|
|
|
|
I'm to the BlackBerry platform, but from what I understand, verification errors usually stem from an attempt to access invalid device APIs. (But if that's the case, why a modified LWUIT compiles against 4.3 is a mystery to me).
When will the sources of LWUIT be available? I'd be curious to see what other dependencies it has.
--Bill
On Sun, Jun 29, 2008 at 2:38 PM, <lwuit-users@mobileandembedded.org> wrote:
> I'm in the same boat as naruton and bill. > > 1. Not using Transition3d or m3g & still get verification error > 2. Tried modifying the jar file to remove these classes (Transition3D & > M3G) & still get verification error. > > Note: for both steps 1 & steps 2, I followed the "Developer Guide -- > Lightweight UI Toolkit" SUN pdf documentation as well as trying to build the > jar as a seperate library file in the Blackberry JDE. All attempts with no > success, I get the verification error: > > verification error 2953 at offset bb3aError > > Shai, might it be possible to post or send us the working Blackberry JAR > file (even if it doesn't include transition3d & m3g)? > > Or might Chen be able to give us some input on how we can get this to work? > > Also, I'm using blackberry JDE 4.3.0 > [Message sent by forum member 'perkmobile_pn' (perkmobile_pn)] > > http://forums.java.net/jive/thread.jspa?messageID=283209 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net > For additional commands, e-mail: users-help@lwuit.dev.java.net > > [att1.html]
|
|
|
|
|
|
|
|
Re: Problem runing j2me project in BB
Posted:
Jun 29, 2008 11:42 AM
in response to: perkmobile_pn
|
|
|
> Shai, might it be possible to post or send us the working > Blackberry JAR file (even if it doesn't include transition3d & m3g)?
Hi, LWUIT used to work well on the BB and was tested on it both on the simulator and on the device. But this was pre J1 code, (couple of weeks before). Since then we had a somewhat spottier results with some things working and others failing. There are even some patches built in specifically for blackberry issues such as its treatment of drawRGB and its lack of softbuttons.
If there was such a blackberry jar I would send it to you but we don't have any, if we had more to go on than "verification error" (the much cursed BB useless error message) we would do something. We are working on this though but I'm not sure of the ETA/status of this issue, we will keep you posted if we come across anything but we don't have much to go on.
Other than M3G and Transition3D who use the 184 API, we only have Log that might use JSR 75 is applicable (file system). I doubt its at fault but everything is possible with RIM. Everything else is pure MIDP 2.0 & CLDC 1.1 with no exceptions.
Thanks, Shai.
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net For additional commands, e-mail: users-help@lwuit.dev.java.net
|
|
|
|
|
|
|
|
Re: Problem runing j2me project in BB
Posted:
Jun 30, 2008 8:34 AM
in response to: Shai Almog
|
|
|
Shai, have you guys tried building a jar without these problem classes (transition3d, m3g,...)? If so does the verification error still exist?
|
|
|
|
|
|
|
|
Re: Problem runing j2me project in BB
Posted:
Jun 30, 2008 9:28 AM
in response to: perkmobile_pn
|
|
|
Hi All, I will try this week to address the BB issues, and i will post an update.
Regards, Chen
lwuit-users@mobileandembedded.org wrote: > Shai, have you guys tried building a jar without these problem classes (transition3d, m3g,...)? If so does the verification error still exist? > [Message sent by forum member 'perkmobile_pn' (perkmobile_pn)] > > http://forums.java.net/jive/thread.jspa?messageID=283370 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net > For additional commands, e-mail: users-help@lwuit.dev.java.net > > >
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net For additional commands, e-mail: users-help@lwuit.dev.java.net
|
|
|
|
|
|
|
|
Re: Problem runing j2me project in BB
Posted:
Jun 30, 2008 2:14 PM
in response to: chen
|
|
|
Hi Chen,
Thanks for this. If a temporary fix is possible (like excluding problem classes transition3d, m3g,...), might this be availible as an interim download?
|
|
|
|
|
|
|
|
Re: Problem runing j2me project in BB
Posted:
Jul 1, 2008 10:53 AM
in response to: perkmobile_pn
|
|
|
|
|
Making an inch of progress...
OK, so I think there are couple things to work around here.
I am still not convinced that there are other references to the m3g classes besides whats in Transition3D. Even imports may throw the BB device. I moved the LWUITDemo midlet code to JDE 4.2. Ack. Blast from the NetBeans past. Anyway, using my Transition3D-less library jar, I created a JDE library-type project. When I build it, the rapc command *still *complains about m3g.Graphics3D m3g.Image2D.
In any case, at least thru the JDE I do not get 'module XXX has verification errors' now. I seem to get some LWUIT loading message, and then.....nothing.
On Mon, Jun 30, 2008 at 5:14 PM, <lwuit-users@mobileandembedded.org> wrote:
> Hi Chen, > > Thanks for this. If a temporary fix is possible (like excluding problem > classes transition3d, m3g,...), might this be availible as an interim > download? > [Message sent by forum member 'perkmobile_pn' (perkmobile_pn)] > > http://forums.java.net/jive/thread.jspa?messageID=283464 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net > For additional commands, e-mail: users-help@lwuit.dev.java.net > > [att1.html]
|
|
|
|
|
|
|
|
Re: Problem runing j2me project in BB
Posted:
Jul 1, 2008 11:13 AM
in response to: Bill Snyder
|
|
|
|
|
If anyone is interested, this is what the output is on the BB console after starting the UIDemoMIDLet:
Starting TestApp Started TestApp(200) Foreground TestApp(200) FRIDG: could not find resources.res using default style - no theme enabled(to enable a theme use - public void setStyleProps(Hashtable themeProps) method) using default style - no theme enabled(to enable a theme use - public void setStyleProps(Hashtable themeProps) method) using default style - no theme enabled(to enable a theme use - public void setStyleProps(Hashtable themeProps) method) using default style - no theme enabled(to enable a theme use - public void setStyleProps(Hashtable themeProps) method) using default style - no theme enabled(to enable a theme use - public void setStyleProps(Hashtable themeProps) method) using default style - no theme enabled(to enable a theme use - public void setStyleProps(Hashtable themeProps) method) using default style - no theme enabled(to enable a theme use - public void setStyleProps(Hashtable themeProps) method) JVM: bklt @7397: timer JVM: bklt @7397: idle 4 JVM: bklt @7397: setTimer 18 JVM: bklt @9785: timer
On Tue, Jul 1, 2008 at 1:53 PM, Bill Snyder <wsnyder6@gmail.com> wrote:
> Making an inch of progress... > > OK, so I think there are couple things to work around here. > > I am still not convinced that there are other references to the m3g classes > besides whats in Transition3D. Even imports may throw the BB device. I moved > the LWUITDemo midlet code to JDE 4.2. Ack. Blast from the NetBeans past. > Anyway, using my Transition3D-less library jar, I created a JDE library-type > project. When I build it, the rapc command *still *complains about > m3g.Graphics3D m3g.Image2D. > > In any case, at least thru the JDE I do not get 'module XXX has > verification errors' now. I seem to get some LWUIT loading message, and > then.....nothing. > > > > On Mon, Jun 30, 2008 at 5:14 PM, <lwuit-users@mobileandembedded.org> > wrote: > >> Hi Chen, >> >> Thanks for this. If a temporary fix is possible (like excluding problem >> classes transition3d, m3g,...), might this be availible as an interim >> download? >> [Message sent by forum member 'perkmobile_pn' (perkmobile_pn)] >> >> http://forums.java.net/jive/thread.jspa?messageID=283464 >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net >> For additional commands, e-mail: users-help@lwuit.dev.java.net >> >> > [att1.html]
|
|
|
|
|
|
|
|
Re: Problem runing j2me project in BB
Posted:
Jul 1, 2008 11:34 AM
in response to: Bill Snyder
|
|
|
|
|
More progress....I got the small code snippet to work from your latest blog post Shai. (Through the 4.3 JDE)
Now on to what I really want - getting this to build from NetBeans...I wonder I am not getting the LWUIT jars packaged correctly for BB.
--Bill
On Tue, Jul 1, 2008 at 2:13 PM, Bill Snyder <wsnyder6@gmail.com> wrote:
> If anyone is interested, this is what the output is on the BB console after > starting the UIDemoMIDLet: > > Starting TestApp > Started TestApp(200) > Foreground TestApp(200) > FRIDG: could not find resources.res > using default style - no theme enabled(to enable a theme use - public void > setStyleProps(Hashtable themeProps) method) > using default style - no theme enabled(to enable a theme use - public void > setStyleProps(Hashtable themeProps) method) > using default style - no theme enabled(to enable a theme use - public void > setStyleProps(Hashtable themeProps) method) > using default style - no theme enabled(to enable a theme use - public void > setStyleProps(Hashtable themeProps) method) > using default style - no theme enabled(to enable a theme use - public void > setStyleProps(Hashtable themeProps) method) > using default style - no theme enabled(to enable a theme use - public void > setStyleProps(Hashtable themeProps) method) > using default style - no theme enabled(to enable a theme use - public void > setStyleProps(Hashtable themeProps) method) > JVM: bklt @7397: timer > JVM: bklt @7397: idle 4 > JVM: bklt @7397: setTimer 18 > JVM: bklt @9785: timer > > > On Tue, Jul 1, 2008 at 1:53 PM, Bill Snyder <wsnyder6@gmail.com> wrote: > >> Making an inch of progress... >> >> OK, so I think there are couple things to work around here. >> >> I am still not convinced that there are other references to the m3g >> classes besides whats in Transition3D. Even imports may throw the BB device. >> I moved the LWUITDemo midlet code to JDE 4.2. Ack. Blast from the NetBeans >> past. Anyway, using my Transition3D-less library jar, I created a JDE >> library-type project. When I build it, the rapc command *still *complains >> about m3g.Graphics3D m3g.Image2D. >> >> In any case, at least thru the JDE I do not get 'module XXX has >> verification errors' now. I seem to get some LWUIT loading message, and >> then.....nothing. >> >> >> >> On Mon, Jun 30, 2008 at 5:14 PM, <lwuit-users@mobileandembedded.org> >> wrote: >> >>> Hi Chen, >>> >>> Thanks for this. If a temporary fix is possible (like excluding problem >>> classes transition3d, m3g,...), might this be availible as an interim >>> download? >>> [Message sent by forum member 'perkmobile_pn' (perkmobile_pn)] >>> >>> http://forums.java.net/jive/thread.jspa?messageID=283464 >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net >>> For additional commands, e-mail: users-help@lwuit.dev.java.net >>> >>> >> > [att1.html]
|
|
|
|
|
|
|
|
Re: Problem runing j2me project in BB
Posted:
Jul 1, 2008 2:11 PM
in response to: Bill Snyder
|
|
|
>More progress....I got the small code snippet to work from your latest blog post Shai. (Through the 4.3 JDE)
How exactly. Did you remove the offending classes in full or just replace them with empty class files?
Also Bill, could you shoot me an email: peter@perkmobile.com.
Thanks -pete
|
|
|
|
|
|
|
|
Re: Problem runing j2me project in BB
Posted:
Jul 1, 2008 2:30 PM
in response to: perkmobile_pn
|
|
|
|
|
Hi Pete,
There were a couple top level classes I removed that seemed to have m3g dependencies. M3G and M3G$Callback. I also created a library project in the JDE, then created a MIDlet project (with Shais' blog code) that depended on that library.
It just pops up a form, nothing fancy.
On Tue, Jul 1, 2008 at 5:11 PM, <lwuit-users@mobileandembedded.org> wrote:
> >More progress....I got the small code snippet to work from your latest > blog > post Shai. (Through the 4.3 JDE) > > How exactly. Did you remove the offending classes in full or just replace > them with empty class files? > > Also Bill, could you shoot me an email: peter@perkmobile.com. > > Thanks > -pete > [Message sent by forum member 'perkmobile_pn' (perkmobile_pn)] > > http://forums.java.net/jive/thread.jspa?messageID=283778 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net > For additional commands, e-mail: users-help@lwuit.dev.java.net > > [att1.html]
|
|
|
|
|
|
|
|
Re: Problem runing j2me project in BB
Posted:
Jul 3, 2008 6:15 AM
in response to: Bill Snyder
|
|
|
Hi, I have checked the BB issues and as Bill mentioned before you need to remove the M3G.class, M3G$Callback.class and the Transition3D.class from the jar.(or you can fully obfuscate your project to remove them), then follow the user guide instructions
"1. Create a new project in JDE and name it appropriately. Select project type: "Empty Midlet project". 2. Right click on the project and choose the "add file to project" option and choose the JAR file from your projects /dist directory. 3. Right click on the project and choose "properties". 4. In the "Application" tab insert the name of your main MIDlet class. 5. Build and run the project."
Notice in step 2 you need to add your project jar file(not LWUIT.jar). In addition there is some sort of a race condition in the startApp so it is recommended to preform the show synchoronized like this:
Display.getInstance().callSerially(new Runnable() {
public void run() { f.show(); } });
Regards, Chen
|
|
|
|
|
|
|
|
Problem runing j2me project in BB
Posted:
Sep 25, 2008 5:06 AM
in response to: naruton
|
|
|
Kindly help with this problem verification error. I deployed this application with other simulators and it work fine but When I try it on BB Simulator using JDE 4.5 I got an error message verification error. Can anyone help me? here is the error: Default EDGE Network AG,+CPT AG,-CPT net.rim.vad: DONE FocusHistory: Focus lost; App Home Screen; Component net.rim.device.api.ui.MediaController FocusHistory: Focus gained; App Home Screen; Component net.rim.device.apps.internal.ribbon.launcher.RibbonIconField FocusHistory: Focus gained; App Home Screen; Component net.rim.device.apps.internal.ribbon.launcher.RibbonIconField Starting 'ReaderMIDlet Module 'ReaderMIDlet' has verification errors.Error starting ReaderMIDlet: Module 'ReaderMIDlet' has verification errors.
Thanks inadvance!
|
|
|
|
|
|
|
|
Re: Problem runing j2me project in BB
Posted:
Sep 25, 2008 5:10 AM
in response to: samley
|
|
|
|
|
Its difficult to track these verification errors down.
Sometimes I've seen the ResourceEditor files cause verification errors.
Other times it because you are directly (or indirectly) accessing APIs of libraries that don't exist on the BB.
--Bill
On Thu, Sep 25, 2008 at 8:06 AM, <lwuit-users@mobileandembedded.org> wrote:
> Kindly help with this problem verification error. I deployed this > application with other simulators and it work fine but When I try it on BB > Simulator using JDE 4.5 I got an error message verification error. > Can anyone help me? > here is the error: > Default EDGE Network > AG,+CPT > AG,-CPT > net.rim.vad: DONE > FocusHistory: Focus lost; App Home Screen; Component > net.rim.device.api.ui.MediaController > FocusHistory: Focus gained; App Home Screen; Component > net.rim.device.apps.internal.ribbon.launcher.RibbonIconField > FocusHistory: Focus gained; App Home Screen; Component > net.rim.device.apps.internal.ribbon.launcher.RibbonIconField > Starting 'ReaderMIDlet > Module 'ReaderMIDlet' has verification errors.Error starting ReaderMIDlet: > Module 'ReaderMIDlet' has verification errors. > > Thanks inadvance! > [Message sent by forum member 'samley' (samley)] > > http://forums.java.net/jive/thread.jspa?messageID=301549 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net > For additional commands, e-mail: users-help@lwuit.dev.java.net > > [att1.html]
|
|
|
|
|
|
|
|
Re: Solution to runing j2me project in BB
Posted:
Feb 4, 2009 7:07 AM
in response to: samley
|
|
|
Hi, Shai Almog,
After trying a lot I got a easiest solution and the process is:
Very simple solution to run LWUIT application into Blackberry successfully without Any Error:
The process(I suppose you're on a NetBeans IDE...?): 1) Before using the LWUIT.jar file into your application you have to pre verify that. The command to run is: D:\Program Files\Research In Motion\BlackBerry JDE 4.2.1\bin>preverify -classpath "D:\Program Files\Research In Motion\BlackBerry JDE 4.2.1\lib\net_rim_api.jar" "D:\NBProjects\LWUITDemo\dist\lib\LWUIT.jar"
2) Then you will get the following errors: i) Error preverifying class com.sun.lwuit.SVGImage VERIFIER ERROR com/sun/lwuit/SVGImage.drawImage(Lcom/sun/lwuit/Graphics;II)V : Cannot find class javax/microedition/m2g/ScalableImage You have to delete that SVGImage.class file from LWUIT.jar because JDE failed to verify it for the above errors.
ii) Then again run that command & you again will get errors: Error preverifying class com.sun.lwuit.animations.Transition3D VERIFIER ERROR com/sun/lwuit/animations/Transition3D.initTransition()V: Cannot find class javax/microedition/m3g/Node And you have to also delete Transition3D.class, M3G.class & M3G$Callback.class files from LWUIT.jar because JDE failed to verify them also. iii) Then again run that command and it will able verify successfully without any message. When pre verifying, all pre verified classes are saved in a subdirectory "output" by default into the JDE “bin� directory.
3) Now take that pre verified LWUIT.jar file and make your application. And after completing your prject with your .jad & .jar file make the .cod file with the following command: D:\Program Files\Research In Motion\BlackBerry JDE 4.2.1\bin>rapc import="D:\Program Files\Research In Motion\BlackBerry JDE 4.2.1\lib\net_rim_api.jar" codename="C:\Documents and Settings\Susanta\Desktop\COD\COD\LWUITApps" -midlet " D:\NBProjects\LWUITApps\dist\LWUITApps.jad" " D:\NBProjects\LWUITApps\dist\LWUITApps.jar" (Where “import� path is the net_rim_api.jar path, �codename� path is the path where you want to make the cod file with name then .jad file path & .jar file path) And you will get the .cod file in the codename path & test it.
# And running LWUITDemo application downloaded from LWUIT website,we need to made a simple change: Resources res2 = Resources.open("/myTheme1.res");
Replace the above statement by the following two
InputStream stream1 = getClass().getResourceAsStream("/resources.res"); Resources res2 = Resources.open(stream1);
Because of some folder structure problem it can not open directly.
Thanks, Susanta
|
|
|
|
|
|
|
|
Re: Problem runing j2me project in BB
Posted:
Mar 25, 2009 6:11 AM
in response to: naruton
|
|
|
Never mind. My issue was irrelevant.
Message was edited by: dmitry_belov
To further elaborate, it was a bug with Eclipse IDE and the BB Eclipse plugin. After recompiling the project under native 4.2 and 4.3 JDE it worked without any hitches.
Message was edited by: dmitry_belov
|
|
|
|
|