-
1. Re: MBean and JNI access
genman Oct 24, 2006 3:08 PM (in response to jglan)What's the error you see? What's your deployment layout?
-
2. Re: MBean and JNI access
jglan Oct 26, 2006 5:13 AM (in response to jglan)What's the error you see? What's your deployment layout?
The Dll is in deploy/xxx/lib and I specify the lib dir in start.bat (-Djava.library.path)
The wrapper jar I put into the sar.
System.LoadLibrary() does not fail but when I want to access a class e.g in mbean's start I get a java.lang.UnsatisfiedLinkError
So I wonder if someone has figured out some rules to do JNI in MBeans... -
3. Re: MBean and JNI access
fastmhaavald Oct 26, 2006 10:15 AM (in response to jglan)Hi,
I have the same problem.
A general question: SCOPING.... ?
We have some java code which works as long as calling code is not scoped, but in default package.
If we add classes to a scope package com.myscope;
We get Unsatisdied link error....
Remove scope and it works stand alone java app.
In the MBean we make sure that code accessing the native is using same class loader as code loading JNI lib...
But unsatisfied link error....
Perhaps removing scope in MBean makes it work???
Any ideas, folks? -
4. Re: MBean and JNI access
jglan Nov 3, 2006 11:02 AM (in response to jglan)Thanks, scoping it my case seems to work.
I added a <loader-repository> entry to my jboss-app.xml.
The sar contains the wrapper jar for the Dll and the Dll itself is in deploy/xxx/lib.
I hope I can use this as a rule from now on...