[ 
https://issues.apache.org/jira/browse/DAEMON-129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12759199#action_12759199
 ] 

Doug Kiley commented on DAEMON-129:
-----------------------------------

Adam,

I don't have any particular knowledge of the jsvc code, but I have been poking 
around for the last day. I could be way off base with what I've done so far, 
but judging from the amount of people around the web asking for a fix and the 
lack of a solution I bet the problem isn't a simple one.

Here's what I have found:
I got the same initial error message that you got. This led me to look for info 
on what replaces libjvm_compat.dylib. Couldn't find anything on that.

Next I found myself in java.c. It looks like what eventually fails is a call to 
JNI_CreateJavaVM which used to be in libjvm_compat.dylib. So now we need to 
find a new place to load this from.

I wrote the following C program to run through the 6 choices of dylibs that 
were in Libraries.


#include <stdio.h>
#include <dlfcn.h>

int main (int argc, const char * argv[]) {
        
        /*
         
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libclient.dylib
         
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libhotspot.dylib
         
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjawt.dylib
  ** works
         
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjvm.dylib
         
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libserver.dylib
         
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libverify.dylib
 ** works
         
         */
        
        void* hndl = 
dlopen("/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjawt.dylib",RTLD_GLOBAL|RTLD_NOW);
        void* success = dlsym(hndl,"JNI_CreateJavaVM");
        if (success != NULL)
        {
                printf("Found JNI_CreateJavaVM");
        }
        else
        {
                printf("NOT FOUND");
        }
        
    return 0;
}


As you can see I found two that worked. I couldn't find any info on the web 
about the differences between libjawt and libverify.

I changed my java.c to load from libverify.dylib instead of 
libjvm_compat.dylib. The only reason I picked liberify is because I found some 
Linux forums that were using libverify.so -- this wasn't for jsvc, but some 
other project.

My current state is that jsvc will build and it does execute, but it won't grab 
any ports. I get 2 processes called jsvc, but they are both owned by root. It 
should be that one is owned by root and the other by my Tomcat user.

I am working on getting the project into Xcode so that I can step through it 
and see what's going on.

In debug.c I set log_debug_flag to true.
In tomcatctl I set JSVC_DEBUG="-debug -verbose".

I am not getting any error messages to the console or catalina.out/err.

I've tried my Utilities/Java Preferences in both 32 bit and 64 bit mode. No 
difference either way.

I'm running Tomcat 5. Maybe I'll try 6 next.

I hope this has given someone else an idea on what to try next.

-Doug


> jsvc unable to start in OS X Snow Leopard (10.6)
> ------------------------------------------------
>
>                 Key: DAEMON-129
>                 URL: https://issues.apache.org/jira/browse/DAEMON-129
>             Project: Commons Daemon
>          Issue Type: Bug
>    Affects Versions: 1.0.1
>         Environment: Mac OS X 10.6, Tomcat 6, JDK 1.6
>            Reporter: Adam Singer
>
> After following the directions posted here 
> (http://www.malisphoto.com/tips/tomcatonosx.html) I am unable to start up 
> jsvc. Starting Tomcat 6 works just fine.
> When I attempt to start jsvc, it immediately exits with the following error:
> 02/09/2009 16:46:42 30987 jsvc error: Cannot load required shell library 
> /Library/Java/Home/../Libraries/libjvm_compat.dylib 
> 02/09/2009 16:46:42 30986 jsvc error: Service exit with a return value of 1 
> Looking in my frameworks, it looks like "libjvm_compat.dylib" doesn't exist 
> in Snow Leopard's installations of JDK 1.5 and 1.6. It looks like the 
> reference to this file is made in java.c, but I'm not sure what to change 
> this to. When changing it to simply "libjvm.dylib", I get this error:
> 03/09/2009 16:20:45 594 jsvc error: Cannot find JVM library entry point
> 03/09/2009 16:20:45 593 jsvc error: Service exit with a return value of 1
> Any thoughts would be much appreciated!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to