I am trying to deploy a web application which has dependencies on Spark version 2.1.1, Hbase 1.2, Phoenix 4.11 and Kafka 0.9.
The application is not getting deployed, the error I am encountering is given below.
It is regarding javassist, the default javassist (v 3.18.0-Final) shipped with wildfly is being referred to here.
16:37:09,171 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 62) MSC000001: Failed to start service jboss.persistenceunit."client.war#DefaultTenant".__FIRST_PHASE__: org.jboss.msc.service.StartException in service jboss.persistenceunit."client.war#DefaultTenant".__FIRST_PHASE__: org.hibernate.boot.archive.spi.ArchiveException: Could not build ClassFile
at org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl$1$1.run(PhaseOnePersistenceUnitServiceImpl.java:128)
at org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl$1$1.run(PhaseOnePersistenceUnitServiceImpl.java:104)
at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:640)
at org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl$1.run(PhaseOnePersistenceUnitServiceImpl.java:137)
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)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: org.hibernate.boot.archive.spi.ArchiveException: Could not build ClassFile
at org.hibernate.boot.archive.scan.spi.ClassFileArchiveEntryHandler.toClassFile(ClassFileArchiveEntryHandler.java:64)
at org.hibernate.boot.archive.scan.spi.ClassFileArchiveEntryHandler.handleEntry(ClassFileArchiveEntryHandler.java:47)
at org.jboss.as.jpa.hibernate5.VirtualFileSystemArchiveDescriptor.processVirtualFile(VirtualFileSystemArchiveDescriptor.java:94)
at org.jboss.as.jpa.hibernate5.VirtualFileSystemArchiveDescriptor.visitArchive(VirtualFileSystemArchiveDescriptor.java:49)
at org.hibernate.boot.archive.scan.spi.AbstractScannerImpl.scan(AbstractScannerImpl.java:47)
at org.hibernate.boot.model.process.internal.ScanningCoordinator.coordinateScan(ScanningCoordinator.java:75)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.prepare(MetadataBuildingProcess.java:98)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.<init>(EntityManagerFactoryBuilderImpl.java:200)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.<init>(EntityManagerFactoryBuilderImpl.java:150)
at org.hibernate.jpa.boot.spi.Bootstrap.getEntityManagerFactoryBuilder(Bootstrap.java:28)
at org.hibernate.jpa.boot.spi.Bootstrap.getEntityManagerFactoryBuilder(Bootstrap.java:40)
at org.jboss.as.jpa.hibernate5.TwoPhaseBootstrapImpl.<init>(TwoPhaseBootstrapImpl.java:39)
at org.jboss.as.jpa.hibernate5.HibernatePersistenceProviderAdaptor.getBootstrap(HibernatePersistenceProviderAdaptor.java:199)
at org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl.createContainerEntityManagerFactoryBuilder(PhaseOnePersistenceUnitServiceImpl.java:254)
at org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl.access$900(PhaseOnePersistenceUnitServiceImpl.java:59)
at org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl$1$1.run(PhaseOnePersistenceUnitServiceImpl.java:125)
... 7 more
16:37:09,191 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "client.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.persistenceunit.\"client.war#DefaultTenant\".__FIRST_PHASE__" => "org.hibernate.boot.archive.spi.ArchiveException: Could not build ClassFile
Caused by: org.hibernate.boot.archive.spi.ArchiveException: Could not build ClassFile"}}
Related
I got this exception when starting my WAR file in the Wildfly 24 server under Java 16 after migrating from Wildfly 10 / Java 9.
I dont understand this Exception.
`11:37:44,290 SEVERE [javax.faces] (ServerService Thread Pool -- 89) Unable to obtain InjectionProvider from init time FacesContext. Does this container implement the Mojarra Injection SPI?
11:37:44,292 SEVERE [javax.faces] (ServerService Thread Pool -- 89) Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory. Attempting to find backup.
11:37:44,293 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 89) MSC000001: Failed to start service jboss.deployment.unit."myApplication.war".undertow-deployment: org.jboss.msc.service.StartException in service jboss.deployment.unit."myApplication.war".undertow-deployment: java.lang.RuntimeException: java.lang.IllegalStateException: Could not find backup for factory javax.faces.application.ApplicationFactory.
at org.wildfly.extension.undertow#24.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:90)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.base/java.lang.Thread.run(Thread.java:831)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513)
Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: Could not find backup for factory javax.faces.application.ApplicationFactory.
at io.undertow.servlet#2.2.8.Final//io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:257)
at org.wildfly.extension.undertow#24.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:105)
at org.wildfly.extension.undertow#24.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:87)
... 8 more
Caused by: java.lang.IllegalStateException: Could not find backup for factory javax.faces.application.ApplicationFactory.
at javax.faces.api#3.0.0.SP04//javax.faces.FactoryFinderInstance.notNullFactory(FactoryFinderInstance.java:524)
at javax.faces.api#3.0.0.SP04//javax.faces.FactoryFinderInstance.getFactory(FactoryFinderInstance.java:207)
at javax.faces.api#3.0.0.SP04//javax.faces.FactoryFinder.getFactory(FactoryFinder.java:279)
at deployment.myApplication.war//org.apache.myfaces.context.servlet.FacesContextImplBase.getApplication(FacesContextImplBase.java:168)
at deployment.myApplication.war//org.apache.myfaces.context.servlet.FacesContextImplBase.getELContext(FacesContextImplBase.java:230)
at javax.faces.api#3.0.0.SP04//javax.faces.component.UIViewRoot.setLocale(UIViewRoot.java:1603)
at deployment.myApplication.war//org.apache.myfaces.webapp.AbstractFacesInitializer._createFacesContext(AbstractFacesInitializer.java:578)
at deployment.myApplication.war//org.apache.myfaces.webapp.AbstractFacesInitializer.initStartupFacesContext(AbstractFacesInitializer.java:547)
at deployment.myApplication.war//org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:100)
at io.undertow.servlet#2.2.8.Final//io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:187)
at io.undertow.servlet#2.2.8.Final//io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:219)
at io.undertow.servlet#2.2.8.Final//io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:187)
at io.undertow.servlet#2.2.8.Final//io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
at io.undertow.servlet#2.2.8.Final//io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at org.wildfly.extension.undertow#24.0.1.Final//org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
at org.wildfly.extension.undertow#24.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1535)
at org.wildfly.extension.undertow#24.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1535)
at org.wildfly.extension.undertow#24.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1535)
at org.wildfly.extension.undertow#24.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1535)
at org.wildfly.extension.undertow#24.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1535)
at io.undertow.servlet#2.2.8.Final//io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:255)
... 10 more
11:37:44,299 ERROR [org.jboss.as.controller.management-operation]
(Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed -
address: ([("deployment" => "myApplication.war")]) - failure
description: {"WFLYCTL0080: Failed services" =>
{"jboss.deployment.unit."myApplication.war".undertow-deployment" =>
"java.lang.RuntimeException: java.lang.IllegalStateException: Could
not find backup for factory
javax.faces.application.ApplicationFactory.
Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: Could not find backup for factory
javax.faces.application.ApplicationFactory.
Caused by: java.lang.IllegalStateException: Could not find backup for factory javax.faces.application.ApplicationFactory. "}}`
I need to upload my web project to Wildfly 11. The first time I tried to upload my project without external libraries and it worked correctly, but when I add new libraries it no longer allows me to upload in wildfly 11. the project runs fine if I run it as java in the Eclipse IDE.I generated war with export project in eclipse, the error that comes out is the following.
21:22:43,137 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.deployment.unit."ApiPolizaApesegTest.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."ApiPolizaApesegTest.war".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment "ApiPolizaApesegTest.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:172)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2032)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1955)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting reflective information for class imp.ws.soatcimtc.rimac.soap.SOAPImpl with ClassLoader ModuleClassLoader for Module "deployment.ApiPolizaApesegTest.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:165)
... 5 more
Caused by: java.lang.NoClassDefFoundError: com/amazonaws/Request
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)
... 10 more
Caused by: java.lang.ClassNotFoundException: com.amazonaws.Request from [Module "deployment.ApiPolizaApesegTest.war" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:412)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:400)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
... 15 more
21:22:43,142 ERROR [org.jboss.as.controller.management-operation] (External Management Request Threads -- 6) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "ApiPolizaApesegTest.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"ApiPolizaApesegTest.war\".POST_MODULE" => "WFLYSRV0153: Failed to process phase POST_MODULE of deployment \"ApiPolizaApesegTest.war\"
Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting reflective information for class imp.ws.soatcimtc.rimac.soap.SOAPImpl with ClassLoader ModuleClassLoader for Module \"deployment.ApiPolizaApesegTest.war\" from Service Module Loader
Caused by: java.lang.NoClassDefFoundError: com/amazonaws/Request
Caused by: java.lang.ClassNotFoundException: com.amazonaws.Request from [Module \"deployment.ApiPolizaApesegTest.war\" from Service Module Loader]"}}
21:22:43,144 ERROR [org.jboss.as.server] (External Management Request Threads -- 6) WFLYSRV0021: Deploy of deployment "ApiPolizaApesegTest.war" was rolled back with the following failure message:
{"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"ApiPolizaApesegTest.war\".POST_MODULE" => "WFLYSRV0153: Failed to process phase POST_MODULE of deployment \"ApiPolizaApesegTest.war\"
Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting reflective information for class imp.ws.soatcimtc.rimac.soap.SOAPImpl with ClassLoader ModuleClassLoader for Module \"deployment.ApiPolizaApesegTest.war\" from Service Module Loader
Caused by: java.lang.NoClassDefFoundError: com/amazonaws/Request
Caused by: java.lang.ClassNotFoundException: com.amazonaws.Request from [Module \"deployment.ApiPolizaApesegTest.war\" from Service Module Loader]"}}
I think that I might not recognize the external libraries, I add the libraries by jar
You need to package your "external libraries" into your war and redeploy the application using the new war.
Also WildFly 11 is quite old, I would recommend to upgrade to WildFly 23.
Steps to Reproduce
Create default grails app:
grails create-app hello - grails 4.0.5 , openJDK 11 , gradle 6
Build deployable war using command - grails war
Try to deploy on JBossEAP 7.1 standalone
Expected Behaviour
Grails docs says:
Ideally you should be able to simply drop a WAR file created by Grails into any application server and it should work straight away.
Actual Behaviour
2021-01-15 06:47:28,216 ERROR [org.springframework.boot.SpringApplication] (ServerService Thread Pool -- 203) Application run failed: java.lang.NullPointerException
at deployment.hello-0.1.war//io.micronaut.context.env.PropertySourcePropertyResolver.processPropertySource(PropertySourcePropertyResolver.java:450)
at deployment.hello-0.1.war//io.micronaut.context.env.DefaultEnvironment.readPropertySources(DefaultEnvironment.java:459)
at deployment.hello-0.1.war//io.micronaut.context.env.DefaultEnvironment.start(DefaultEnvironment.java:311)
at deployment.hello-0.1.war//io.micronaut.context.env.DefaultEnvironment.start(DefaultEnvironment.java:63)
at deployment.hello-0.1.war//io.micronaut.context.DefaultApplicationContext.startEnvironment(DefaultApplicationContext.java:228)
at deployment.hello-0.1.war//io.micronaut.context.DefaultApplicationContext.start(DefaultApplicationContext.java:186)
at deployment.hello-0.1.war//grails.boot.GrailsApp.createApplicationContext(GrailsApp.groovy:155)
at deployment.hello-0.1.war//org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
at deployment.hello-0.1.war//grails.boot.GrailsApp.run(GrailsApp.groovy:97)
at deployment.hello-0.1.war//org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:151)
at deployment.hello-0.1.war//org.grails.boot.context.web.GrailsAppServletInitializer.createRootApplicationContext(GrailsAppServletInitializer.groovy:57)
at deployment.hello-0.1.war//org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:91)
at deployment.hello-0.1.war//org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:171)
at io.undertow.servlet#2.0.28.SP1-redhat-00001//io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:204)
at io.undertow.servlet#2.0.28.SP1-redhat-00001//io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:186)
at io.undertow.servlet#2.0.28.SP1-redhat-00001//io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
at io.undertow.servlet#2.0.28.SP1-redhat-00001//io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at org.wildfly.extension.undertow#7.2.7.GA-redhat-00004//org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
at org.wildfly.extension.undertow#7.2.7.GA-redhat-00004//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1504)
at org.wildfly.extension.undertow#7.2.7.GA-redhat-00004//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1504)
at org.wildfly.extension.undertow#7.2.7.GA-redhat-00004//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1504)
at org.wildfly.extension.undertow#7.2.7.GA-redhat-00004//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1504)
at io.undertow.servlet#2.0.28.SP1-redhat-00001//io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:252)
at org.wildfly.extension.undertow#7.2.7.GA-redhat-00004//org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:96)
at org.wildfly.extension.undertow#7.2.7.GA-redhat-00004//org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:78)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.jboss.threads#2.3.2.Final-redhat-1//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads#2.3.2.Final-redhat-1//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
at org.jboss.threads#2.3.2.Final-redhat-1//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
at org.jboss.threads#2.3.2.Final-redhat-1//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
at java.base/java.lang.Thread.run(Thread.java:834)
at org.jboss.threads#2.3.2.Final-redhat-1//org.jboss.threads.JBossThread.run(JBossThread.java:485)
2021-01-15 06:47:28,216 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 203) MSC000001: Failed to start service jboss.deployment.unit."hello-0.1.war".undertow-deployment: org.jboss.msc.service.StartException in service jboss.deployment.unit."hello-0.1.war".undertow-deployment: java.lang.RuntimeException: java.lang.NullPointerException
at org.wildfly.extension.undertow#7.2.7.GA-redhat-00004//org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:81)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.jboss.threads#2.3.2.Final-redhat-1//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads#2.3.2.Final-redhat-1//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
at org.jboss.threads#2.3.2.Final-redhat-1//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
at org.jboss.threads#2.3.2.Final-redhat-1//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
at java.base/java.lang.Thread.run(Thread.java:834)
at org.jboss.threads#2.3.2.Final-redhat-1//org.jboss.threads.JBossThread.run(JBossThread.java:485)
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
at io.undertow.servlet#2.0.28.SP1-redhat-00001//io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:254)
at org.wildfly.extension.undertow#7.2.7.GA-redhat-00004//org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:96)
at org.wildfly.extension.undertow#7.2.7.GA-redhat-00004//org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:78)
... 8 more
Caused by: java.lang.NullPointerException
at deployment.hello-0.1.war//io.micronaut.context.env.PropertySourcePropertyResolver.processPropertySource(PropertySourcePropertyResolver.java:450)
at deployment.hello-0.1.war//io.micronaut.context.env.DefaultEnvironment.readPropertySources(DefaultEnvironment.java:459)
at deployment.hello-0.1.war//io.micronaut.context.env.DefaultEnvironment.start(DefaultEnvironment.java:311)
at deployment.hello-0.1.war//io.micronaut.context.env.DefaultEnvironment.start(DefaultEnvironment.java:63)
at deployment.hello-0.1.war//io.micronaut.context.DefaultApplicationContext.startEnvironment(DefaultApplicationContext.java:228)
at deployment.hello-0.1.war//io.micronaut.context.DefaultApplicationContext.start(DefaultApplicationContext.java:186)
at deployment.hello-0.1.war//grails.boot.GrailsApp.createApplicationContext(GrailsApp.groovy:155)
at deployment.hello-0.1.war//org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
at deployment.hello-0.1.war//grails.boot.GrailsApp.run(GrailsApp.groovy:97)
at deployment.hello-0.1.war//org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:151)
at deployment.hello-0.1.war//org.grails.boot.context.web.GrailsAppServletInitializer.createRootApplicationContext(GrailsAppServletInitializer.groovy:57)
at deployment.hello-0.1.war//org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:91)
at deployment.hello-0.1.war//org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:171)
at io.undertow.servlet#2.0.28.SP1-redhat-00001//io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:204)
at io.undertow.servlet#2.0.28.SP1-redhat-00001//io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:186)
at io.undertow.servlet#2.0.28.SP1-redhat-00001//io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
at io.undertow.servlet#2.0.28.SP1-redhat-00001//io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at org.wildfly.extension.undertow#7.2.7.GA-redhat-00004//org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
at org.wildfly.extension.undertow#7.2.7.GA-redhat-00004//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1504)
at org.wildfly.extension.undertow#7.2.7.GA-redhat-00004//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1504)
at org.wildfly.extension.undertow#7.2.7.GA-redhat-00004//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1504)
at org.wildfly.extension.undertow#7.2.7.GA-redhat-00004//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1504)
at io.undertow.servlet#2.0.28.SP1-redhat-00001//io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:252)
... 10 more
2021-01-15 06:47:28,220 ERROR [org.jboss.as.controller.management-operation] (External Management Request Threads -- 3) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "hello-0.1.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"hello-0.1.war\".undertow-deployment" => "java.lang.RuntimeException: java.lang.NullPointerException
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
Caused by: java.lang.NullPointerException"}}
2021-01-15 06:47:28,220 ERROR [org.jboss.as.server] (External Management Request Threads -- 3) WFLYSRV0021: Deploy of deployment "hello-0.1.war" was rolled back with the following failure message:
{"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"hello-0.1.war\".undertow-deployment" => "java.lang.RuntimeException: java.lang.NullPointerException
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
Caused by: java.lang.NullPointerException"}}
The errors that I am seeing:
10:54:25,376 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC000001: Failed to start service jboss.deployment.subunit."xxxEAR-1.0.0-SNAPSHOT.ear"."upload-api-talon.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."xxxEAR-1.0.0-SNAPSHOT.ear"."xxx.war".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of subdeployment "xxx.war" of deployment "xxxEAR-1.0.0-SNAPSHOT.ear"
More Errors I am seeing:
10:54:25,429 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "xxxEAR-1.0.0-SNAPSHOT.ear")]) - failure description: {
"WFLYCTL0080: Failed services" => {"jboss.deployment.subunit.\"xxxEAR-1.0.0-SNAPSHOT.ear\".\"xxx.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"xxxEAR-1.0.0-SNAPSHOT.ear\".\"xxx.war\".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of subdeployment \"xxx.war\" of deployment \"xxxEAR-1.0.0-SNAPSHOT.ear\"
Caused by: java.lang.ClassFormatError: Failed to link javax/faces/webapp/FacetTag (Module \"deployment.xxxEAR-1.0.0-SNAPSHOT.ear.xxx.war:main\" from Service Module Loader): Absent Code attribute in method that is not native or abstract in class file javax/faces/webapp/FacetTag"},
"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"jboss.naming.context.java.comp.\"xxxEAR-1.0.0-SNAPSHOT\".transient-store-data.TransientMetadataStorageImpl.InAppClientContainer is missing [jboss.naming.context.java.comp.\"xxxEAR-1.0.0-SNAPSHOT\".transient-store-data.TransientMetadataStorageImpl]",
"jboss.naming.context.java.comp.\"xxxEAR-1.0.0-SNAPSHOT\".transient-store-logic.StoreTrustedDocumentsInTransient.Validator is missing [jboss.naming.context.java.comp.\"xxxEAR-1.0.0-SNAPSHOT\".transient-store-logic.StoreTrustedDocumentsInTransient]",
It looks like it is saying that it can't find my classes, but it can find my jars. How is that possible?
I see this log as well indicating that it can find the Library:
10:54:25,408 INFO [org.jboss.as.ejb3.deployment] (MSC service thread 1-1) WFLYEJB0473: JNDI bindings for session bean named 'QuarantineTransientMetadataStorageImpl' in deployment unit 'subdeployment "transient-store-data.jar" of deployment "upload-api-talonEAR-1.0.0-SNAPSHOT.ear"' are as follows:
java:global/upload-api-talonEAR-1.0.0-SNAPSHOT/transient-store-data/QuarantineTransientMetadataStorageImpl!com.usaa.api.enterprise.contentstorage.data.connectors.IQuarantineMetadataStorage
java:app/transient-store-data/QuarantineTransientMetadataStorageImpl!com.usaa.api.enterprise.contentstorage.data.connectors.IQuarantineMetadataStorage
java:module/QuarantineTransientMetadataStorageImpl!com.usaa.api.enterprise.contentstorage.data.connectors.IQuarantineMetadataStorage
java:global/upload-api-talonEAR-1.0.0-SNAPSHOT/transient-store-data/QuarantineTransientMetadataStorageImpl
java:app/transient-store-data/QuarantineTransientMetadataStorageImpl
java:module/QuarantineTransientMetadataStorageImpl
Honestly, the log is all over the place
If you deploying EJBs, it should be packed as JAR and should have ejb-jar.xml as descriptor. I don't think we can pack EJBs along with web appliaction file.
Typical Structure:
EAR
WARs - Web Modules
JARs - EJBs
I would like to verify the code coverage of my integration tests. I have implemented some REST-Services and deployed them on Wildly 9.0.2. Then I configured the coverage in IntelliJ with IDEA Coverage Runner for tracing support. When I now start Wildfly with coverage the deployment of the war fails with the following strack trace:
16:20:53,103 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC000001: Failed to start service jboss.deployment.unit."myservice-war-1.0.0-SNAPSHOT.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."myservice-war-1.0.0-SNAPSHOT.war".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment "myservice-war-1.0.0-SNAPSHOT.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:163)
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: java.lang.NoClassDefFoundError: com/intellij/rt/coverage/data/ProjectData
at de.akquinet.ats.myservice.rest.services.MyUpdateService.<clinit>(MyUpdateService.java)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.jboss.invocation.proxy.AbstractProxyFactory.afterClassLoad(AbstractProxyFactory.java:95)
at org.jboss.invocation.proxy.AbstractClassFactory.defineClass(AbstractClassFactory.java:166)
at org.jboss.invocation.proxy.AbstractProxyFactory.getCachedMethods(AbstractProxyFactory.java:150)
at org.jboss.as.ejb3.component.stateless.StatelessComponentDescription$3.configure(StatelessComponentDescription.java:150)
at org.jboss.as.ee.component.DefaultComponentViewConfigurator.configure(DefaultComponentViewConfigurator.java:67)
at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:81)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:156)
... 5 more
Caused by: java.lang.ClassNotFoundException: com.intellij.rt.coverage.data.ProjectData from [Module "deployment.myservice-war-1.0.0-SNAPSHOT.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:205)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:455)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:404)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:385)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:130)
... 15 more
16:20:53,106 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 2) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "myservice-war-1.0.0-SNAPSHOT.war")]) - failure description: {
"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"myservice-war-1.0.0-SNAPSHOT.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"myservice-war-1.0.0-SNAPSHOT.war\".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment \"myservice-war-1.0.0-SNAPSHOT.war\"
Caused by: java.lang.NoClassDefFoundError: com/intellij/rt/coverage/data/ProjectData
Caused by: java.lang.ClassNotFoundException: com.intellij.rt.coverage.data.ProjectData from [Module \"deployment.myservice-war-1.0.0-SNAPSHOT.war:main\" from Service Module Loader]"},
"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"jboss.deployment.unit.\"myservice-war-1.0.0-SNAPSHOT.war\".batch.environment is missing [jboss.deployment.unit.\"myservice-war-1.0.0-SNAPSHOT.war\".beanmanager]",
"jboss.deployment.unit.\"myservice-war-1.0.0-SNAPSHOT.war\".weld.weldClassIntrospector is missing [jboss.deployment.unit.\"myservice-war-1.0.0-SNAPSHOT.war\".beanmanager]"
]
}
16:20:53,107 ERROR [org.jboss.as.server] (management-handler-thread - 2) WFLYSRV0021: Deploy of deployment "myservice-war-1.0.0-SNAPSHOT.war" was rolled back with the following failure message:
{
"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"myservice-war-1.0.0-SNAPSHOT.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"myservice-war-1.0.0-SNAPSHOT.war\".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment \"myservice-war-1.0.0-SNAPSHOT.war\"
Caused by: java.lang.NoClassDefFoundError: com/intellij/rt/coverage/data/ProjectData
Caused by: java.lang.ClassNotFoundException: com.intellij.rt.coverage.data.ProjectData from [Module \"deployment.myservice-war-1.0.0-SNAPSHOT.war:main\" from Service Module Loader]"},
"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"jboss.deployment.unit.\"myservice-war-1.0.0-SNAPSHOT.war\".batch.environment is missing [jboss.deployment.unit.\"myservice-war-1.0.0-SNAPSHOT.war\".beanmanager]",
"jboss.deployment.unit.\"myservice-war-1.0.0-SNAPSHOT.war\".weld.weldClassIntrospector is missing [jboss.deployment.unit.\"myservice-war-1.0.0-SNAPSHOT.war\".beanmanager]"
]
}
I am using IntelliJ IDEA 2016.1.2
Build #IU-145.972, built on May 14, 2016
JRE: 1.8.0_76-release-b162 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
I am fully aware of what a ClassNotFoundException is and usually know what to do then, but here I am stuck...
Can anybody help please?
Currently, it is not posible to use IntelliJ IDEA coverage agent, because org.wildfly.arquillian:wildfly-arquillian-container-embedded:2.0.0.Final doesn't have any property for setting System Packages (jboss.modules.system.pkgs system property).
The only way to use IntelliJ IDEA coverage agent is modifying EmbeddedContainerConfiguration and EmbeddedDeployableContainer classes, and then, you must use these customized classes.
I alredy made a pull request, i hope the new version will be available very soon.
public class EmbeddedContainerConfiguration extends CommonContainerConfiguration {
private String systemPackages = System.getProperty("jboss.modules.system.pkgs");
public String getSystemPackages() {
return systemPackages;
}
public void setSystemPackages(String systemPackages) {
this.systemPackages = systemPackages;
}
public String[] getSystemPackagesArray() {
return (systemPackages == null || systemPackages.isEmpty()) ? null : systemPackages.split(",");
}
}
public final class EmbeddedDeployableContainer extends CommonDeployableContainer<EmbeddedContainerConfiguration> {
#Override
public void setup(final EmbeddedContainerConfiguration config) {
super.setup(config);
if (config.getCleanServerBaseDir() != null) {
SecurityActions.setSystemProperty(EmbeddedStandaloneServerFactory.JBOSS_EMBEDDED_ROOT, config.getCleanServerBaseDir());
}
final String[] cmdArgs = getCommandArgs(config);
server = EmbeddedProcessFactory.createStandaloneServer(config.getJbossHome(), config.getModulePath(), config.getSystemPackagesArray(), cmdArgs);
}
}