0
votes

after deploying my application over WildFly I see the following messages:

2017-02-15 10:06:51,440 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 178) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./cati: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./cati: 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.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:85) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) 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: 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.(TldParser.java:49) at org.apache.tomcat.util.descriptor.tld.TldParser.(TldParser.java:44) at org.apache.jasper.servlet.TldScanner.(TldScanner.java:79) at org.apache.jasper.servlet.JasperInitializer.newTldScanner(JasperInitializer.java:120) at org.eclipse.jetty.apache.jsp.JettyJasperInitializer.newTldScanner(JettyJasperInitializer.java:115) at org.apache.jasper.servlet.JasperInitializer.onStartup(JasperInitializer.java:101) at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:184) 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

in my maven project I also import the following depdencies

<!-- GWT -->
    <!-- https://mvnrepository.com/artifact/com.google.gwt/gwt-user -->
    <dependency>
        <groupId>com.google.gwt</groupId>
        <artifactId>gwt-user</artifactId>
        <version>2.8.0</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/com.google.gwt/gwt-servlet -->
    <dependency>
        <groupId>com.google.gwt</groupId>
        <artifactId>gwt-servlet</artifactId>
        <version>2.8.0</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/com.google.gwt/gwt-dev -->
    <dependency>
        <groupId>com.google.gwt</groupId>
        <artifactId>gwt-dev</artifactId>
        <version>2.8.0</version>
    </dependency>
    <dependency>
        <groupId>org.apache.tomcat</groupId>
        <artifactId>tomcat-util-scan</artifactId>
        <version>8.5.2</version>
    </dependency>   

As I read over the WildFly project the Tomcat container was removed that why I added the following dependecies :

    <dependency>
        <groupId>org.apache.tomcat</groupId>
        <artifactId>tomcat-util-scan</artifactId>
        <version>8.5.2</version>
    </dependency>   

any ideea how to bypass this error message ?

2
Use Thomas Broyers maven gwt plugin, which allows you to separate the server module, server classpath with the client module classpath. - Brandon
I have the same problem here, did you found out a solution ? - Phoste

2 Answers

0
votes

Of course is not working , as you can see if you add for testing the following depedency (gwt-dev):

<dependency>
        <groupId>com.google.gwt</groupId>
        <artifactId>gwt-dev</artifactId>
        <version>2.8.0</version>
</dependency>

is including the jetty server and this is one of the movtiv for receving the message from my first question.

0
votes

Be sure to not clutter the server side with compile time dependencies.

gwt-servlet is needed only for runtime, gwt-dev and gwt-user should be set to provided - which results in having them available for compiling to JavaScript, but leaving them out in the final WAR file on the application server.

    <!-- GWT -->
    <dependency>
        <groupId>com.google.gwt</groupId>
        <artifactId>gwt-servlet</artifactId>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>com.google.gwt</groupId>
        <artifactId>gwt-user</artifactId>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>com.google.gwt</groupId>
        <artifactId>gwt-dev</artifactId>
        <scope>provided</scope>
    </dependency>

But after all it looks to me like you should not try to put any Tomcat libraries in the WildFly server as it already contains everything to run the server part of your application. Therefore just stick to the plain servlet API like so:

    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <scope>provided</scope>
    </dependency>

It is provided again, as WildFly has it built-in.

Can you try to exclude the Tomcat dependencies and see if it works for you?