2016-07-08 64 views
1

我使用NetBeans(IDE)和GlassFish 4.1.0(Web服务器)开发了JavaEE 7.0 Web应用程序。红帽服务器中的java.lang.IllegalArgumentException

当我将它部署在本地主机上时,该应用程序像一个魅力一样工作。现在,我想使用GlassFish 4.1.0将其部署到红帽企业版Linux服务器5.11上。

因此,我在我的Red Hat服务器上安装GlassFish和我按照这些步骤:

  1. 开业GlassFish的管理控制台,并到“应用程序”节点: enter image description here
  2. 点击了“部署”按钮并选择我想要部署的应用程序的战争文件(存储在红帽服务器中): enter image description here
  3. 单击“选择文件”。出现以下窗口: enter image description here
  4. 我的应用程序需要一些JAR文件才能正常工作。所有这些都保存在以下文件夹: enter image description here
  5. 然后我插入了GlassFish管理控制台的“库”条目中的所有路径: enter image description here
  6. 部署的应用程序,并重新启动了NetBeans服务器

然而,每个我跑我的web应用程序时,我得到以下错误:

[2016-07-08T21:20:15.226+0200] [glassfish 4.1] [SEVERE] [NCLS-CORE-00026] [javax.enterprise.system.core] [tid: _ThreadID=22 _ThreadName=RunLevelControllerThread-1468005611695] [timeMillis: 1468005615226] [levelValue: 1000] [[ 

    Exception during lifecycle processing 

java.lang.IllegalArgumentException: Specified library jar android-7.jar does not exist: /opt/glassfish4/glassfish/domains/domain1/lib/android-7.jar 

    at org.glassfish.deployment.common.DeploymentContextImpl.getAppLibs(DeploymentContextImpl.java:458) 

    at org.glassfish.deployment.common.DeploymentContextImpl.createClassLoader(DeploymentContextImpl.java:244) 

    at org.glassfish.deployment.common.DeploymentContextImpl.createDeploymentClassLoader(DeploymentContextImpl.java:229) 

    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:365) 

    at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:406) 

    at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:243) 

    at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:329) 

    at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:377) 

    at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461) 

    at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227) 

    at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84) 

    at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258) 

    at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105) 

    at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87) 

    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162) 

    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147) 

    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 

    at java.lang.Thread.run(Thread.java:745) 

]] 

我真不明白是怎么回事,难道你能帮我吗?

回答

2

Then I inserted all the paths in the "Libraries" entry of the GlassFish Administration Console:

你不需要这样做,我想这是造成这个问题。

GlassFish是自动搜索在lib文件夹库,如果不工作,你也可以尝试在/opt/glassfish4/glassfish/lib

服务器全球lib文件夹如果它仍然无法与访问工作有可能是问题权利,但在你的屏幕截图上看起来很好(世界可读)。

+0

嗨unwichtich,其实它像一个魅力。非常感谢您的帮助。我很感激。 –