This is an area that is poorly described in the docs (if at all).  The
real specification is in the JCK test cases, which is why I gained a
slight familiarity with it.  You have to read the test cases and
figure out why your Java implementation is failing them to
"understand" the spec.

My vague recollection (this was actually someone else's problem to
debug) is that you can have some classes being loaded under a user
class loader and have the native class be "demand loaded" under that
loader.  Then go back and load some other classes in a different class
loader context and have the native class be loaded again.  This breaks
things.  The "fix" is to pre-load the native classes somehow.

But I'm not convinced that even anyone at Sun understood this
completely.

On Sep 24, 11:54 am, ls02 <[email protected]> wrote:
> But we have one single shared library that is used by numerious
> classes and instances. Note, the problem occurs very seldom. I never
> personally saw it.
>
> On Sep 24, 7:38 am, DanH <[email protected]> wrote:
>
> > You've got to be real careful about loading native classes, and, in
> > particular, not load them twice under two different loaders.  (At
> > least that's my vague recollection.)
>
> > On Sep 23, 10:12 pm, ls02 <[email protected]> wrote:
>
> > > So what's the proper way to deal with such issue?
>
> > > On Sep 23, 10:39 pm, DanH <[email protected]> wrote:
>
> > > > On regular Java systems this can occur when the native class gets
> > > > loaded by the wrong class loader.  And there are a couple of other
> > > > obscure causes with regard to class loading, IIRC.
>
> > > > On Sep 23, 7:34 pm, ls02 <[email protected]> wrote:
>
> > > > > From time to time we get from customers the following error
>
> > > > > java.lang.UnsatisfiedLinkError: Library <out native shared library>
> > > > > not found
>
> > > > > with stack coming from static class method that loads our shared
> > > > > library
>
> > > > > The library is obviously there and ussually powering off and on the
> > > > > phone fixes the issue. However what's the source of this error at
> > > > > first place?- Hide quoted text -
>
> > > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to