Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JVM failed to start: java.io.IOException: Cannot run program "/usr/libexec/StartupItemContext; error=2, No such file or directory

In my OS X Yosemite, I'm trying to start-domain in terminal:

sh asadmin start-domain mythMobile

and I get error:

JVM failed to start: java.io.IOException: Cannot run program "/usr/libexec/StartupItemContext" (in directory "/Applications/glassfish4/glassfish/domains/mythMobile/config"): error=2, No such file or directory
Command start-domain failed.

This problem appeared after I've installed beta Yosemite on my mac. Before I had Mavericks, everything worked correctly.

Have anybody faced with such problem?

like image 481
Almas Adilbek Avatar asked Jul 01 '14 11:07

Almas Adilbek


2 Answers

To work-around that, you can start GF in verbose mode using:

asadmin start-domain --verbose domain1
like image 110
davidd Avatar answered Sep 22 '22 15:09

davidd


Apple removed the file under OS X 10.10 (Yosemite). Unfortunately the path to the file is hard coded within the GlassFish startup code (GFLauncher.java) and not configurable.

The GlassFish team is already aware of the issue: https://java.net/jira/browse/GLASSFISH-21113

I hope there will be a fix for GlassFish 3 as well, since we still use it in production.

GFLauncher Code: http://grepcode.com/file/repo1.maven.org/maven2/org.glassfish.admin/launcher/3.1.1/com/sun/enterprise/admin/launcher/GFLauncher.java?av=f

like image 31
Tim Brückner Avatar answered Sep 22 '22 15:09

Tim Brückner