You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Adam Singer (JIRA)" <ji...@apache.org> on 2009/09/05 01:56:57 UTC

[jira] Created: (DAEMON-129) jsvc unable to start in OS X Snow Leopard (10.6)

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.


[jira] Updated: (DAEMON-129) jsvc unable to start in OS X Snow Leopard (10.6)

Posted by "Doug Kiley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DAEMON-129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Doug Kiley updated DAEMON-129:
------------------------------

    Attachment: jsvc_patch_snowleopard.patch

I got mine working! ! ! 

Here's my patch file.

I patched against the 1.0.1 source. Some of the changes came from other people's patch files. The important stuff for this issue is in java.c

-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
>         Attachments: jsvc_patch_snowleopard.patch
>
>
> 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.


[jira] Resolved: (DAEMON-129) jsvc unable to start in OS X Snow Leopard (10.6)

Posted by "Mladen Turk (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DAEMON-129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mladen Turk resolved DAEMON-129.
--------------------------------

    Resolution: Fixed

Committed as r907206. Thanks

> 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
>         Attachments: jsvc_patch_snowleopard.patch
>
>
> 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.


[jira] Commented: (DAEMON-129) jsvc unable to start in OS X Snow Leopard (10.6)

Posted by "Doug Kiley (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Commented: (DAEMON-129) jsvc unable to start in OS X Snow Leopard (10.6)

Posted by "Srijith Kochunni (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DAEMON-129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12832446#action_12832446 ] 

Srijith Kochunni commented on DAEMON-129:
-----------------------------------------

Hi Mladen and Doug,

      I applied the same patch on my box and tried to start the daemon, but what i notice is that it loads libverify.dylib correctly, but then it just crashes I see this message "dyld: dyld std::terminate()". looks like some uncaught exception was thrown and it says service did not exit cleanly. I'm not sure it the patch is working. Is it a requirement that jsvc must also be built on 10.6 for it to run on 10.6?

    It would be really helpful if I could get this working.?

Thanks
Srijith.

> 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
>         Attachments: jsvc_patch_snowleopard.patch
>
>
> 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.


[jira] Issue Comment Edited: (DAEMON-129) jsvc unable to start in OS X Snow Leopard (10.6)

Posted by "Doug Kiley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DAEMON-129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12759199#action_12759199 ] 

Doug Kiley edited comment on DAEMON-129 at 9/24/09 11:22 AM:
-------------------------------------------------------------

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.

{noformat}
#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;
}
{noformat}

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


      was (Author: dougkiley):
    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.


[jira] Updated: (DAEMON-129) jsvc unable to start in OS X Snow Leopard (10.6)

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DAEMON-129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb updated DAEMON-129:
------------------------

    Fix Version/s: 1.0.2

> 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
>             Fix For: 1.0.2
>
>         Attachments: jsvc_patch_snowleopard.patch
>
>
> 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.