I need to use the --runtime-name
argument when deploying an application for giving a stable name for HA singleton deployment which uses the runtime-name (deployment) for distinguishing singleton deployments. The default – the WAR’s filename – does not work because our WAR filename contains a version number. A new version would thus form a different singleton.
So I deploy (WildFly 27.0.1) using a command-line like ./jboss-cli.sh --connect --command="deploy MyApp-1.0.0.war --name=MyApp-1.0.0.war --runtime-name=MyApp --force"
When using the filename as runtime-name (or omitting the --runtime-name
arg), the application loads without issue.
But when I use a runtime-name that is different from the filename of the WAR file, the application does not start because none of the included classes is found. I.e., I get ClassNotFoundException
for any class contained in the WAR.
Am I doing something wrong?
2024-05-28 15:15:11,201 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit.MyApp.POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit.MyApp.POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment "MyApp"
at [email protected]//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:189)
at [email protected]//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
at [email protected]//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
at [email protected]//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
at [email protected]//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at [email protected]//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at [email protected]//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at [email protected]//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.lang.ClassNotFoundException:com.my.app.server.reports.control.TabControl from [Module "deployment.MyApp" from Service Module Loader]
at [email protected]//org.jboss.as.ejb3.deployment.processors.BusinessViewAnnotationProcessor.getEjbClass(BusinessViewAnnotationProcessor.java:260)
at [email protected]//org.jboss.as.ejb3.deployment.processors.BusinessViewAnnotationProcessor.deploy(BusinessViewAnnotationProcessor.java:89)
at [email protected]//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:182)
... 8 more
Caused by: java.lang.ClassNotFoundException:com.my.app.server.reports.control.TabControl from [Module "deployment.MyApp" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:200)
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)
at [email protected]//org.jboss.as.ejb3.deployment.processors.BusinessViewAnnotationProcessor.getEjbClass(BusinessViewAnnotationProcessor.java:258)
... 10 more
fs-chris is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.