2017-10-19 4 views
0

Ich habe ein Projekt mit Spring Boot, dass ich nicht mit wildfly10 starten kann. Wie wähle ich aus, wie ich die Anwendung hochladen möchte? Verwende ich Tomcat Embed oder Wildfly?So starten Sie ein Springboot-Projekt mit wildfly10

<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: Ich habe das Projekt durch tomcat unter Embargo beginnen können.

+0

Gereinigt das Englisch. Anfrage um Hilfe entfernt und nur das Problem und die Fragen angegeben. –

Antwort

0

Spring Boot kann absolut mit JEE-Containern verwendet werden, finden Sie in diesem Repository Beispiele für die Bereitstellung von Spring Boot-Anwendungen als Kriege.

https://github.com/Pytry/bootiful-war-deployment 

Schauen Sie sich das Modul "jee-example" an und lassen Sie mich wissen, ob das auf Wildfly für Sie funktioniert. Ohne Zugang zu einigen Beispielcode von Ihnen, es geht um die Fehler zu sein, schwer zu fassen, aber hier sind ein paar Dinge zu suchen und mit dem Beispiel vergleichen:

Haben Sie eine Klasse SpringBootServletInitializer erstreckt?

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); 
    } 
} 

sind ohne Sie die tomcat Starter Abhängigkeiten?

<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> 

Sind auch Sie die javax.servlet: javax.servlet-api geeignete Version für die Instanz von Wildfly?

<dependency> 
    <groupId>javax.servlet</groupId> 
    <artifactId>javax.servlet-api</artifactId> 
    <scope>provided</scope> 
    <!--<version>3.1.0</version>--> 
</dependency> 
+0

Ich habe festgestellt, dass die Sonde in einer Abhängigkeit ist, verwende ich JoinFaces. –

Verwandte Themen