Reputation: 39
I have a project made with spring boot that I can not start with wildfly10. How do I select the way I'd like to upload the application? Do I use Tomcat embed or wildfly?
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
Erro:
Caused by: java.lang.NoSuchMethodError: org.apache.tomcat.util.descriptor.DigesterFactory.newDigester(ZZLorg/apache/tomcat/util/digester/RuleSet;Z)Lorg/apache/tomcat/util/digester/Digester;
at org.apache.tomcat.util.descriptor.tld.TldParser.<init>(TldParser.java:49)
at org.apache.tomcat.util.descriptor.tld.TldParser.<init>(TldParser.java:44)
at org.apache.jasper.servlet.TldScanner.<init>(TldScanner.java:84)
at org.apache.jasper.servlet.JasperInitializer.newTldScanner(JasperInitializer.java:118)
at org.apache.jasper.servlet.JasperInitializer.onStartup(JasperInitializer.java:99)
at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:186)
at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:171)
at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:234)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:100)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)
... 6 more
11:03:40,274 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 2) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "Licitar-0.0.1-SNAPSHOT.war")]) - failure description: {
"WFLYCTL0080: Failed services" => {"jboss.undertow.deployment.default-server.default-host.\"/Licitar-0.0.1-SNAPSHOT\"" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host.\"/Licitar-0.0.1-SNAPSHOT\": java.lang.NoSuchMethodError: org.apache.tomcat.util.descriptor.DigesterFactory.newDigester(ZZLorg/apache/tomcat/util/digester/RuleSet;Z)Lorg/apache/tomcat/util/digester/Digester;
Caused by: java.lang.NoSuchMethodError: org.apache.tomcat.util.descriptor.DigesterFactory.newDigester(ZZLorg/apache/tomcat/util/digester/RuleSet;Z)Lorg/apache/tomcat/util/digester/Digester;"},
"WFLYCTL0412: Required services that are not installed:" => ["jboss.undertow.deployment.default-server.default-host.\"/Licitar-0.0.1-SNAPSHOT\""],
"WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
}
11:03:40,281 ERROR [org.jboss.as.server] (management-handler-thread - 2) WFLYSRV0021: Deploy of deployment "Licitar-0.0.1-SNAPSHOT.war" was rolled back with the following failure message:
{
"WFLYCTL0080: Failed services" => {"jboss.undertow.deployment.default-server.default-host.\"/Licitar-0.0.1-SNAPSHOT\"" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host.\"/Licitar-0.0.1-SNAPSHOT\": java.lang.NoSuchMethodError: org.apache.tomcat.util.descriptor.DigesterFactory.newDigester(ZZLorg/apache/tomcat/util/digester/RuleSet;Z)Lorg/apache/tomcat/util/digester/Digester;
Caused by: java.lang.NoSuchMethodError: org.apache.tomcat.util.descriptor.DigesterFactory.newDigester(ZZLorg/apache/tomcat/util/digester/RuleSet;Z)Lorg/apache/tomcat/util/digester/Digester;"},
"WFLYCTL0412: Required services that are not installed:" => ["jboss.undertow.deployment.default-server.default-host.\"/Licitar-0.0.1-SNAPSHOT\""],
"WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
}
Obs: I can start the project through tomcat embargoed.
Upvotes: 0
Views: 2002
Reputation: 1055
Old problem and OP very likely (and hopefully) have resolved his issue but if anyone else will face this I will post my resolution.
I had to delete apache-jsp* .jar resource from my deployment to get rid of this exact same error.
Upvotes: 0
Reputation: 6390
Spring Boot can absolutely be used with JEE containers, check out this repository for examples on deploying Spring Boot apps as wars.
https://github.com/Pytry/bootiful-war-deployment
Look at the "jee-example" module, and let me know if that works for you on wildfly. Without access to some sample code from you, it's going to be hard to pin down the errors, but here are a few things to look for and compare with the example:
Do you have a class extending SpringBootServletInitializer?
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
@Slf4j
@SpringBootApplication
public class JeeServletInitializer extends SpringBootServletInitializer{
@Value("${messageForUser}")
private String message;
@Value("${whatDoesTheFoxSay:'No body knows.'}")
private String whatDoesTheFoxSay;
public static void main(String[] args){
SpringApplication.run(JeeServletInitializer.class, args);
}
@Override
public SpringApplicationBuilder configure(SpringApplicationBuilder application){
log.info(
"\n*********************\n" +
"What does the fox say?\n" +
whatDoesTheFoxSay +
"\n*********************\n");
return application.sources(JeeServletInitializer.class);
}
}
Are you excluding the tomcat starter dependencies?
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
Are you including the javax.servlet:javax.servlet-api version appropriate for your instance of Wildfly?
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
<!--<version>3.1.0</version>-->
</dependency>
Upvotes: 1