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

3

18

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?

Dentistry answered 1/7, 2014 at 11:26 Comment(0)
C
11

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

Cavanagh answered 10/7, 2014 at 15:53 Comment(3)
The issue is RESOLVED (java.net/jira/browse/GLASSFISH-21113). Fix Version/s: 4.0.1, 4.1Dentistry
Hey, did you guys created the file StartupItemContext.sh ? I putted the file in both paths already /usr/libexec/ and in /domains/domain1/config/ I can't make it run GF in eclipse ! :'( help, pleaseHemia
Create the file /usr/libexec/StartupItemContext as described in GLASSFISH-21113, and make sure it is executable: chmod +x /usr/libexec/StartupItemContextZinciferous
C
47

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

asadmin start-domain --verbose domain1
Clough answered 18/7, 2014 at 8:13 Comment(4)
java.net/jira/browse/GLASSFISH-15118 Why not to use the --verbose option.Ovum
How can I set this in IntelijIDEA IDE run configuration ?Invalidity
@SiamandMaroufi You can set the command used to start the Glassfish server in the Run configurations see the screenshotDemp
I've tried asadmin start-domain domain1 --verbose as stated in other solutions here, but this is the ONLY correct answerEscalade
C
11

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

Cavanagh answered 10/7, 2014 at 15:53 Comment(3)
The issue is RESOLVED (java.net/jira/browse/GLASSFISH-21113). Fix Version/s: 4.0.1, 4.1Dentistry
Hey, did you guys created the file StartupItemContext.sh ? I putted the file in both paths already /usr/libexec/ and in /domains/domain1/config/ I can't make it run GF in eclipse ! :'( help, pleaseHemia
Create the file /usr/libexec/StartupItemContext as described in GLASSFISH-21113, and make sure it is executable: chmod +x /usr/libexec/StartupItemContextZinciferous
M
1

Reinstalling the entire current version of glassfih4 folder solved my issue on OS X 10.11.3. Then I simply ran in ../glassfish4/galssfish/ sudo ./bin/asadmin start-domain and then it worked again...

Madancy answered 21/4, 2016 at 13:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.