12-13-2011 11:37 AM
Here is my situation:
I have a working application, using a single BlackBerry project, with several dependencies, like bbm, ksoap2 etc.
I want to develop a very similar application that shares a lot of the code, UI as well as connection code.
Now I created a shared BlackBerry project and set the type to Library. This library has most of the dependencies now, as the webservice or bbm code is in there, for example.
Both projects compile successfully, the packaging also succeeds.
But when i start the project on the simulator i get the following error:
RuntimeException
Error starting MyApp: Class someClassFromTheLibrary not found
Linker error: 'VerifyError' for MyApp
Class 'someClassFromTheLibrary' not found
If i remove calls to the offending class the same error appears with another one, seems to be the first class to be used.
I have already disabled maven dependency management and everything else that makes the project more complex, but to no avail.
Used system is Eclipse 3.6.2, Plugin 1.5.0.201110141512, JRE 5.0, default simulator 9700
Any ideas?
12-14-2011 12:30 AM
12-14-2011 04:58 AM - edited 12-14-2011 05:51 AM
i tested it on the device today, and it works. Even re-enabled maven dependencies, and it still works.
Going to test another simulator now.
On the simulator i first get the message "module Shared not found". I load the module manually using File/load java program.
Now i get java.lang.Error, the eventlog states "ApplicationControlImpl assertIPCAllowed".
News:
I can get it to run on the simulator when i copy the shared.cod manually into the simulator directory.
It seems to be a problem with the build process that the shared.cod is not automatically deployed on the simulator.
12-14-2011 09:42 AM
The error looks like an issue with Application Control. There were some 5.0 simulators that sometimes tried to check app control settings when they shouldn't be (should be disabled by default in the sim). The Run/Debug As deployment mechanism doesn't create a real application group as would be done with typical installation methods, which can cause application control checks to fail because there are not settings configured for the application (it can't check if the permission was set to Allow, Deny or Prompt because they don't exist).
The issue of the simulators checking for app control settings when they shouldn't has been fixed in newer simulator releases.
Can you try this in a 7.0 sim?
12-14-2011 10:21 AM
12-14-2011 12:22 PM
When we build with Maven for the simulator we build the libraries as a COD and programatically copy them to the simulator directory (custom plugin does this).
When building a release on the build server the Maven dependency code is copied over into the project.
When building a shared COD I had to go through this junk: http://supportforums.blackberry.com/t5/Java-Develo
Maven dependencies are seperate and shouldn't affect Eclipse classpath or exports.
12-14-2011 12:32 PM
12-14-2011 01:19 PM
How did you configure dependencies into the lib project? Did you copy source code to the lib project or import jar files?
12-14-2011 01:24 PM
12-14-2011 01:32 PM
If the shared.cod is built with Maven, you could try pointing your classpath to the JAR your the local repo.