Skip to main content

CVM AND OSGI

13 replies [Last post]
lonely956
Offline
Joined: 2008-06-04
Points: 0

i try to use CDC(phoneme_advanced-mr2-dev-src-b34-04_oct_2007) for arm

but osgi(Knopflerfish) is for java 1.6 and cdc only java1.4..

how to updata??

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
lonely956
Offline
Joined: 2008-06-04
Points: 0

for Terrence :thank you i will try it!

for Davy:how to avoid loading OSGi bundles that require APIs that are Java SE specific. ?? i learn cvm no long time. so can you talk someting about this??

for ken:i will try more too!

davyp
Offline
Joined: 2007-01-03
Points: 0

There is a configuration file in knopflerfish_osgi_2.0.5/knopflerfish.org/osgi that loads a
minimal set of bundles. You can run that configuration with:

/phoneme/linux/foundation/bin/cvm -jar framework.jar -xargs minimal.xargs

You may need to change the path to the cvm, but that configuration should work fine on a
foundation profile. If you would run the default configuration (init.xargs), then you will have
trouble starting the desktop OSGi bundle because it requires Swing.

/phoneme/linux/foundation/bin/cvm -jar framework.jar -xargs init.xargs

You could edit init.xargs to not install and start desktop_all-2.0.0.jar, and also disable other
bundles that have some dependencies on packages provided by the desktop_all-2.0.0.jar
bundle.

Davy

PS: Oscar and Equinox also run fine on phoneME Advanced.

lonely956
Offline
Joined: 2008-06-04
Points: 0

i also have error just like:(cvm -jar framework.jar -xargs minimal.xargs )

java.lang.NoClassDefFoundError: java.net.HttpURLConnection
at java.lang.Class.getMethod0(Native Method)
at java.lang.Class.getMethod(Unknown Source)
at sun.misc.CVM.runMain(Unknown Source)

what happen??
*******************************************************************************************
other error

[root@localhost concierge-distro]# cvm -jar concierge-1.0_RC2.jar
---------------------------------------------------------
Concierge OSGi 1.0_RC1 on Linux 2.6.18-1.2798.fc6 starting ...
---------------------------------------------------------
Logger initialized, loglevel is DEBUG
INSTALLING event-admin-1.0_RC2.jar
INSTALLING service-tracker-1.0_RC2.jar
INSTALLING shell-1.0_RC2.jar
INSTALLING concierge_gui-1.0_RC2.jar
STARTING file:./bundles/event-admin-1.0_RC2.jar
java.lang.NoClassDefFoundError: java/util/EventListener
at java.lang.Class.loadSuperClasses(Unknown Source)
at sun.misc.Launcher$AppClassLoader.defineClassPrivate(Unknown Source)
at sun.misc.Launcher$AppClassLoader.access$500(Unknown Source)
at sun.misc.Launcher$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Unknown Source)
at java.security.AccessController.doPrivileged(Unknown Source)
at sun.misc.Launcher$AppClassLoader.doClassFind(Unknown Source)
at sun.misc.Launcher$AppClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.ClassLoader.resolveClass0(Native Method)
at java.lang.ClassLoader.resolveClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at ch.ethz.iks.concierge.framework.BundleClassLoader.resolveBundle(Unknown Source)
at ch.ethz.iks.concierge.framework.BundleImpl.startBundle(Unknown Source)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.setLevel(Unknown Source)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.access$000(Unknown Source)
at ch.ethz.iks.concierge.framework.Framework.startup(Unknown Source)
at ch.ethz.iks.concierge.framework.Framework.main(Unknown Source)
at sun.misc.CVM.runMain(Unknown Source)
org.osgi.framework.BundleException: Cannot resolve bundle activator Bundle [1]: file:./bundles/event-admin-1.0_RC2.jar
at ch.ethz.iks.concierge.framework.BundleClassLoader.resolveBundle(Unknown Source)
at ch.ethz.iks.concierge.framework.BundleImpl.startBundle(Unknown Source)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.setLevel(Unknown Source)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.access$000(Unknown Source)
at ch.ethz.iks.concierge.framework.Framework.startup(Unknown Source)
at ch.ethz.iks.concierge.framework.Framework.main(Unknown Source)
at sun.misc.CVM.runMain(Unknown Source)
STARTING file:./bundles/service-tracker-1.0_RC2.jar
STARTING file:./bundles/shell-1.0_RC2.jar
java.lang.NoClassDefFoundError: java/util/EventListener
at java.lang.Class.loadSuperClasses(Unknown Source)
at sun.misc.Launcher$AppClassLoader.defineClassPrivate(Unknown Source)
at sun.misc.Launcher$AppClassLoader.access$500(Unknown Source)
at sun.misc.Launcher$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Unknown Source)
at java.security.AccessController.doPrivileged(Unknown Source)
at sun.misc.Launcher$AppClassLoader.doClassFind(Unknown Source)
at sun.misc.Launcher$AppClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.loadSuperClasses(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at ch.ethz.iks.concierge.framework.BundleClassLoader.findOwnClass(Unknown Source)
at ch.ethz.iks.concierge.framework.BundleClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.ClassLoader.resolveClass0(Native Method)
at java.lang.ClassLoader.resolveClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at ch.ethz.iks.concierge.framework.BundleClassLoader.resolveBundle(Unknown Source)
at ch.ethz.iks.concierge.framework.BundleImpl.startBundle(Unknown Source)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.setLevel(Unknown Source)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.access$000(Unknown Source)
at ch.ethz.iks.concierge.framework.Framework.startup(Unknown Source)
at ch.ethz.iks.concierge.framework.Framework.main(Unknown Source)
at sun.misc.CVM.runMain(Unknown Source)
org.osgi.framework.BundleException: Cannot resolve bundle activator Bundle [3]: file:./bundles/shell-1.0_RC2.jar
at ch.ethz.iks.concierge.framework.BundleClassLoader.resolveBundle(Unknown Source)
at ch.ethz.iks.concierge.framework.BundleImpl.startBundle(Unknown Source)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.setLevel(Unknown Source)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.access$000(Unknown Source)
at ch.ethz.iks.concierge.framework.Framework.startup(Unknown Source)
at ch.ethz.iks.concierge.framework.Framework.main(Unknown Source)
at sun.misc.CVM.runMain(Unknown Source)
STARTING file:./bundles/concierge_gui-1.0_RC2.jar
java.lang.NoClassDefFoundError: java.awt.Window
at java.lang.ClassLoader.resolveClass0(Native Method)
at java.lang.ClassLoader.resolveClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at ch.ethz.iks.concierge.framework.BundleClassLoader.resolveBundle(Unknown Source)
at ch.ethz.iks.concierge.framework.BundleImpl.startBundle(Unknown Source)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.setLevel(Unknown Source)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.access$000(Unknown Source)
at ch.ethz.iks.concierge.framework.Framework.startup(Unknown Source)
at ch.ethz.iks.concierge.framework.Framework.main(Unknown Source)
at sun.misc.CVM.runMain(Unknown Source)
org.osgi.framework.BundleException: Cannot resolve bundle activator Bundle [4]: file:./bundles/concierge_gui-1.0_RC2.jar
at ch.ethz.iks.concierge.framework.BundleClassLoader.resolveBundle(Unknown Source)
at ch.ethz.iks.concierge.framework.BundleImpl.startBundle(Unknown Source)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.setLevel(Unknown Source)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.access$000(Unknown Source)
at ch.ethz.iks.concierge.framework.Framework.startup(Unknown Source)
at ch.ethz.iks.concierge.framework.Framework.main(Unknown Source)
at sun.misc.CVM.runMain(Unknown Source)
---------------------------------------------------------
Framework started in 0.103 seconds.
---------------------------------------------------------

Message was edited by: lonely956

davyp
Offline
Joined: 2007-01-03
Points: 0

You need at least pMEA Foundation Profile. CDC only will not suffice:

/phoneme/linux/cdc/bin/cvm -jar framework.jar -xargs minimal.xargs
java.lang.NoClassDefFoundError: java.net.HttpURLConnection
at java.lang.Class.getMethod0(Native Method)
at java.lang.Class.getMethod(Unknown Source)
at sun.misc.CVM.runMain(Unknown Source)

Make sure you set J2ME_CLASSLIB=foundation when compiling phoneME Advanced.

Davy

lonely956
Offline
Joined: 2008-06-04
Points: 0

pMEA Foundation Profile(it is other file?or it's make at cvm?)
i cann't coding that..

and how to get it or set it in the classlib

it is besetments for you i am so sorry..

Message was edited by: lonely956

Message was edited by: lonely956

Hinkmond Wong

phonemeadvanced@mobileandembedded.org wrote:
> pMEA Foundation Profile<===it is other file?or it's make at cvm?
> i cann't coding that..
>
> and how to get it or set it in the classlib
>
> it is besetments for you i am so sorry..
>

Hi lonely956,

It is very difficult to understand your question above. Are you asking
if you can use a JAR file to add to any Java VM to represent a phoneME
Foundation Profile stack?

And, if that is so, are you asking where you can find that JAR file?

If you are asking if Foundation Profile is just a JAR file, then the
answer is no. You need properly built bin/ and lib/ sub-directories
from a CDC/Foundation Profile build of phoneME Advanced in order to have
a correct pMEA Foundation Profile stack (not just the JAR file).

You can find the complete stack (with both the correct bin/ and lib
sub-directories and their contents) at our pMEA downloads page:

https://phoneme.dev.java.net/downloads_page.html#advanced

For example:

http://download.java.net/mobileembedded/phoneme/advanced/phoneme_advance...
- Download and unzip the above bundle
- Look inside for the phoneme_advanced_mr2/bin and
phoneme_advanced_mr2/lib sub-directories where you will find the bin/cvm
and lib/basis.jar (also contains Foundation Profile classes) files that
represent the pMEA Foundation Profile stack.

Hinkmond

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net

cjplummer
Offline
Joined: 2006-10-16
Points: 0

I think he's looking for the proper build flag, which is J2ME_CLASSLIB=foundation.

Chirs

Hinkmond Wong

phonemeadvanced@mobileandembedded.org wrote:
> I think he's looking for the proper build flag, which is J2ME_CLASSLIB=foundation.
>
>

Thanks, Chris. That sounds more likely.

Hi lonely956,

Have you tried building like this:

cd build/linux-x86-generic
make J2ME_CLASSLIB=foundation

For more info see:

https://phoneme.dev.java.net/content/pmAdv-buildhost.html#SimpleBuild
(NOTE: Scroll down to the section that says "Building Foundation Profile")

Hinkmond

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net

lonely956
Offline
Joined: 2008-06-04
Points: 0

sorry i too busy..

the java lib is pass,but i want to use concierge OSGI(http://concierge.sourceforge.net/properties.html)

i can't find the lib too...

***************************************************************************
at ch.ethz.iks.concierge.framework.BundleClassLoader.resolveBundle(Unknown Source)
at ch.ethz.iks.concierge.framework.BundleImpl.startBundle(Unknown Source)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.setLevel(Unknown Source)
at ch.ethz.iks.concierge.framework.Framework$SystemBundle.access$000(Unknown Source)
at ch.ethz.iks.concierge.framework.Framework.startup(Unknown Source)
at ch.ethz.iks.concierge.framework.Framework.main(Unknown Source

ken_gilmer
Offline
Joined: 2007-01-19
Points: 0

Hey...hmm how are you starting the CVM? If I do from the phoneme base directory:

bin/cvm -jar concierge.jar

That works for me.

hth
ken

ken_gilmer
Offline
Joined: 2007-01-19
Points: 0

Hi, yes TErrence and Davy are both correct. Also, I know apache felix runs fine on pmea.

Thx, ken

terrencebarr
Offline
Joined: 2004-03-04
Points: 0

I believe BugLabs is successfully using Concierge (http://concierge.sourceforge.net/) on phoneME Advanced. Ken might be able to talk more about that.

-- Terrence

davyp
Offline
Joined: 2007-01-03
Points: 0

I can run knopflerfish just fine on phoneME Advanced. You just have to
avoid loading OSGi bundles that require APIs that are Java SE specific.

Davy