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
atif_imran
Posts: 13
Registered: ‎10-04-2012
My Device: BlackBerry 9930
Accepted Solution

BlackBerry Maven project. Having a very tough time :(

I have created a mavenized BlackBerry project successfully with all the .cod files with much inputs from here.  I have not worked previously on Maven so I have signed my application from outside command line by going into SignatureTool.

 

My problem is my app gives a jvm error 104 java.lang.Error on simulator and actual device.

 

I have noticed when I run my app using BlackBerry Project setup it runs and if I run my Mavenized app soon after it then it run perfectly!!

Is there some cache that the simulator or BlackBerry maintains. As maven does not create .locale_interfaces folder(i also tried manually creating that folder). May be that is some problem? I also added refernce to .rrc and .rrh in my pom.xml but no luck.

 

Please help.:Helpsmilie:

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: BlackBerry Maven project. Having a very tough time :(

we use the standard bb eclipse plugin and have maven as a management tool, but not to build. that works quite well.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Contributor
atif_imran
Posts: 13
Registered: ‎10-04-2012
My Device: BlackBerry 9930

Re: BlackBerry Maven project. Having a very tough time :(

I understand that but our main reason to have a mavenized project is to get automated builds through hudson. Unfortunately, I'm stuck badly there.

Do you think it is beacause of the .crb files that bb plugin generates could be a reson for error? as I have already created all the structure, interfaces for localization etc. manually yet I can't get it to work.  Any ideas ?

Developer
mreed
Posts: 1,041
Registered: ‎07-16-2008
My Device: ಠ_ಠ

Re: BlackBerry Maven project. Having a very tough time :(

[ Edited ]

The link in your first post is broken. What plugin are you using to build this? It's hard to tell from your description what the issue here is besides the signing part.

Contributor
atif_imran
Posts: 13
Registered: ‎10-04-2012
My Device: BlackBerry 9930

Re: BlackBerry Maven project. Having a very tough time :(

Thanks mreed for your time. I'm sorry for the broken link. Here's the correct one. 

 

openmobster.blogspot.in/2010/03/blackberry-app-development-using.html?m=1

 

I'm using m2eclipse plugin. My problem is that my app runs fine if I package it from eclipse using BlackBerry project but it gives a jvm 104 java.lang.Error when I package it through maven command line. Although it creates all the cod files but maven doesn't create a .locale_interfaces folder which I think it should have created. 

 

I created the resource interface and added to the resource package.  Still getting the error. 

Developer
mreed
Posts: 1,041
Registered: ‎07-16-2008
My Device: ಠ_ಠ

Re: BlackBerry Maven project. Having a very tough time :(

[ Edited ]

It looks like that is just using Maven to call Ant... there are better more complete Ant tools if you want to use those. Im sure you can find through the forum search.

 

There is also an open source BlackBerry Maven plugin:

https://goodformobile.atlassian.net

https://goodformobile.atlassian.net/svn/MMP/trunk (some samples under trunk also)

Contributor
atif_imran
Posts: 13
Registered: ‎10-04-2012
My Device: BlackBerry 9930

Re: BlackBerry Maven project. Having a very tough time :(

This is for anyone facing similar issue.

 

Well finally I got a work around of my issue. The reason of the error was the use of localization in my app. Maven didn't created the .locale_interfaces and there were issues due to the .crb files as well so I used a .properties file instead of the locale bundle and picked value from there based on key value iteration. In the pom.xml I mentioned their location and dependency like shown below and now it works like a charm :Yes:

 

<!-- Adding .properties file to project for localization -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0-alpha-2</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>src\main\resources\LocaleBundleES.properties</file>
<file>src\main\resources\LocaleBundleFR.properties</file>
<file>src\main\resources\LocaleBundleEN.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
<!-- Adding .properties file to project for localization -->