Re: debugging jnilib from XCode additional info
Re: debugging jnilib from XCode additional info
- Subject: Re: debugging jnilib from XCode additional info
- From: Dmitry Markman <email@hidden>
- Date: Thu, 18 Mar 2004 03:59:30 -0500
if I build my jnilib with debug symbols enabled
I'm getting slightly different message:
2004-03-18 02:34:46.921 java[4880] CFLog (0): Assertions enabled
DebugAssert: Third Party Client: infoDict
_CFBundleCopyInfoDictionaryInResourceFork_noInfoDict [line 121, file
Runtime/CSCheckFix.c]
DebugAssert: Third Party Client: sClientMessageProc == nil
CoreDockRegisterClient_AlreadyRegistered [line 156, file
CoreDocServices.subproj/DockClient.c]
DebugAssert: HIToolbox: _AXUIElementRegisterServerWithRunLoop(
&sCarbonAccessibilityCallbacks, NULL, NULL ) == 0 [-25204] [line 253,
file Accessibility/Accessibility.cp]
java.lang.UnsatisfiedLinkError:
/Users/dima/Projects/JavaProjects/1.4/WebKitSample/build/
libwebkitsample.jnilib:
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:834)
at org.dm.webkit.WebKitJava.<clinit>(WebKitJava.java:13)
DebugAssert: ATS: Using old glyphs cache path[line 183, file
Glyphs/ATSGlyph.c]
Exception in thread "main" java.lang.UnsatisfiedLinkError: createNSView
at org.dm.webkit.WebKitJava.createNSView(Native Method)
at apple.awt.CToolkit.createCanvas(CToolkit.java:368)
at java.awt.Canvas.addNotify(Canvas.java:74)
at org.dm.webkit.DMWebKitView.addNotify(DMWebKitView.java:42)
at java.awt.Container.addNotify(Container.java:2049)
at java.awt.Window.addNotify(Window.java:418)
at java.awt.Frame.addNotify(Frame.java:482)
at java.awt.Window.show(Window.java:459)
at org.dm.webkit.WebKitJava.main(WebKitJava.java:141)
I don't know whether that's important or not
error -25204 means
kAXErrorCannotComplete
from
http://developer.apple.com/documentation/ReleaseNotes/Accessibility/
AssistiveAPI.html
" Indicates a cannot complete error occurred"
On Mar 18, 2004, at 1:52 AM, Dmitry Markman wrote:
Hi
I have some problem with debugging my jnilib.
here is my story
1. I created jnilib application from Project New template
and I was able to debug jnilib in that project
so it's possible to debug jnilib from XCode in principle
good news :-)
2. I created my application that uses my jnilib library
and here I have a problem
I created executable that looks very similar to executable from
template above:
path: /usr/bin/java
launch arguments: -cp WebKit.jar org.dm.webkit.WebKitJava
choose working directory : Product directory:
/Users/dima/Projects/JavaProjects/1.4/WebKitSample/build
so when I try to run that executable
I got the error:
java.lang.UnsatisfiedLinkError:
/Users/dima/Projects/JavaProjects/1.4/WebKitSample/build/
libwebkitsample.jnilib:
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:834)
at org.dm.webkit.WebKitJava.<clinit>(WebKitJava.java:13)
Exception in thread "main" java.lang.UnsatisfiedLinkError: createNSView
at org.dm.webkit.WebKitJava.createNSView(Native Method)
at apple.awt.CToolkit.createCanvas(CToolkit.java:368)
at java.awt.Canvas.addNotify(Canvas.java:74)
at org.dm.webkit.DMWebKitView.addNotify(DMWebKitView.java:42)
at java.awt.Container.addNotify(Container.java:2049)
at java.awt.Window.addNotify(Window.java:418)
at java.awt.Frame.addNotify(Frame.java:482)
at java.awt.Window.show(Window.java:459)
at org.dm.webkit.WebKitJava.main(WebKitJava.java:141)
if I run the following command from the terminal
cd /Users/dima/Projects/JavaProjects/1.4/WebKitSample/build
java -cp WebKit.jar org.dm.webkit.WebKitJava
EVERYTHING IS FINE!
if I remove libwebkitsample.jnilib from the
/Users/dima/Projects/JavaProjects/1.4/WebKitSample/build
folder I got the other error:
java.lang.UnsatisfiedLinkError: no webkitsample in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1491)
.....
so when I HAVE libwebkitsample.jnilib in the directory
I'm getting different error, that means that java indeed CAN FIND that
jnilib
but for some unknown reason fails to load that library (again only
from XCode)
it looks like that system fails to load jnilib because it can't find
some dynamic libraries, but I don't use any dynamic libraries
(at least explicitly)
jnilib target is old style target (not native)
it includes the following frameworks:
Cocoa.framework
JavaVM.framework
WebKit.framework
and
libstd++.a static library
(Apple's jnilib template uses only JavaVM.framework
so maybe WebKit.framework tries to load some dynamic libraries and
fails)
I played with java.library.path but it didn't help.
thanks
Dmitry Markman
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.
Dmitry Markman
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.