我使用NetBeans(IDE)和GlassFish 4.1.0(Web服務器)開發了JavaEE 7.0 Web應用程序。紅帽服務器中的java.lang.IllegalArgumentException
當我將它部署在本地主機上時,該應用程序像一個魅力一樣工作。現在,我想使用GlassFish 4.1.0將其部署到紅帽企業版Linux服務器5.11上。
因此,我在我的Red Hat服務器上安裝GlassFish和我按照這些步驟:
- 開業GlassFish的管理控制檯,併到「應用程序」節點:
- 點擊了「部署」按鈕並選擇我想要部署的應用程序的戰爭文件(存儲在紅帽服務器中):
- 單擊「選擇文件」。出現以下窗口:
- 我的應用程序需要一些JAR文件才能正常工作。所有這些都保存在以下文件夾:
- 然後我插入了GlassFish管理控制檯的「庫」條目中的所有路徑:
- 部署的應用程序,並重新啓動了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)
]]
我真不明白是怎麼回事,難道你能幫我嗎?
嗨unwichtich,其實它像一個魅力。非常感謝您的幫助。我很感激。 –