Webapp deployment is null for Wildfly

109 views Asked by At

I am trying to deploy my Webapp based on JSF and with the pretty-config url rewritting. However, I cannot deploy my webapp on Wildfly 30.

Here is the server stacktraces:

15:49:42,528 INFO  [org.jboss.as.repository] (DeploymentScanner-threads - 1) WFLYDR0001: Content added at location /home/cazauxj/soft/Wildfly/wildfly-30.0.0.Final/standalone/data/content/38/b6457d0fb37e37f344353750e22c157cedcfb0/content
15:49:42,561 INFO  [org.jboss.as.jpa] (ServerService Thread Pool -- 100) WFLYJPA0011: Stopping Persistence Unit (phase 2 of 2) Service 'web-0.0.1-SNAPSHOT.war#FarscapePU'
15:49:42,564 INFO  [org.hibernate.orm.beans] (ServerService Thread Pool -- 100) HHH10005004: Stopping BeanContainer : org.hibernate.resource.beans.container.internal.CdiBeanContainerExtendedAccessImpl@ea97e10
15:49:42,566 INFO  [org.jboss.as.jpa] (ServerService Thread Pool -- 100) WFLYJPA0011: Stopping Persistence Unit (phase 1 of 2) Service 'web-0.0.1-SNAPSHOT.war#FarscapePU'
15:49:42,917 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0028: Stopped deployment web-0.0.1-SNAPSHOT.war (runtime-name: web-0.0.1-SNAPSHOT.war) in 386ms
15:49:42,921 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0027: Starting deployment of "web-0.0.1-SNAPSHOT.war" (runtime-name: "web-0.0.1-SNAPSHOT.war")
15:49:44,856 INFO  [org.jboss.as.jpa] (MSC service thread 1-5) WFLYJPA0002: Read persistence.xml for FarscapePU
15:49:44,972 INFO  [org.jipijapa] (MSC service thread 1-3) JIPIORMV6020260: Second level cache enabled for web-0.0.1-SNAPSHOT.war#FarscapePU
15:49:44,983 INFO  [org.jboss.weld.deployer] (MSC service thread 1-5) WFLYWELD0003: Processing weld deployment web-0.0.1-SNAPSHOT.war
15:49:44,991 INFO  [org.infinispan.CONTAINER] (ServerService Thread Pool -- 100) ISPN000556: Starting user marshaller 'org.wildfly.clustering.infinispan.marshalling.jboss.JBossMarshaller'
15:49:45,030 INFO  [org.jboss.as.jpa] (ServerService Thread Pool -- 100) WFLYJPA0010: Starting Persistence Unit (phase 1 of 2) Service 'web-0.0.1-SNAPSHOT.war#FarscapePU'
15:49:45,030 INFO  [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 100) HHH000204: Processing PersistenceUnitInfo [name: FarscapePU]
15:49:45,049 INFO  [org.jipijapa] (MSC service thread 1-6) JIPIORMV6020260: Second level cache enabled for web-0.0.1-SNAPSHOT.war#FarscapePU
15:49:45,050 WARN  [org.hibernate.orm.deprecation] (ServerService Thread Pool -- 100) HHH90000025: MySQLDialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default)
15:49:45,055 INFO  [org.hibernate.envers.boot.internal.EnversServiceImpl] (ServerService Thread Pool -- 100) Envers integration enabled? : true
15:49:45,096 INFO  [org.jboss.as.jpa] (ServerService Thread Pool -- 100) WFLYJPA0010: Starting Persistence Unit (phase 2 of 2) Service 'web-0.0.1-SNAPSHOT.war#FarscapePU'
15:49:45,274 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 102) MSC000001: Failed to start service jboss.deployment.unit."web-0.0.1-SNAPSHOT.war".undertow-deployment: org.jboss.msc.service.StartException in service jboss.deployment.unit."web-0.0.1-SNAPSHOT.war".undertow-deployment: java.lang.RuntimeException: java.lang.NullPointerException: Cannot invoke "io.undertow.servlet.core.DeploymentImpl.createThreadSetupAction(io.undertow.servlet.api.ThreadSetupHandler$Action)" because "this.deployment" is null
    at [email protected]//org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:73)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    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)
    at [email protected]//org.jboss.threads.JBossThread.run(JBossThread.java:513)
Caused by: java.lang.RuntimeException: java.lang.NullPointerException: Cannot invoke "io.undertow.servlet.core.DeploymentImpl.createThreadSetupAction(io.undertow.servlet.api.ThreadSetupHandler$Action)" because "this.deployment" is null
    at [email protected]//io.undertow.servlet.core.DeploymentManagerImpl.undeploy(DeploymentManagerImpl.java:690)
    at [email protected]//org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:93)
    at [email protected]//org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:70)
    ... 8 more
Caused by: java.lang.NullPointerException: Cannot invoke "io.undertow.servlet.core.DeploymentImpl.createThreadSetupAction(io.undertow.servlet.api.ThreadSetupHandler$Action)" because "this.deployment" is null
    at [email protected]//io.undertow.servlet.core.DeploymentManagerImpl.undeploy(DeploymentManagerImpl.java:673)
    ... 10 more

15:49:45,274 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 1) WFLYCTL0013: Operation ("full-replace-deployment") failed - address: ([]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"web-0.0.1-SNAPSHOT.war\".undertow-deployment" => "java.lang.RuntimeException: java.lang.NullPointerException: Cannot invoke \"io.undertow.servlet.core.DeploymentImpl.createThreadSetupAction(io.undertow.servlet.api.ThreadSetupHandler$Action)\" because \"this.deployment\" is null
    Caused by: java.lang.RuntimeException: java.lang.NullPointerException: Cannot invoke \"io.undertow.servlet.core.DeploymentImpl.createThreadSetupAction(io.undertow.servlet.api.ThreadSetupHandler$Action)\" because \"this.deployment\" is null
    Caused by: java.lang.NullPointerException: Cannot invoke \"io.undertow.servlet.core.DeploymentImpl.createThreadSetupAction(io.undertow.servlet.api.ThreadSetupHandler$Action)\" because \"this.deployment\" is null"}}
15:49:45,289 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 1) WFLYSRV0016: Replaced deployment "web-0.0.1-SNAPSHOT.war" with deployment "web-0.0.1-SNAPSHOT.war"
15:49:45,290 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 1) WFLYCTL0183: Service status report
WFLYCTL0186:   Services which failed to start:      service jboss.deployment.unit."web-0.0.1-SNAPSHOT.war".undertow-deployment: java.lang.RuntimeException: java.lang.NullPointerException: Cannot invoke "io.undertow.servlet.core.DeploymentImpl.createThreadSetupAction(io.undertow.servlet.api.ThreadSetupHandler$Action)" because "this.deployment" is null

15:49:45,303 INFO  [org.jboss.as.repository] (DeploymentScanner-threads - 1) WFLYDR0002: Content removed from location /home/cazauxj/soft/Wildfly/wildfly-30.0.0.Final/standalone/data/content/83/f15bfe4aad1e2b017cf4d38dbfb26f531fdf05/content

Here is my web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

    <!--Pretty faces conf -->
    <!-- 
    <filter>
        <filter-name>PrettyFilter</filter-name>
        <filter-class>com.ocpsoft.pretty.PrettyFilter</filter-class>
    </filter>
     -->

    <filter-mapping>
        <filter-name>springSecurityFilterChain</filter-name>
        <url-pattern>/*</url-pattern>
        <dispatcher>FORWARD</dispatcher>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>ERROR</dispatcher>
    </filter-mapping>

    <context-param>
        <param-name>jakarta.faces.PROJECT_STAGE</param-name>
        <param-value>Development</param-value>
    </context-param>
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>jakarta.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <session-config>
        <session-timeout>30</session-timeout>
    </session-config>
    <welcome-file-list>
        <welcome-file>faces/pages/index.xhtml</welcome-file>
    </welcome-file-list>

</web-app>

Here is the pretty-config file:

<pretty-config
    xmlns="http://ocpsoft.org/schema/rewrite-config-prettyfaces"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemalocation="http://ocpsoft.org/schema/rewrite-config-prettyfaces
                      http://ocpsoft.org/xml/ns/prettyfaces/rewrite-config-prettyfaces.xsd">

    <!-- Begin RewriteRules -->
    <rewrite match="/faces/pages/.*" trailingSlash="append"
        toCase="lowercase" />
    <rewrite match="^/old-url/(\w+)/$" substitute="/new_url/$1/"
        redirect="301" />

    <url-mapping id="home">
        <pattern value="/" />
        <view-id>/faces/pages/index.xhtml</view-id>
    </url-mapping>
    <url-mapping id="guideEpisode">
        <pattern value="/guide-episodes/" />
        <view-id>/faces/pages/guideEpisode.xhtml</view-id>
    </url-mapping>
    <url-mapping id="intro">
        <pattern value="/introduction" />
        <view-id>/faces/pages/introduction.xhtml</view-id>
    </url-mapping>
    <url-mapping id="saisons">
        <pattern value="/saisons" />
        <view-id>/faces/pages/saisons.xhtml</view-id>
    </url-mapping>
    <url-mapping id="episode">
        <pattern value="/episode/" />
        <view-id>/faces/pages/episode.xhtml</view-id>
    </url-mapping>
</pretty-config>

Please, can you help me, I don't understand and I don't know how to fix the issue

Thank you in advance.

0

There are 0 answers