gpt4 book ai didi

java - 在 Glassfish 部署期间找不到资源包

转载 作者:行者123 更新时间:2023-12-04 12:00:35 24 4
gpt4 key购买 nike

在没有 AppClient 的 Glassfish 4.1.2 上远程部署 EAR 应用程序期间,我收到由 org.glassfish.deployment.common.DeploymentException 引起的以下 RuntimeException:

java.lang.RuntimeException: Can't find resource for bundle
java.util.PropertyResourceBundle, key
enterprise.deployment.appclient.noManifest

如何修复 Glassfish 以显示正确的错误消息,以便确定哪个库导致部署错误?我认为其中一个依赖 JAR 缺少 list 文件,但 GF 无法构造适当的错误消息,因为属性资源包不存在。这是GF中的错误吗?

[2017-07-11T09:57:27.797+1000] [glassfish 4.1] [SEVERE] []
[javax.enterprise.system.core] [tid: _ThreadID=47
_ThreadName=admin-listener(4)] [timeMillis: 1499731047797] [levelValue: 1000] [[ Exception while preparing the app : Can't find
resource for bundle java.util.PropertyResourceBundle, key
enterprise.deployment.appclient.noManifest java.lang.RuntimeException:
Can't find resource for bundle java.util.PropertyResourceBundle, key
enterprise.deployment.appclient.noManifest at
org.glassfish.javaee.core.deployment.JavaEEDeployer.prepare(JavaEEDeployer.java:229)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:925)
at
org.glassfish.javaee.full.deployment.EarDeployer.prepareBundle(EarDeployer.java:309)
at
org.glassfish.javaee.full.deployment.EarDeployer.access$200(EarDeployer.java:88)
at
org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:155)
at
org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:152)
at
org.glassfish.javaee.full.deployment.EarDeployer.doOnBundles(EarDeployer.java:232)
at
org.glassfish.javaee.full.deployment.EarDeployer.doOnAllBundles(EarDeployer.java:283)
at
org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:152)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:925)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:434)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at
org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
at java.security.AccessController.doPrivileged(Native Method) at
javax.security.auth.Subject.doAs(Subject.java:360) at
com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
at java.security.AccessController.doPrivileged(Native Method) at
javax.security.auth.Subject.doAs(Subject.java:360) at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
at
org.glassfish.admin.rest.resources.admin.CommandResource.executeCommand(CommandResource.java:404)
at
org.glassfish.admin.rest.resources.admin.CommandResource.execCommandSimpInMultOut(CommandResource.java:234)
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:498) at
org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
at
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
at
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
at
org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160)
at
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
at
org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
at
org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
at
org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
at
org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:309)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) at
org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) at
org.glassfish.jersey.internal.Errors.process(Errors.java:315) at
org.glassfish.jersey.internal.Errors.process(Errors.java:297) at
org.glassfish.jersey.internal.Errors.process(Errors.java:267) at
org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
at
org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:292)
at
org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1139)
at
org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:375)
at
org.glassfish.admin.rest.adapter.JerseyContainerCommandService$3.service(JerseyContainerCommandService.java:173)
at
org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:179)
at
com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
at
org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)
at
org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
at
org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
at
org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at
org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
at
org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
at
org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
at
org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
at
org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at
org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
at
org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at
org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at
org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at
org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at
org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
at
org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
at java.lang.Thread.run(Thread.java:748) Caused by:
org.glassfish.deployment.common.DeploymentException: Can't find
resource for bundle java.util.PropertyResourceBundle, key
enterprise.deployment.appclient.noManifest at
java.util.ResourceBundle.getObject(ResourceBundle.java:450) at
java.util.ResourceBundle.getString(ResourceBundle.java:407) at
org.glassfish.appclient.server.core.AppClientDeployerHelper.generateAppClientFacade(AppClientDeployerHelper.java:533)
at
org.glassfish.appclient.server.core.AppClientDeployerHelper.prepareJARs(AppClientDeployerHelper.java:489)
at
org.glassfish.appclient.server.core.NestedAppClientDeployerHelper.prepareJARs(NestedAppClientDeployerHelper.java:153)
at
org.glassfish.appclient.server.core.AppClientDeployer.generateArtifacts(AppClientDeployer.java:293)
at
org.glassfish.javaee.core.deployment.JavaEEDeployer.prepare(JavaEEDeployer.java:224)
... 71 more ]]

我还从 theAppClientDeployerHelper.java 类中找到了这个解码:

ACC007 应用程序客户端 {0,choice,0#file|1#directory} {1} 没有包含 list ;应用程序客户端容器无法处理它。嵌入式程序应该为 JAR 文件传递​​方案为“jar:”的 URI和目录的方案“文件:”。原因:文件可能不是有效的应用程序客户端 JAR 或未部署的 EAR。可能是另一种文件或已损坏。行动:确保指定一个有效的应用客户端 JAR 文件或包含至少一个应用客户端的 EAR。

最佳答案

改变 Maven 中的 EAR 插件自动生成 Glassfish 用于应用程序部署的 application.xml 似乎解决了这个问题。该应用程序实际上可以使用 Eclipse 以目录格式正确部署,但远程部署是问题所在。由以下代码修复。

<artifactId>maven-ear-plugin</artifactId>
<configuration>
<includeLibInApplicationXml>false</includeLibInApplicationXml>

关于java - 在 Glassfish 部署期间找不到资源包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45099984/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com