java - 由于以下问题无法启动服务器 : Launch process failed with exit code 1

标签 java eclipse netbeans glassfish

三天来,我一直在尝试在 eclipse Luna 版本 4.4.1 上安装 glassfish 4.1。我首先从 eclipse 市场安装了该插件,然后使用 jdk 8 将其添加到我的运行时中。我还将 jdk 设置为默认值,因为 eclipse 默认使用 jre。我必须指出,我一直在 Netbeans 上使用 glassfish,在 Eclipse 上使用 Tomcat,但我决定在 Eclipse 上使用 glassfish。我在互联网上获得的所有信息都没有解决我的问题。 以下是我在控制台中收到的错误。现在,这让我抓狂,所以我决定向你寻求指导。 谢谢

Launching GlassFish on Felix platform
ERROR: Unable to create cache directory: C:\Program Files\glassfish-4.1\glassfish\domains\domain1\osgi-cache\felix
ERROR: Error creating bundle cache. (java.lang.RuntimeException: Unable to create cache directory.)
java.lang.RuntimeException: Unable to create cache directory.
    at org.apache.felix.framework.cache.BundleCache.<init>(BundleCache.java:131)
    at org.apache.felix.framework.Felix.init(Felix.java:640)
    at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiFrameworkLauncher$1.run(OSGiFrameworkLauncher.java:88)
Exception in thread "Thread-1" java.lang.RuntimeException: org.osgi.framework.BundleException: Error creating bundle cache.
    at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiFrameworkLauncher$1.run(OSGiFrameworkLauncher.java:90)
Caused by: org.osgi.framework.BundleException: Error creating bundle cache.
    at org.apache.felix.framework.Felix.init(Felix.java:645)
    at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiFrameworkLauncher$1.run(OSGiFrameworkLauncher.java:88)
Caused by: java.lang.RuntimeException: Unable to create cache directory.
    at org.apache.felix.framework.cache.BundleCache.<init>(BundleCache.java:131)
    at org.apache.felix.framework.Felix.init(Felix.java:640)
    ... 1 more
Exception in thread "main" java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
    at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
Caused by: org.glassfish.embeddable.GlassFishException: java.lang.NullPointerException
    at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuilder.build(OSGiGlassFishRuntimeBuilder.java:170)
    at org.glassfish.embeddable.GlassFishRuntime._bootstrap(GlassFishRuntime.java:157)
    at org.glassfish.embeddable.GlassFishRuntime.bootstrap(GlassFishRuntime.java:110)
    at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:112)
    ... 6 more
Caused by: java.lang.NullPointerException
    at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuilder.newFramework(OSGiGlassFishRuntimeBuilder.java:241)
    at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuilder.build(OSGiGlassFishRuntimeBuilder.java:135)
    ... 9 more
Error stopping framework: java.lang.NullPointerException
java.lang.NullPointerException
    at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher$1.run(GlassFishMain.java:203)
Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=192m; support was removed in 8.0

最佳答案

在管理员模式下运行 Eclipse 或任何其他使用的 IDE。 对我有用。

关于java - 由于以下问题无法启动服务器 : Launch process failed with exit code 1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27683712/

相关文章:

Java Swing 类无法转换为 DefaultListModel

java - 如何在java中以bigdecimal的相反顺序处理负值?

java - 如何在拖放过程中显示图标

java - FakeRequest 类型 Promise 的结果

android - 升级到 ADT 18 后出现 ClassNotFoundException

android - 如何知道我们在eclipse中使用的是哪个版本的ADT?

java - 如何在maven中使用jboss

java - 具有生成 com.sun.jersey.spi.inject.Errors 的复合(两部分)主键的 Glassfish/PostgreSQL 表

java - CAS:用户以其他用户身份登录

java - 为什么我会收到缺少类型参数和类型转换的警告?