Skip to main content

Help! UnsatisfiedLinkError : getNativeEventQueueHandle

24 replies [Last post]
musicguitar
Offline
Joined: 2008-03-02
Points: 0

My phoneME Advanced (phoneme_advanced_mr2-b61)is for i.Mx21.(ARM9).OS is Linux.
The build command as follow:
#make JDK_HOME=/usr/java/j2sdk1.4.2_16 J2ME_CLASSLIB=personal CVM_TARGET_TOOLS_PREFIX=/opt/Embedix/usr/local/arm-linux/gcc-3.3.2-glibc-2.3.2/bin/arm-linux- QT_TARGET_DIR=/workspace/mx21/compile_target/qt-embedded-3.3.8/ HOST_CC=gcc HOST_CCC=g++ USE_MIDP=true USE_DIRECTFB=false QTEMBEDDED=true QTOPIA=false QT_VERSION=3 CVM_DEBUG=true

Using the cvm to run HelloWorld is find.
But when I used midplet suite the error happened.

Command:
/mnt/java/cdc/bin/cvm -Dsun.midp.library.name=midp -Dsun.midp.home.path=/mnt/java/cdc/midp/midp_linux_fb_gcc -Dcom.sun.midp.mainClass.name=com.sun.midp.main.CdcMIDletSuiteLoader sun.misc.MIDPLauncher -1 com.sun.midp.scriptutil.SuiteLister

Error messege:
java.lang.UnsatisfiedLinkError: com.sun.midp.events.EventQueue.getNativeEventQueueHandle()I
at com.sun.midp.events.EventQueue.()V(EventQueue.java:69)
at java.lang.Class.runStaticInitializers()V(Class.java:1621)
at com.sun.midp.main.AbstractMIDletSuiteLoader.init()V(AbstractMIDletSuiteLoader.java:146)
at com.sun.midp.main.CdcMIDletSuiteLoader.init()V(CdcMIDletSuiteLoader.java:114)
at com.sun.midp.main.AbstractMIDletSuiteLoader.runMIDletSuite()V(AbstractMIDletSuiteLoader.java:257)
at com.sun.midp.main.CdcMIDletSuiteLoader.main([Ljava/lang/String;)V(CdcMIDletSuiteLoader.java:103)
at sun.misc.MIDPLauncher.main([Ljava/lang/String;)V(MIDPLauncher.java:106)
at sun.misc.CVM.runMain()V(CVM.java:514)

I had checked EventQueue.class. It's right directry path.
And I used "grep -r getNativeEventQueueHandle ./cdc/build/linux-arm-generic/midp/midp_linux_fb_gcc/classes/com/sun/midp/events/" command.
The result is "Binary file ./cdc/build/linux-arm-generic/midp/midp_linux_fb_gcc/classes/com/sun/midp/events/EventQueue.class matches".
It seems right.

What's wrong with it???
Any idea???
Thanks.

musicguitar

Reply viewing options

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

> Thank you, Hinkmond.
>
> I tried to build CDC/MIDP/Personal Basis Profile.
> Used the build flags(enable jump):
>
> make
> JDK_HOME=/usr/java/j2sdk1.4.2_16
> J2ME_CLASSLIB=basis
> CVM_TARGET_TOOLS_PREFIX=/opt/Embedix/usr/local/arm-lin
> ux/gcc-3.3.2-glibc-2.3.2/bin/arm-linux-
> QT_TARGET_DIR=/home/darren/workspace/mx21/compile_targ
> et/qt-embedded-3.3.8/
> HOST_CC=gcc
> HOST_CCC=g++
> USE_MIDP=true
> USE_JUMP=true
> CVM_JIT=true
> CVM_OPTIMIZED=true
> QTEMBEDDED=true
> QTOPIA=false
> QT_VERSION=3
>
> There was another error occur.
> [b]Can't find
> com.sun.midp.main.CdcMIDletSuiteLoader[/b]
>
> I checked the CdcMIDletSuiteLoader.class, which was
> not been compiled.
> I copied an CdcMIDletSuiteLoader.class to the
> /mnt/java_basis_midp_jump/midp/midp_linux_fb_gcc/class
> es/com/sun/midp/main/ directory.
> This error also happened.
>
> I tried to execute an old cvm, which is
> CDC/basis/MIDP(without jump), and classes path
> pointed to current cvm(with jump) classes. It works
> fine.
>
> /mnt/java_basis/bin/cvm -Dsun.midp.library.name=midp
> -Dsun.midp.home.path=/mnt/java_basis_midp_jump/midp/mi
> dp_linux_fb_gcc
> -Dcom.sun.midp.mainClass.name=com.sun.midp.main.CdcMID
> letSuiteLoader sun.misc.MIDPLauncher -1
> com.sun.midp.scriptutil.SuiteLister
>
>
>
> When I build cvm without jump,
> CdcMIDletSuiteLoader.class will be compiled.
> I build cvm with jump, CdcMIDletSuiteLoader.class
> will be gone.
>
>
> Thanks a lot.
>
> musicguitar

hi, everyone

When I port jsr135, I encounter the same problem.

there are two situation for me to choose,

1.build without jump USE_JUMP=false(this also disable JSR 135, so not satisfy
me), then the CdcMIDletSuiteLoader will be compiled and the cvm is all right in
b34 version

2.build with jump USE_JUMP=true(then JSR 135 can be compiled), however, the
CdcMIDletSuiteLoader will not be compiled, so the cvm can not load j2me classes

So my question is if there is some way for us to load j2me classes without
CdcMIDletSuiteLoader, any way can run the j2me classes?

For simplification, how can cvm load classes with jump?

Thanks,

Regards,
Ivannie

Hinkmond Wong

phonemeadvanced@mobileandembedded.org wrote:
> hi, everyone
>
> When I port jsr135, I encounter the same problem.
>
> there are two situation for me to choose,
>
> 1.build without jump USE_JUMP=false(this also disable JSR 135, so not satisfy
> me), then the CdcMIDletSuiteLoader will be compiled and the cvm is all right in
> b34 version
>
> 2.build with jump USE_JUMP=true(then JSR 135 can be compiled), however, the
> CdcMIDletSuiteLoader will not be compiled, so the cvm can not load j2me classes
>
> So my question is if there is some way for us to load j2me classes without
> CdcMIDletSuiteLoader, any way can run the j2me classes?
>
> For simplification, how can cvm load classes with jump?
>
>

Hi Ivannie, you cannot build jsr135 since it is not open sourced
completely. What you see in the repository is just an incomplete set of
reference source files and cannot be built.

Even if you load the classes from jsr135, that won't help, since the
jsr135 component is incomplete in the open source repository.

I think you misunderstood why you see a component named, jsr135, in our
repository. Sorry, if you thought it is buildable.

>> Hi, Hinkmond
>>
>> Thanks for your reply.
>>
>> I focus on the javacall architecture, and find the way to port JSRs, and a lot work
>> will do after.
>>
>> Now I am a little confused by the jump, and what is the role jump plays in the cvm-jump-javacall group?
>>
>> Thank you!

JUMP is an abstraction layer that enables calls to be made from either
CLDC or CDC to common libraries and JSRs, while also allowing creation
of isolated process-based presentation layers.

For more info see:

http://wiki.java.net/bin/view/Mobileandembedded/PhoneMEAdvancedSimpleBas...

But, for your case, JUMP seems orthogonal to what you are trying to do.

You might want to instead try porting an easier JSR first to get the
hang of building a JSR with phoneME Advanced and learning about the
interfaces from a JSR to phoneME.

Are you able to build jsr172 OK with phoneME Advanced?

Hinkmond

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

ivannie
Offline
Joined: 2008-06-05
Points: 0

>Hi Ivannie, you cannot build jsr135 since it is not open sourced
>completely. What you see in the repository is just an incomplete set of
>reference source files and cannot be built.

>Even if you load the classes from jsr135, that won't help, since the
>jsr135 component is incomplete in the open source repository.

>I think you misunderstood why you see a component named, jsr135, in our
>repository. Sorry, if you thought it is buildable.

[b]Hi, Hinkmond

Thanks for your tip. I took a glance of
<>, the Porting Optional JSRs => Porting JSR 135

and maybe I haven't understood all of pMEA, I think if I realize the interfaces of
javacall of JSR135, the mmapi could be used.

What do you mean JSR135 is not open sourced? The java classes or the native method, or both of them?[/b]

>JUMP is an abstraction layer that enables calls to be made from either
>CLDC or CDC to common libraries and JSRs, while also allowing creation
>of isolated process-based presentation layers.

>For more info see:

>http://wiki.java.net/bin/view/Mobileandembedded/PhoneMEAdvancedSimpleBasis>AMS

>But, for your case, JUMP seems orthogonal to what you are trying to do.

[b]With my understanding, JUMP is another way to manage the .jar packages, run
them, install and uninstall them, is not it?

When on x86 platform, I can run runjump and runinstall in a QVFB environment,
but not success running jar files. Is the runjump available of framebuffer under QT
not QVFB?

Last time my expression is poor, the situation of running a jar package is not
concerning any JSRs, but if I use JUMP, how can I run jar packages, this is my
puzzle.
So I think if this is the answer that runs a jar without CdcMIDletSuiteLoader,
-- Using the runjump?[/b]

>You might want to instead try porting an easier JSR first to get the
>hang of building a JSR with phoneME Advanced and learning about the
>interfaces from a JSR to phoneME.

>Are you able to build jsr172 OK with phoneME Advanced?

[b]Yes, your advice is very helpful to me, thank you!

Regards,
Ivannie[/b]

Hinkmond Wong

Hi Ivannie,

phonemeadvanced@mobileandembedded.org wrote:
>
> What do you mean JSR135 is not open sourced? The java classes or the native method, or both of them?[/b]
>

The implementation of JSR 135 is not open sourced, just the reference
interfaces are. So, you cannot build JSR 135 from phoneME.

> [b]With my understanding, JUMP is another way to manage the .jar packages, run
> them, install and uninstall them, is not it?
>
> When on x86 platform, I can run runjump and runinstall in a QVFB environment,
> but not success running jar files. Is the runjump available of framebuffer under QT
> not QVFB?
>

OK. Now, I understand how you are running. The JUMP build you are
running will only work with your QVFB environment. It will not work
with DirectFB with Qt. We do not supply support for that build in
phoneME, so it is not buildable.

> Last time my expression is poor, the situation of running a jar package is not
> concerning any JSRs, but if I use JUMP, how can I run jar packages, this is my
> puzzle.
> So I think if this is the answer that runs a jar without CdcMIDletSuiteLoader,
> -- Using the runjump?[/b]
>

I'm not sure I understand your question. What do you mean by "run jar
packages"? Can you give some examples of what you mean?

Hinkmond

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

ivannie
Offline
Joined: 2008-06-05
Points: 0

Hi,Hinkmond

> OK. Now, I understand how you are running. The JUMP
> build you are
> running will only work with your QVFB environment.
> It will not work
> ith DirectFB with Qt. We do not supply support for
> that build in
> phoneME, so it is not buildable.
>

Is that to say I have no chance to run a MIDlet with JUMP?

>
> > Last time my expression is poor, the situation of
> running a jar package is not
> > concerning any JSRs, but if I use JUMP, how can I
> run jar packages, this is my
> > puzzle.
> > So I think if this is the answer that runs a jar
> without CdcMIDletSuiteLoader,
> > -- Using the runjump?
> >
>
> I'm not sure I understand your question. What do you
> mean by "run jar
> packages"? Can you give some examples of what you
> mean?

Sorry, I mean let cvm run a MIDlet(The MIDlet classes always in a jar file, so - -)

>
> Hinkmond

I can run a MIDlet with command like:

bin/cvm -Dsun.midp.library.name=midp \
-Dsun.midp.home.path=/opt/pmea/cdc/build/linux-mips-eb/midp/midp_linux_fb_gcc \
-Dcom.sun.midp.mainClass.name=com.sun.midp.main.CdcMIDletSuiteLoader \ sun.misc.MIDPLauncher \
-midppath /opt/pmea/cdc/build/linux-mips-eb/midp/midp_linux_fb_gcc/classes \
-suitepath /opt/pmea/MIDlets/BattleCity.jar -1 tank.TankMidlet

and the compilation is without JUMP. However, with JUMP, how can I run a MIDlet?

Regards,
Ivannie

Hinkmond Wong

phonemeadvanced@mobileandembedded.org wrote:
> Hi,Hinkmond
>
>
> Is that to say I have no chance to run a MIDlet with JUMP?
>

There is no chance currently to run MIDP on JUMP on DirectFB w/Qt.
However MIDlets will run with JUMP on Qt/Embedded. They are 2 very
different builds.

>> I'm not sure I understand your question. What do you
>> mean by "run jar
>> packages"? Can you give some examples of what you
>> mean?
>>
>
> Sorry, I mean let cvm run a MIDlet(The MIDlet classes always in a jar file, so - -)
>
>
>
> I can run a MIDlet with command like:
>
> bin/cvm -Dsun.midp.library.name=midp \
> -Dsun.midp.home.path=/opt/pmea/cdc/build/linux-mips-eb/midp/midp_linux_fb_gcc \
> -Dcom.sun.midp.mainClass.name=com.sun.midp.main.CdcMIDletSuiteLoader \ sun.misc.MIDPLauncher \
> -midppath /opt/pmea/cdc/build/linux-mips-eb/midp/midp_linux_fb_gcc/classes \
> -suitepath /opt/pmea/MIDlets/BattleCity.jar -1 tank.TankMidlet
>
> and the compilation is without JUMP. However, with JUMP, how can I run a MIDlet?
>

Well, first you need a target device that can support Qt/Embedded. If
you don't have one, you cannot build MIDP on JUMP. The other problem is
that your MIDlet is probably one that uses JSR 135 (MMAPI) since it
sounds like a game (TankMidlet). If TankMidlet does use JSR 135, you
cannot use the current pMEA build of MIDP, since we do not have a JSR
135 implementation. That means it won't run at all, if that's the case
that it needs JSR 135.

Hinkmond

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

ivannie
Offline
Joined: 2008-06-05
Points: 0

Hi, Hinkmond

> There is no chance currently to run MIDP on JUMP on
> DirectFB w/Qt.
> However MIDlets will run with JUMP on Qt/Embedded.
> They are 2 very
> ifferent builds.
>

Now I have a handset with Linux and Qt/Embedded-2.3.10,
so I have run the tankMidlet successfully without JUMP.

You said MIDlets can run with JUMP on Qt/Embedded,
and what is the way to it?

One more question, is pMEA support any JSR without JUMP,
that is to say if JSRs requires JUMP?

>
> >> I'm not sure I understand your question. What do
> you
> >> mean by "run jar
> >> packages"? Can you give some examples of what you
> >> mean?
> >>
> >
> > Sorry, I mean let cvm run a MIDlet(The MIDlet
> classes always in a jar file, so - -)
> >
> >
> >
> > I can run a MIDlet with command like:
> >
> > bin/cvm -Dsun.midp.library.name=midp \
> >
> -Dsun.midp.home.path=/opt/pmea/cdc/build/linux-mips-eb
> /midp/midp_linux_fb_gcc \
> >
> -Dcom.sun.midp.mainClass.name=com.sun.midp.main.CdcMID
> letSuiteLoader \ sun.misc.MIDPLauncher \
> > -midppath
> /opt/pmea/cdc/build/linux-mips-eb/midp/midp_linux_fb_g
> cc/classes \
> > -suitepath /opt/pmea/MIDlets/BattleCity.jar -1
> tank.TankMidlet
> >
> > and the compilation is without JUMP. However, with
> JUMP, how can I run a MIDlet?
> >
>
> Well, first you need a target device that can support
> Qt/Embedded. If
> you don't have one, you cannot build MIDP on JUMP.

Yes, I have one and I have built MIDP on JUMP succesfully
But I have no idea how to use it T_T

> The other problem is
> hat your MIDlet is probably one that uses JSR 135
> (MMAPI) since it
> sounds like a game (TankMidlet). If TankMidlet does
> use JSR 135, you
> cannot use the current pMEA build of MIDP, since we
> do not have a JSR
> 135 implementation. That means it won't run at all,
> if that's the case
> that it needs JSR 135.
>

En...I get to know it, the JSR135 is a hard piece of cake^_^

>
> Hinkmond
>

Regards,
Ivannie

Hinkmond Wong

phonemeadvanced@mobileandembedded.org wrote:
> Hi, Hinkmond
>
>
>> There is no chance currently to run MIDP on JUMP on
>> DirectFB w/Qt.
>> However MIDlets will run with JUMP on Qt/Embedded.
>> They are 2 very
>> ifferent builds.
>>
>>
>
> Now I have a handset with Linux and Qt/Embedded-2.3.10,
> so I have run the tankMidlet successfully without JUMP.
>
> You said MIDlets can run with JUMP on Qt/Embedded,
> and what is the way to it?
>

First you have to find a Qtopia SDK native cross-toolchain for your
device and install in a location such as /opt/Qtopia. After you do that
then, you have to build this way:

J2ME_CLASSLIB=basis
QTEMBEDDED=true
QTOPIA=false
QT_TARGET_DIR=/opt/Qtopia
USE_MIDP=true
USE_JUMP=true
CVM_JIT=true
CVM_OPTIMIZED=true
GCC_VERSION=-4.0
HOST_CC=/usr/bin/gcc-4.0
HOST_CCC=/usr/bin/g++-4.0

> One more question, is pMEA support any JSR without JUMP,
> that is to say if JSRs requires JUMP?
>

There are only limited (one) phoneME JSRs that pMEA can support without
JUMP: JSR 172.

>>
>>
>> -Dsun.midp.home.path=/opt/pmea/cdc/build/linux-mips-eb
>> /midp/midp_linux_fb_gcc \
>>
>> -Dcom.sun.midp.mainClass.name=com.sun.midp.main.CdcMID
>> letSuiteLoader \ sun.misc.MIDPLauncher \
>>
>>> -midppath
>>>
>> /opt/pmea/cdc/build/linux-mips-eb/midp/midp_linux_fb_g
>> cc/classes \
>>
>>> -suitepath /opt/pmea/MIDlets/BattleCity.jar -1
>>>
>> tank.TankMidlet
>>
>>> and the compilation is without JUMP. However, with
>>>
>> JUMP, how can I run a MIDlet?
>>
>>>
>>>
>> Well, first you need a target device that can support
>> Qt/Embedded. If
>> you don't have one, you cannot build MIDP on JUMP.
>>
>
> Yes, I have one and I have built MIDP on JUMP succesfully
> But I have no idea how to use it T_T
>

Since there is no JSR 135 with MIDP on JUMP, I wouldn't even suggest
trying to use MIDP on JUMP for that purpose. MIDP on JUMP is really not
a complete implementation of a full MIDP stack (not enough JSR or AMS
support). It was really meant as more of a proof-of-concept starting
point for research that as an actual MIDP implementation to use to run
real-world MIDlets.

Hinkmond

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

ivannie
Offline
Joined: 2008-06-05
Points: 0

Hi, Hinkmond

Now I have already finished the compile as you said.

The components here are: CDC, MIDP, JUMP

Now how can I run a MIDlet on CDC with JUMP?

There is a script in the $BUILD_DIR/midp/bin/mips/runMidlet,
however, the script is for CDC without JUMP, because when
I execute this script there is error:

Can't find com.sun.midp.main.CdcMIDletSuiteLoader

So, without the "com.sun.midp.main.CdcMIDletSuiteLoader"
how can the cvm run a Midlet?

Regards,
Ivannie

Hinkmond Wong

phonemeadvanced@mobileandembedded.org wrote:
> Hi, Hinkmond
>
> Now I have already finished the compile as you said.
>
> The components here are: CDC, MIDP, JUMP
>
> Now how can I run a MIDlet on CDC with JUMP?
>
> There is a script in the $BUILD_DIR/midp/bin/mips/runMidlet,
> however, the script is for CDC without JUMP, because when
> I execute this script there is error:
>
> Can't find com.sun.midp.main.CdcMIDletSuiteLoader
>
> So, without the "com.sun.midp.main.CdcMIDletSuiteLoader"
> how can the cvm run a Midlet?
>

Hi Ivannie,

Sorry, you can't use com.sun.midp.main.CdcMIDletSuiteLoader with
CDC/MIDP/JUMP. It's not supported currently. Since CDC/MIDP/JUMP is
really just an incomplete starter implementation that is meant for using
as a reference only (not for actual running on MIDlets), you can for now
install and launch Basis Xlets, but not MIDP MIDlets (which was left as
a hook for future development):

See:
http://wiki.java.net/bin/view/Mobileandembedded/PhoneMEAdvancedSimpleBas...

Excerpt:
"Theoretically, phoneME Advanced and JUMP should be able to support JUMP
Presentation Modules written with Personal Basis Profile components or
MIDP components. Note that there hasn't been a JUMP Presentation Module
written with MIDP components yet, so this has been untested."

Not only is it untested, but also unsupported (which means it won't work).

Hinkmond

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

Hinkmond Wong

phonemeadvanced@mobileandembedded.org wrote:
> Thanks for your reply, Hinkmond.
>
> You said can't correct combine of CDC, MIDP, and Personal Profile.
> So I tried others combination.
>
> 1. [b]Personal Basis Profile, CDC, MIDP[/b]
> The same error messeges.
>
> 2. [b]Foundation Profile, CDC, MIDP[/b]
> The same error messeges.
>
> So, all MIDP will occur "java.lang.UnsatisfiedLinkError: com.sun.midp.events.EventQueue.getNativeEventQueueHandle()" in my phoneME.
>
>
>

Hi musicguitar,

Did you happen to see an error message like this when you were building
#2 (CDC/FP/MIDP)?

...
cc
/home/hinkmond/workingcopies/test/cdc/src/share/native/java/lang/fdlibm/src/w_sqrt.c
w_sqrt.c lib
obj/fdlibm.a
Linking
/home/hinkmond/workingcopies/test/cdc/build/win32-arm-wm5/./bin/cvmi.dll

LINK : fatal error LNK1181: cannot open input file
'c:/home/hinkmond/workingcopies/test/cdc/build/win32-arm-wm5/lib/javacall.dll'

make: ***
[/home/hinkmond/workingcopies/test/cdc/build/win32-arm-wm5/./bin/cvmi.dll]
Error 157
...

I think there may have been a change in our Makefiles that renames our
naming convention of our libs from *.dll to *.lib, but our
javacall-ext-jump branch looks like it still wants to use the
javacall.dll naming convention.

But, I'm not sure if it is just my environment where that is happening.

Hinkmond

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

musicguitar
Offline
Joined: 2008-03-02
Points: 0

Hi Hinkmond
My operation system is Linux.
Currently, I don't have WinMobile environment. So, I can not test the error like this.

Thanks a lot!

Hinkmond Wong

phonemeadvanced@mobileandembedded.org wrote:
> Hi Hinkmond
> My operation system is Linux.
> Currently, I don't have WinMobile environment. So, I can not test the error like this.
>
> Thanks a lot!
>

OK. For Linux you might want to check your build flags.

Here's the build flags that work for Linux for the CDC/MIDP/Personal
Basis Profile build:

make
J2ME_CLASSLIB=basis
QTEMBEDDED=true
QTOPIA=false
QT_TARGET_DIR=/opt/Qtopia
USE_MIDP=true
USE_JUMP=true
CVM_JIT=true
CVM_OPTIMIZED=true
GCC_VERSION=-4.0
HOST_CC=/usr/bin/gcc-4.0
HOST_CCC=/usr/bin/g++-4.0

Do you have similar settings? Maybe you are missing "USE_JUMP=true"?

Hinkmond

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

musicguitar
Offline
Joined: 2008-03-02
Points: 0

Thank you, Hinkmond.

I tried to build CDC/MIDP/Personal Basis Profile. Used the build flags(enable jump):

make
JDK_HOME=/usr/java/j2sdk1.4.2_16
J2ME_CLASSLIB=basis CVM_TARGET_TOOLS_PREFIX=/opt/Embedix/usr/local/arm-linux/gcc-3.3.2-glibc-2.3.2/bin/arm-linux-
QT_TARGET_DIR=/home/darren/workspace/mx21/compile_target/qt-embedded-3.3.8/
HOST_CC=gcc
HOST_CCC=g++
USE_MIDP=true
USE_JUMP=true
CVM_JIT=true
CVM_OPTIMIZED=true
QTEMBEDDED=true
QTOPIA=false
QT_VERSION=3

There was another error occur.
[b]Can't find com.sun.midp.main.CdcMIDletSuiteLoader[/b]

I checked the CdcMIDletSuiteLoader.class, which was not been compiled.
I copied an CdcMIDletSuiteLoader.class to the /mnt/java_basis_midp_jump/midp/midp_linux_fb_gcc/classes/com/sun/midp/main/ directory.
This error also happened.

I tried to execute an old cvm, which is CDC/basis/MIDP(without jump), and classes path pointed to current cvm(with jump) classes. It works fine.

/mnt/java_basis/bin/cvm -Dsun.midp.library.name=midp -Dsun.midp.home.path=/mnt/java_basis_midp_jump/midp/midp_linux_fb_gcc -Dcom.sun.midp.mainClass.name=com.sun.midp.main.CdcMIDletSuiteLoader sun.misc.MIDPLauncher -1 com.sun.midp.scriptutil.SuiteLister

When I build cvm without jump, CdcMIDletSuiteLoader.class will be compiled.
I build cvm with jump, CdcMIDletSuiteLoader.class will be gone.

Thanks a lot.

musicguitar

Gary

You have found the right combination.

JUMP/MIDP/CDC had a more complete Java AMS interface
- but the functionality has been on hold for some time
MIDP/CDC has only testing interfaces for manual AMS
e.g. com.sun.midp.scriptutil are not meant for deployment
on any real systems. CdcMidletSuiteLoader is a simple
front end to the scriptutil interfaces.

phonemeadvanced@mobileandembedded.org wrote:
> Thank you, Hinkmond.
>
> I tried to build CDC/MIDP/Personal Basis Profile. Used the build flags(enable jump):
>
> make
> JDK_HOME=/usr/java/j2sdk1.4.2_16
> J2ME_CLASSLIB=basis CVM_TARGET_TOOLS_PREFIX=/opt/Embedix/usr/local/arm-linux/gcc-3.3.2-glibc-2.3.2/bin/arm-linux-
> QT_TARGET_DIR=/home/darren/workspace/mx21/compile_target/qt-embedded-3.3.8/
> HOST_CC=gcc
> HOST_CCC=g++
> USE_MIDP=true
> USE_JUMP=true
> CVM_JIT=true
> CVM_OPTIMIZED=true
> QTEMBEDDED=true
> QTOPIA=false
> QT_VERSION=3
>
> There was another error occur.
> [b]Can't find com.sun.midp.main.CdcMIDletSuiteLoader[/b]
>
> I checked the CdcMIDletSuiteLoader.class, which was not been compiled.
> I copied an CdcMIDletSuiteLoader.class to the /mnt/java_basis_midp_jump/midp/midp_linux_fb_gcc/classes/com/sun/midp/main/ directory.
> This error also happened.
>
> I tried to execute an old cvm, which is CDC/basis/MIDP(without jump), and classes path pointed to current cvm(with jump) classes. It works fine.
>
> /mnt/java_basis/bin/cvm -Dsun.midp.library.name=midp -Dsun.midp.home.path=/mnt/java_basis_midp_jump/midp/midp_linux_fb_gcc -Dcom.sun.midp.mainClass.name=com.sun.midp.main.CdcMIDletSuiteLoader sun.misc.MIDPLauncher -1 com.sun.midp.scriptutil.SuiteLister
>
>
>
> When I build cvm without jump, CdcMIDletSuiteLoader.class will be compiled.
> I build cvm with jump, CdcMIDletSuiteLoader.class will be gone.
>
>
> Thanks a lot.
>
> musicguitar
> [Message sent by forum member 'musicguitar' (musicguitar)]
>
> http://forums.java.net/jive/thread.jspa?messageID=263734
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
> For additional commands, e-mail: advanced-help@phoneme.dev.java.net
>
>

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

Hinkmond Wong

Gary wrote:
> You have found the right combination.
>
> JUMP/MIDP/CDC had a more complete Java AMS interface
> - but the functionality has been on hold for some time
> MIDP/CDC has only testing interfaces for manual AMS
> e.g. com.sun.midp.scriptutil are not meant for deployment
> on any real systems. CdcMidletSuiteLoader is a simple
> front end to the scriptutil interfaces.

Hi musicguitar,

Gary has a good summary above. Extending to that, JUMP/MIDP/CDC adds
the Personal Basis Profile, while MIDP/CDC does not.

Do you have a requirement on J2ME_CLASSLIB=basis?

If not, maybe the way to go is for your to not USE_JUMP and instead
build the MIDP/CDC stack.

See:
http://forums.java.net/jive/thread.jspa?messageID=260695

Hinkmond

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

Gary

The JUMP/PBP dependency covers the MIDP PushRegistry capabilities.
That is one reason the MIDP/FP is only a partial implementation
used for testing purposes.

Hinkmond Wong wrote:
> Gary wrote:
>> You have found the right combination.
>>
>> JUMP/MIDP/CDC had a more complete Java AMS interface
>> - but the functionality has been on hold for some time
>> MIDP/CDC has only testing interfaces for manual AMS
>> e.g. com.sun.midp.scriptutil are not meant for deployment
>> on any real systems. CdcMidletSuiteLoader is a simple
>> front end to the scriptutil interfaces.
>
>
> Hi musicguitar,
>
> Gary has a good summary above. Extending to that, JUMP/MIDP/CDC adds
> the Personal Basis Profile, while MIDP/CDC does not.
>
> Do you have a requirement on J2ME_CLASSLIB=basis?
>
> If not, maybe the way to go is for your to not USE_JUMP and instead
> build the MIDP/CDC stack.
>
> See:
> http://forums.java.net/jive/thread.jspa?messageID=260695
>
>
> Hinkmond
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
> For additional commands, e-mail: advanced-help@phoneme.dev.java.net
>

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

musicguitar
Offline
Joined: 2008-03-02
Points: 0

Thank you again Chris
I tried to use CVM_PRELOAD_LIB=true.
Thers's another error occur.

The error messeges:

[i]# /mnt/java_2/bin/cvm -Dsun.midp.library.name=midp -Dsun.midp.home.path=/mnt/java_2/midp/midp_linux_fb_gcc -Dcom.sun.midp.mainClass.name=com.sun.midp.main.CdcMIDletSuiteLoader sun.misc.MIDPLauncher -1 com.sun.midp.scriptutil.SuiteLister
CVM Configuration:
Java stack chunk size (stackChunkSize): 2048
Java stack minimum size (stackMinSize): 3072
Java stack maximum size (stackMaxSize): 131072
GC[SS]: Initialized semi-space gen for generational GC
Size of *each* semispace in bytes=1048576
Limits of generation = [0x401a1000,0x403a1000)
First semispace = [0x401a1000,0x402a1000)
Second semispace = [0x402a1000,0x403a1000)
Current semispace = First semispace
GC[MC]: Initialized mark-compact gen for generational GC
Size of the space in bytes=1048576
Limits of generation = [0x403a1000,0x404a1000)
GC[generational]: Sizes
youngGen = min 1048576 start 1048576 max 1048576
oldGen = min 1048576 start 1048576 max 4194304
overall = min 2097152 start 2097152 max 5242880
GC[generational]: Auxiliary data structures
heapBaseMemoryArea=[0x401a1000,0x407a1000)
cardTable=[0x407a1000,0x407a4000)
objectHeaderTable=[0x407a4000,0x407a7000)
summaryTable=[0x407a7000,0x407b3000)
JIT Configuration:
Interpreter transition cost (icost): 20
Mixed transition cost (mcost): 50
Backwards branch cost (bcost): 4
Compilation threshold (climit): 20000
When to compile (compile): policy
What to inline (inline): virtual+nonvirtual+vhints+ihints
Max Inlining Depth (maxInliningDepth): 12
Max Inlining Code Length (maxInliningCodeLength): 68
Min Inlining Code Length (minInliningCodeLength): 16
Policy Triggered Decompilations (policyTriggeredDecompilations): true
Max Working Memory Size (maxWorkingMemorySize): 1048576
Max Compiled Method Size (maxCompiledMethodSize): 65535
Code Cache Size (codeCacheSize): 524288
Upper Code Cache Threshold (upperCodeCacheThreshold): 95%
Lower Code Cache Threshold (lowerCodeCacheThreshold): 90%
Pass Phi values in registers (XregisterPhis): true
Pass locals in registers between blocks (XregisterLocals): true
Compiling Causes Class Loading (XcompilingCausesClassLoading): false
Trace (trace): none
java.lang.ClassNotFoundException: com.sun.midp.scriptutil.SuiteLister
at sun.misc.MIDletClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;(MIDletClassLoader.java:239)
at java.lang.ClassLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class;(ClassLoader.java:291)
at com.sun.midp.main.CdcMIDletLoader.newInstance(Lcom/sun/midp/midlet/MIDletSuite;Ljava/lang/String;)Ljavax/microedition/midlet/MIDlet;(CdcMIDletLoader.java:91)
at com.sun.midp.midlet.MIDletStateHandler.createMIDlet(ILjava/lang/String;)Ljavax/microedition/midlet/MIDlet;(MIDletStateHandler.java:740)
at com.sun.midp.midlet.MIDletStateHandler.createAndRegisterMIDlet(ILjava/lang/String;)V(MIDletStateHandler.java:353)
at com.sun.midp.midlet.MIDletStateHandler.startSuite(Lcom/sun/midp/midlet/MIDletSuiteExceptionListener;Lcom/sun/midp/midlet/MIDletSuite;ILjava/lang/String;)V(MIDletStateHandler.java:395)
at com.sun.midp.main.AbstractMIDletSuiteLoader.startSuite()V(AbstractMIDletSuiteLoader.java:205)
at com.sun.midp.main.AbstractMIDletSuiteLoader.runMIDletSuite()V(AbstractMIDletSuiteLoader.java:315)
at com.sun.midp.main.CdcMIDletSuiteLoader.main([Ljava/lang/String;)V(CdcMIDletSuiteLoader.java:103)
at sun.misc.MIDPLauncher.main([Ljava/lang/String;)V(MIDPLauncher.java:106)
at sun.misc.CVM.runMain()V(CVM.java:514)
MIDlet class not found.

com.sun.midp.scriptutil.SuiteLister
REPORT: MIDlet class not found.

com.sun.midp.scriptutil.SuiteLister
#[/i]

Any idea??
Thanks.

musicguitar

musicguitar
Offline
Joined: 2008-03-02
Points: 0

Hi Chris

Thanks for your reply.

I just export the "[i]LD_LIBRARY_PATH=/mnt/qt-embedded-3.3.8/lib/[/i]".

The error also happened.

I post the totally messege as follow:

[i]# /mnt/java/cdc/bin/cvm -Dsun.midp.library.name=midp -Dsun.midp.home.path=/mnt/java/cdc/midp/midp_linux_fb_gcc -Dcom.sun.midp.mainClass.name=com.sun.midp.main.CdcMIDletSuiteLoader sun.misc.MIDPLauncher -1 com.sun.midp.scriptutil.SuiteLister
CVM Configuration:
Java stack chunk size (stackChunkSize): 2048
Java stack minimum size (stackMinSize): 3072
Java stack maximum size (stackMaxSize): 131072
GC[SS]: Initialized semi-space gen for generational GC
Size of *each* semispace in bytes=1048576
Limits of generation = [0x401a1000,0x403a1000)
First semispace = [0x401a1000,0x402a1000)
Second semispace = [0x402a1000,0x403a1000)
Current semispace = First semispace
GC[MC]: Initialized mark-compact gen for generational GC
Size of the space in bytes=1048576
Limits of generation = [0x403a1000,0x404a1000)
GC[generational]: Sizes
youngGen = min 1048576 start 1048576 max 1048576
oldGen = min 1048576 start 1048576 max 4194304
overall = min 2097152 start 2097152 max 5242880
GC[generational]: Auxiliary data structures
heapBaseMemoryArea=[0x401a1000,0x407a1000)
cardTable=[0x407a1000,0x407a4000)
objectHeaderTable=[0x407a4000,0x407a7000)
summaryTable=[0x407a7000,0x407b3000)
JIT Configuration:
Interpreter transition cost (icost): 20
Mixed transition cost (mcost): 50
Backwards branch cost (bcost): 4
Compilation threshold (climit): 20000
When to compile (compile): policy
What to inline (inline): virtual+nonvirtual+vhints+ihints
Max Inlining Depth (maxInliningDepth): 12
Max Inlining Code Length (maxInliningCodeLength): 68
Min Inlining Code Length (minInliningCodeLength): 16
Policy Triggered Decompilations (policyTriggeredDecompilations): true
Max Working Memory Size (maxWorkingMemorySize): 1048576
Max Compiled Method Size (maxCompiledMethodSize): 65535
Code Cache Size (codeCacheSize): 524288
Upper Code Cache Threshold (upperCodeCacheThreshold): 95%
Lower Code Cache Threshold (lowerCodeCacheThreshold): 90%
Pass Phi values in registers (XregisterPhis): true
Pass locals in registers between blocks (XregisterLocals): true
Compiling Causes Class Loading (XcompilingCausesClassLoading): false
Trace (trace): none
java.lang.UnsatisfiedLinkError: com.sun.midp.events.EventQueue.getNativeEventQueueHandle()I
at com.sun.midp.events.EventQueue.()V(EventQueue.java:69)
at java.lang.Class.runStaticInitializers()V(Class.java:1621)
at com.sun.midp.main.AbstractMIDletSuiteLoader.init()V(AbstractMIDletSuiteLoader.java:146)
at com.sun.midp.main.CdcMIDletSuiteLoader.init()V(CdcMIDletSuiteLoader.java:114)
at com.sun.midp.main.AbstractMIDletSuiteLoader.runMIDletSuite()V(AbstractMIDletSuiteLoader.java:257)
at com.sun.midp.main.CdcMIDletSuiteLoader.main([Ljava/lang/String;)V(CdcMIDletSuiteLoader.java:103)
at sun.misc.MIDPLauncher.main([Ljava/lang/String;)V(MIDPLauncher.java:106)
at sun.misc.CVM.runMain()V(CVM.java:514)[/i]

I had tried to compile another verison phoneME Advanced (phoneme_advanced_mr2-b34).
It's foundation profile.
(MR2 seems don't have cdc/src/share/personal directry.Can it compile to personal profile?)
And the build command just
[i]# make USE_MIDP=true CVM_TARGET_TOOLS_PREFIX=/opt/Embedix/usr/local/arm-linux/gcc-3.3.2-glibc-2.3.2/bin/arm-linux-[/i]

This version works very well.
(But I need to use personal profile.)

Thanks.

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

I don't think loading libmidp_g.so is the problem since I believe with a debug build you should have seen an error message. So the problem is probably that the getNativeEventQueueHandle JNI method is missing. The easy way to confirm this is to build with CVM_PRELOAD_LIB=true. You should get static link errors for any JNI methods that are missing at build time.

BTW, you are building with USE_DIRECTFB=false. If you grep the midp sources for getNativeEventQueueHandle, the only linux version I see is for directfb. Probably someone who knows a lot more about midp than I do will need to explain why getNativeEventQueueHandle is missing, and give you proper build instructions.

Chris

Hinkmond Wong

phonemeadvanced@mobileandembedded.org wrote:
> I don't think loading libmidp_g.so is the problem since I believe with a debug build you should have seen an error message. So the problem is probably that the getNativeEventQueueHandle JNI method is missing. The easy way to confirm this is to build with CVM_PRELOAD_LIB=true. You should get static link errors for any JNI methods that are missing at build time.
>
> BTW, you are building with USE_DIRECTFB=false. If you grep the midp sources for getNativeEventQueueHandle, the only linux version I see is for directfb. Probably someone who knows a lot more about midp than I do will need to explain why getNativeEventQueueHandle is missing, and give you proper build instructions.
>

Hi musicguitar,

You'd probably want to confirm with Gary or Steve, but I don't believe
we have a correct build combination of CDC, MIDP, and Personal Profile.

You might be seeing the problems because you try to set USE_MIDP=true
with J2ME_CLASSLIB=personal.

Hinkmond

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

musicguitar
Offline
Joined: 2008-03-02
Points: 0

Thanks for your reply, Hinkmond.

You said can't correct combine of CDC, MIDP, and Personal Profile.
So I tried others combination.

1. [b]Personal Basis Profile, CDC, MIDP[/b]
The same error messeges.

2. [b]Foundation Profile, CDC, MIDP[/b]
The same error messeges.

So, all MIDP will occur "java.lang.UnsatisfiedLinkError: com.sun.midp.events.EventQueue.getNativeEventQueueHandle()" in my phoneME.

My phoneME version is [b]phoneme_advanced_mr2-b62[/b].
My phoneME MR2-b34 does not have this error.

Did anyone have experience like this?

Thanks

musicguitar

Hinkmond Wong

phonemeadvanced@mobileandembedded.org wrote:
> Thanks for your reply, Hinkmond.
>
> You said can't correct combine of CDC, MIDP, and Personal Profile.
> So I tried others combination.
>
> 1. [b]Personal Basis Profile, CDC, MIDP[/b]
> The same error messeges.
>
> 2. [b]Foundation Profile, CDC, MIDP[/b]
> The same error messeges.
>
> So, all MIDP will occur "java.lang.UnsatisfiedLinkError: com.sun.midp.events.EventQueue.getNativeEventQueueHandle()" in my phoneME.
>
> My phoneME version is [b]phoneme_advanced_mr2-b62[/b].
> My phoneME MR2-b34 does not have this error.
>
> Did anyone have experience like this?
>

Hi musicguitar,

You're right that for #2, it should be a correct build combination:
CDC/Foundation Profile/MIDP.

You may have encountered a recent commit that breaks the CDC/MIDP build
for WinMobile/ARM in the pMEA. I'll try to reproduce the same error you
are seeing and will let you know...

Thanks,

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

Probably the dll containing getNativeEventQueueHandle was not successfully loaded. I'm guessing it is in something like libmidp_g.so. Did you see any other error messages before the exception that might indicate a failure to load the dll? Maybe libqt.so is not being found, and is this causing libmidp_g.so to fail to load.

Chris