gpt4 book ai didi

java - Wildfly 13.0 在从 Eclipse 部署时未能部署多个 WAR,否则工作正常

转载 作者:塔克拉玛干 更新时间:2023-11-03 05:27:38 26 4
gpt4 key购买 nike

如标题所述,我正尝试在 Wildfly 13.0 上部署两个 WAR,但如果我尝试通过简单地添加资源在 Eclipse 上执行此操作,它将失败并出现以下错误:

10:16:02,532 INFO  [org.jboss.modules] (main) JBoss Modules version 1.8.5.Final
10:16:02,845 INFO [org.jboss.msc] (main) JBoss MSC version 1.4.2.Final
10:16:02,876 INFO [org.jboss.threads] (main) JBoss Threads version 2.3.2.Final
10:16:02,970 INFO [org.jboss.as] (MSC service thread 1-2) WFLYSRV0049: WildFly Full 13.0.0.Final (WildFly Core 5.0.0.Final) starting
10:16:04,016 INFO [org.jboss.as.controller.management-deprecated] (Controller Boot Thread) WFLYCTL0028: Attribute 'security-realm' in the resource at address '/core-service=management/management-interface=http-interface' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
10:16:04,038 INFO [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 29) WFLYCTL0028: Attribute 'security-realm' in the resource at address '/subsystem=undertow/server=default-server/https-listener=https' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
10:16:04,038 INFO [org.wildfly.security] (ServerService Thread Pool -- 18) ELY00001: WildFly Elytron version 1.3.3.Final
10:16:04,038 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0015: Re-attempting failed deployment AmexDAPWebServices.war
10:16:04,507 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0015: Re-attempting failed deployment amexsbswebapp.war
10:16:05,772 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0004: Found AmexDAPWebServices.war in deployment directory. To trigger deployment create a file called AmexDAPWebServices.war.dodeploy
10:16:05,772 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0004: Found amexsbswebapp.war in deployment directory. To trigger deployment create a file called amexsbswebapp.war.dodeploy
10:16:05,795 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0039: Creating http management service using socket-binding (management-http)
10:16:05,811 INFO [org.xnio] (MSC service thread 1-8) XNIO version 3.6.3.Final
10:16:05,811 INFO [org.xnio.nio] (MSC service thread 1-8) XNIO NIO Implementation Version 3.6.3.Final
10:16:05,842 INFO [org.jboss.as.ee] (ServerService Thread Pool -- 41) WFLYEE0119: The system property 'ee8.preview.mode' is NOT set to 'true'. For provided EE 8 APIs where the EE 8 version of the API differs from what is supported in EE 7, the EE 7 variant of the API will be used. Support for this setting will be removed once all EE 8 APIs are provided and certified.
10:16:05,842 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 45) WFLYCLINF0001: Activating Infinispan subsystem.
10:16:05,858 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 64) WFLYWS0002: Activating WebServices Extension
10:16:05,858 WARN [org.jboss.as.txn] (ServerService Thread Pool -- 62) WFLYTX0013: The node-identifier attribute on the /subsystem=transactions is set to the default value. This is a danger for environments running multiple servers. Please make sure the attribute value is unique.
10:16:05,873 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 54) WFLYNAM0001: Activating Naming Subsystem
10:16:05,873 INFO [org.jboss.as.jaxrs] (ServerService Thread Pool -- 47) WFLYRS0016: RESTEasy version 3.5.1.Final
10:16:05,889 INFO [org.jboss.as.jsf] (ServerService Thread Pool -- 52) WFLYJSF0007: Activated the following JSF Implementations: [main]
10:16:05,889 INFO [org.jboss.as.security] (ServerService Thread Pool -- 60) WFLYSEC0002: Activating Security Subsystem
10:16:05,920 INFO [org.jboss.as.connector] (MSC service thread 1-6) WFLYJCA0009: Starting JCA Subsystem (WildFly/IronJacamar 1.4.9.Final)
10:16:05,920 INFO [org.jboss.as.security] (MSC service thread 1-5) WFLYSEC0001: Current PicketBox version=5.0.2.Final
10:16:05,936 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 38) WFLYJCA0004: Deploying JDBC-compliant driver class org.h2.Driver (version 1.4)
10:16:05,936 INFO [org.wildfly.extension.undertow] (MSC service thread 1-6) WFLYUT0003: Undertow 2.0.9.Final starting
10:16:05,952 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-2) WFLYJCA0018: Started Driver service with driver-name = h2
10:16:05,952 INFO [org.jboss.as.naming] (MSC service thread 1-2) WFLYNAM0003: Starting Naming Service
10:16:05,952 INFO [org.jboss.as.mail.extension] (MSC service thread 1-1) WFLYMAIL0001: Bound mail session [java:jboss/mail/Default]
10:16:06,061 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 63) WFLYUT0014: Creating file handler for path 'C:\Users\v.cappellini\wildfly-13.0.0.Final/welcome-content' with options [directory-listing: 'false', follow-symlink: 'false', case-sensitive: 'true', safe-symlink-paths: '[]']
10:16:06,186 INFO [org.wildfly.extension.io] (ServerService Thread Pool -- 46) WFLYIO001: Worker 'default' has auto-configured to 16 core threads with 128 task threads based on your 8 available processors
10:16:06,201 INFO [org.jboss.as.ejb3] (MSC service thread 1-2) WFLYEJB0482: Strict pool mdb-strict-max-pool is using a max instance size of 32 (per class), which is derived from the number of CPUs on this host.
10:16:06,201 INFO [org.jboss.as.ejb3] (MSC service thread 1-7) WFLYEJB0481: Strict pool slsb-strict-max-pool is using a max instance size of 128 (per class), which is derived from thread worker pool sizing.
10:16:06,233 INFO [org.jboss.remoting] (MSC service thread 1-8) JBoss Remoting version 5.0.7.Final
10:16:06,248 INFO [org.wildfly.extension.undertow] (MSC service thread 1-6) WFLYUT0012: Started server default-server.
10:16:06,248 INFO [org.wildfly.extension.undertow] (MSC service thread 1-4) WFLYUT0018: Host default-host starting
10:16:06,295 INFO [org.jboss.as.ejb3] (MSC service thread 1-6) WFLYEJB0493: EJB subsystem suspension complete
10:16:06,311 INFO [org.wildfly.extension.undertow] (MSC service thread 1-7) WFLYUT0006: Undertow HTTP listener default listening on 127.0.0.1:8080
10:16:06,311 INFO [org.jboss.as.patching] (MSC service thread 1-3) WFLYPAT0050: WildFly Full cumulative patch ID is: base, one-off patches include: none
10:16:06,342 WARN [org.jboss.as.domain.management.security] (MSC service thread 1-6) WFLYDM0111: Keystore C:\Users\v.cappellini\wildfly-13.0.0.Final\standalone\configuration\application.keystore not found, it will be auto generated on first use with a self signed certificate for host localhost
10:16:06,342 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-4) WFLYDS0013: Started FileSystemDeploymentService for directory C:\Users\v.cappellini\wildfly-13.0.0.Final\standalone\deployments
10:16:06,358 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) WFLYSRV0027: Starting deployment of "amexsbswebapp.war" (runtime-name: "amexsbswebapp.war")
10:16:06,358 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) WFLYSRV0027: Starting deployment of "AmexDAPWebServices.war" (runtime-name: "AmexDAPWebServices.war")
10:16:06,623 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-7) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS]
10:16:06,795 INFO [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0006: Undertow HTTPS listener https listening on 127.0.0.1:8443
10:16:06,863 INFO [org.jboss.ws.common.management] (MSC service thread 1-2) JBWS022052: Starting JBossWS 5.2.1.Final (Apache CXF 3.2.4.jbossorg-1)
10:16:14,642 WARN [org.wildfly.extension.undertow] (MSC service thread 1-5) WFLYUT0081: The deployment amexsbswebapp.war will not be distributable because this feature is disabled in web-fragment.xml of the module apiee-core-1.0.1.jar.
10:16:15,023 INFO [org.jboss.as.jpa] (MSC service thread 1-5) WFLYJPA0002: Read persistence.xml for JPAAmex
10:16:15,023 INFO [org.jboss.as.jpa] (MSC service thread 1-8) WFLYJPA0002: Read persistence.xml for JPAAmex
10:16:17,335 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 67) WFLYJPA0010: Starting Persistence Unit (phase 1 of 2) Service 'amexsbswebapp.war#JPAAmex'
10:16:17,347 INFO [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 67) HHH000204: Processing PersistenceUnitInfo [
name: JPAAmex
...]
10:16:17,363 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.unit."amexsbswebapp.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."amexsbswebapp.war".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment "amexsbswebapp.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:150)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1736)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1698)
at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1556)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting reflective information for class olsa.cerved.corporate.SBSTemplateManager with ClassLoader ModuleClassLoader for Module "deployment.amexsbswebapp.war" from Service Module Loader
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:78)
at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:57)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:106)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:91)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:76)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:143)
... 8 more
Caused by: java.lang.NoClassDefFoundError: com/olsa/amex/services/parameters/ApplicationTemplateParameters
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getDeclaredMethods(Unknown Source)
at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:80)
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70)
... 13 more
Caused by: java.lang.ClassNotFoundException: com.olsa.amex.services.parameters.ApplicationTemplateParameters from [Module "deployment.amexsbswebapp.war" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:255)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
... 18 more

10:16:17,410 INFO [org.hibernate.Version] (ServerService Thread Pool -- 67) HHH000412: Hibernate Core {5.1.14.Final}
10:16:17,410 INFO [org.hibernate.cfg.Environment] (ServerService Thread Pool -- 67) HHH000206: hibernate.properties not found
10:16:17,410 INFO [org.hibernate.cfg.Environment] (ServerService Thread Pool -- 67) HHH000021: Bytecode provider name : javassist
10:16:17,441 INFO [org.hibernate.annotations.common.Version] (ServerService Thread Pool -- 67) HCANN000001: Hibernate Commons Annotations {5.0.2.Final}
10:16:18,410 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 67) WFLYJPA0010: Starting Persistence Unit (phase 1 of 2) Service 'AmexDAPWebServices.war#JPAAmex'
10:16:18,410 INFO [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 67) HHH000204: Processing PersistenceUnitInfo [
name: JPAAmex
...]
10:16:18,412 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.deployment.unit."AmexDAPWebServices.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."AmexDAPWebServices.war".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment "AmexDAPWebServices.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:150)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1736)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1698)
at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1556)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting reflective information for class amexdap.webservices.LoginUserServletDB with ClassLoader ModuleClassLoader for Module "deployment.AmexDAPWebServices.war" from Service Module Loader
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:78)
at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:57)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:106)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:91)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:76)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:143)
... 8 more
Caused by: java.lang.NoClassDefFoundError: Lcom/olsa/amex/services/LoginService;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.lang.Class.getDeclaredFields(Unknown Source)
at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:72)
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70)
... 13 more
Caused by: java.lang.ClassNotFoundException: com.olsa.amex.services.LoginService from [Module "deployment.AmexDAPWebServices.war" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:255)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
... 18 more

10:16:19,069 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "AmexDAPWebServices.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"AmexDAPWebServices.war\".POST_MODULE" => "WFLYSRV0153: Failed to process phase POST_MODULE of deployment \"AmexDAPWebServices.war\"
Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting reflective information for class amexdap.webservices.LoginUserServletDB with ClassLoader ModuleClassLoader for Module \"deployment.AmexDAPWebServices.war\" from Service Module Loader
Caused by: java.lang.NoClassDefFoundError: Lcom/olsa/amex/services/LoginService;
Caused by: java.lang.ClassNotFoundException: com.olsa.amex.services.LoginService from [Module \"deployment.AmexDAPWebServices.war\" from Service Module Loader]"}}
10:16:19,069 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "amexsbswebapp.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"amexsbswebapp.war\".POST_MODULE" => "WFLYSRV0153: Failed to process phase POST_MODULE of deployment \"amexsbswebapp.war\"
Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting reflective information for class olsa.cerved.corporate.SBSTemplateManager with ClassLoader ModuleClassLoader for Module \"deployment.amexsbswebapp.war\" from Service Module Loader
Caused by: java.lang.NoClassDefFoundError: com/olsa/amex/services/parameters/ApplicationTemplateParameters
Caused by: java.lang.ClassNotFoundException: com.olsa.amex.services.parameters.ApplicationTemplateParameters from [Module \"deployment.amexsbswebapp.war\" from Service Module Loader]"}}
10:16:19,084 INFO [org.jboss.as.server] (ServerService Thread Pool -- 39) WFLYSRV0010: Deployed "amexsbswebapp.war" (runtime-name : "amexsbswebapp.war")
10:16:19,084 INFO [org.jboss.as.server] (ServerService Thread Pool -- 39) WFLYSRV0010: Deployed "AmexDAPWebServices.war" (runtime-name : "AmexDAPWebServices.war")
10:16:19,084 INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0186: Services which failed to start: service jboss.deployment.unit."AmexDAPWebServices.war".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment "AmexDAPWebServices.war"
service jboss.deployment.unit."amexsbswebapp.war".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment "amexsbswebapp.war"

10:16:19,131 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
10:16:19,131 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
10:16:19,131 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
10:16:19,131 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 13.0.0.Final (WildFly Core 5.0.0.Final) started (with errors) in 16942ms - Started 318 of 541 services (2 services failed or
missing dependencies, 312 services are lazy, passive or on-demand)

但是如果我用 Maven 构建 WARS,然后将 WAR 手动粘贴到

{JBOSS_HOME}\standalone\deployments

文件夹,WAR 将毫无问题地部署。有没有办法解决这个问题?从 Eclipse 进行部署,以便更快地测试/修复代码问题,这将为我节省大量时间。

编辑:

我的项目目前是如何构建的:

 -Amexwebappsbs (FrontEnd with Angularjs, works fine)
-AmexDAPWebServices (Backend with servlets and stuff)
|
|
--- AmexDAPLib-1.0(another project with services like db queries with JPA)
|
|
---- JPAAmex (JPA project with persistence.xml file)

最佳答案

我终于想出了一个解决方案,为了不在 WAR 中“爆炸”你的 jar,你需要右键单击你的项目 ---> Maven ---> 禁用工作区解析。这解决了我的问题,我现在可以毫无问题地从 Eclipse 进行部署!

关于java - Wildfly 13.0 在从 Eclipse 部署时未能部署多个 WAR,否则工作正常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56356054/

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