我有一个 Wildfly 10 ear 应用程序(在服务器容器中运行),它需要能够发布到另一个 Wildfly 服务器上托管的远程队列。为此,我将这个 jar 从 wildfly\bin\client 文件夹复制到 ear 的 lib 文件夹中。那工作得很好。
但是现在,在官方打包之后,当我启动 Wildfly 和应用程序时,我收到一条错误消息……关于这个 jar 的清单文件。
设置应用程序以便这个 jar 被各种类加载器找到的最佳方法是什么?
似乎可以将 jar 复制到 ear\lib,但是需要对清单文件进行一些处理吗?什么?
我假设另一个选项是在standalone-full.xml 中指定一些内容,告诉wildfly 类加载器在其类路径中包含wildfly/bin/client 文件夹。你是怎么做到的?第三,我假设文件可以被复制粘贴到已经在 Wildfly 类路径中的文件夹中。
第四个选项,我假设是向我的耳朵添加一些东西,生成 pom.xml,它将这个 jar 添加到 ear/lib....
最好的方法是什么?
我得到的错误是:
14:54:45,578 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."InSyncEar.ear".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."InSyncEar.ear".STRUCTURE: WFLYSRV0153: Failed to process phase STRUCTURE of deployment "InSyncEar.ear"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
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)
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYSRV0161: Failed to get manifest for deployment "/C:/MyComp/Purch/deployments/InSyncEar.ear/lib/jboss-client.jar"
at org.jboss.as.server.deployment.module.ManifestAttachmentProcessor.getManifest(ManifestAttachmentProcessor.java:78)
at org.jboss.as.server.deployment.module.ManifestAttachmentProcessor.deploy(ManifestAttachmentProcessor.java:65)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
... 5 more
Caused by: java.util.zip.ZipException: invalid literal/lengths set
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:164)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:122)
at org.jboss.vfs.util.PaddedManifestStream.read(PaddedManifestStream.java:39)
at java.io.InputStream.read(InputStream.java:170)
at java.util.jar.Manifest$FastInputStream.fill(Manifest.java:441)
at java.util.jar.Manifest$FastInputStream.readLine(Manifest.java:375)
at java.util.jar.Manifest$FastInputStream.readLine(Manifest.java:409)
at java.util.jar.Attributes.read(Attributes.java:376)
at java.util.jar.Manifest.read(Manifest.java:199)
at java.util.jar.Manifest.<init>(Manifest.java:69)
at org.jboss.vfs.VFSUtils.readManifest(VFSUtils.java:243)
at org.jboss.vfs.VFSUtils.getManifest(VFSUtils.java:227)
at org.jboss.as.server.deployment.module.ManifestAttachmentProcessor.getManifest(ManifestAttachmentProcessor.java