3 Replies Latest reply on Dec 19, 2014 10:14 AM by Robert Whitcomb

    RESTEasy and Wildfly 8.2.0

    Robert Whitcomb Newbie

      Hello there, I have a JAX-RS application that I am deploying to Wildfly 8.2 on RHEL6 that is experiencing issues with RESTEasy. When I deploy the application, I never get any messages from the RestEasyDeployment instance that it is deploying my application. However, when I run the application locally (through Intellij), everything works just fine. My dev box and the server have the same instance of Wildfly installed. My web.xml file is blank with the exception of declaring my application to be a v3 web app, and I have extended the application class and annotated that class with @ApplicationPath. Is there something I am missing? All the documentation I have read indicates that I did what is required to get the scanner launch RESTEasy, but repeated servers restarts and application redeployment have done nothing.

        • 1. Re: RESTEasy and Wildfly 8.2.0
          James Perkins Master

          Can you not hit the endpoints on the server? Is there any useful information in the logs? Two servers should definitely not be doing anything different if they are configured the same.

           

          --

          James R. Perkins

          • 2. Re: RESTEasy and Wildfly 8.2.0
            Robert Whitcomb Newbie

            The server responds with a 404 when I attempt to hit the endpoint. I'll post the logs, but essentially, I don't see any messages about RESTEasy initializing my application and bind the endpoints to the given classes.

            • 3. Re: RESTEasy and Wildfly 8.2.0
              Robert Whitcomb Newbie

              Here are the contents of my log file:

              =========================================================================

               

               

                JBoss Bootstrap Environment

               

               

                JBOSS_HOME: /opt/wildfly

               

               

                JAVA: /usr/lib/jvm/jre-1.7.0/bin/java

               

               

                JAVA_OPTS:  -server -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true

               

               

              =========================================================================

               

               

              10:05:25,877 INFO  [org.jboss.modules] (main) JBoss Modules version 1.3.3.Final

                10:05:26,567 INFO  [org.jboss.msc] (main) JBoss MSC version 1.2.2.Final

                10:05:26,710 INFO  [org.jboss.as] (MSC service thread 1-1) JBAS015899: WildFly 8.2.0.Final "Tweek" starting

                10:05:29,084 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015014: Re-attempting failed deployment roadmap.war

                10:05:29,164 INFO  [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creating http management service using socket-binding (management-http)

                10:05:29,201 INFO  [org.xnio] (MSC service thread 1-2) XNIO version 3.3.0.Final

                10:05:29,219 INFO  [org.xnio.nio] (MSC service thread 1-2) XNIO NIO Implementation Version 3.3.0.Final

                10:05:29,318 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 32) JBAS010280: Activating Infinispan subsystem.

                10:05:29,319 INFO  [org.wildfly.extension.io] (ServerService Thread Pool -- 31) WFLYIO001: Worker 'default' has auto-configured to 4 core threads with 32 task threads based on your 2 available processors

                10:05:29,355 INFO  [org.jboss.as.jsf] (ServerService Thread Pool -- 38) JBAS012615: Activated the following JSF Implementations: [main]

                10:05:29,383 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 40) JBAS011800: Activating Naming Subsystem

                [33m10:05:29,412 WARN  [org.jboss.as.txn] (ServerService Thread Pool -- 46) JBAS010153: Node identifier property is set to the default value. Please make sure it is unique.

                10:05:29,416 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 45) JBAS013171: Activating Security Subsystem

                10:05:29,433 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension

                10:05:29,465 INFO  [org.jboss.as.security] (MSC service thread 1-4) JBAS013170: Current PicketBox version=4.0.21.Final

                10:05:29,527 INFO  [org.jboss.remoting] (MSC service thread 1-2) JBoss Remoting version 4.0.6.Final

                10:05:29,643 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 47) JBAS017502: Undertow 1.1.0.Final starting

                10:05:29,685 INFO  [org.jboss.as.connector.logging] (MSC service thread 1-1) JBAS010408: Starting JCA Subsystem (IronJacamar 1.1.9.Final)

                10:05:29,687 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) JBAS017502: Undertow 1.1.0.Final starting

                10:05:29,748 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010404: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)

                10:05:29,825 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)

                10:05:29,846 INFO  [org.jboss.as.naming] (MSC service thread 1-1) JBAS011802: Starting Naming Service

                10:05:29,872 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-4) JBAS015400: Bound mail session [java:jboss/mail/Default]

                10:05:30,293 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3) JBAS010417: Started Driver service with driver-name = mysql

                10:05:30,294 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3) JBAS010417: Started Driver service with driver-name = h2

                10:05:30,650 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 47) JBAS017527: Creating file handler for path /opt/wildfly/welcome-content

                10:05:30,855 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-3) JBAS017525: Started server default-server.

                10:05:30,895 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) JBAS017531: Host default-host starting

                10:05:31,063 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-3) JBAS017519: Undertow HTTP listener default listening on /127.0.0.1:8080

                10:05:31,842 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015876: Starting deployment of "roadmap.war" (runtime-name: "roadmap.war")

                10:05:31,845 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) JBAS010400: Bound data source [java:/roadmapJTA]

                10:05:31,852 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-1) JBAS015012: Started FileSystemDeploymentService for directory /opt/wildfly/standalone/deployments

                10:05:32,505 INFO  [org.jboss.ws.common.management] (MSC service thread 1-2) JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.3.2.Final

                10:05:34,942 INFO  [org.jboss.as.jpa] (MSC service thread 1-3) JBAS011401: Read persistence.xml for roadMap

                10:05:35,416 INFO  [org.jboss.as.jpa] (ServerService Thread Pool -- 50) JBAS011409: Starting Persistence Unit (phase 1 of 2) Service 'roadmap.war#roadMap'

                10:05:35,430 INFO  [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 50) HHH000204: Processing PersistenceUnitInfo [

                name: roadMap

                ...]

                10:05:35,632 INFO  [org.hibernate.Version] (ServerService Thread Pool -- 50) HHH000412: Hibernate Core {4.3.7.Final}

                10:05:35,642 INFO  [org.hibernate.cfg.Environment] (ServerService Thread Pool -- 50) HHH000206: hibernate.properties not found

                10:05:35,645 INFO  [org.hibernate.cfg.Environment] (ServerService Thread Pool -- 50) HHH000021: Bytecode provider name : javassist

                10:05:35,773 INFO  [org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016002: Processing weld deployment roadmap.war

                10:05:35,965 INFO  [org.hibernate.validator.internal.util.Version] (MSC service thread 1-1) HV000001: Hibernate Validator 5.1.3.Final

                10:05:36,487 INFO  [org.jboss.weld.deployer] (MSC service thread 1-2) JBAS016005: Starting Services for CDI deployment: roadmap.war

                10:05:36,536 INFO  [org.jboss.weld.Version] (MSC service thread 1-2) WELD-000900: 2.2.6 (Final)

                10:05:36,609 INFO  [org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016008: Starting weld service for deployment roadmap.war

                10:05:36,908 INFO  [org.jboss.as.jpa] (ServerService Thread Pool -- 50) JBAS011409: Starting Persistence Unit (phase 2 of 2) Service 'roadmap.war#roadMap'

                10:05:37,019 INFO  [org.hibernate.annotations.common.Version] (ServerService Thread Pool -- 50) HCANN000001: Hibernate Commons Annotations {4.0.4.Final}

                10:05:37,538 INFO  [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 50) HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect

                10:05:37,599 INFO  [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (ServerService Thread Pool -- 50) HHH000397: Using ASTQueryTranslatorFactory

                10:05:40,394 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-4) JBAS017534: Registered web context: /roadmap

                10:05:40,589 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 28) JBAS018559: Deployed "roadmap.war" (runtime-name : "roadmap.war")

                10:05:40,651 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management

                10:05:40,652 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990

                10:05:40,653 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.2.0.Final "Tweek" started in 15467ms - Started 270 of 324 services (92 services are lazy, passive or on-demand)

               

              [0m [0m10:05:35,416 INFO  [org.jboss.as.jpa] (ServerService Thread Pool -- 50) JBAS011409: Starting Persistence Unit (phase 1 of 2) Service 'roadmap.war#roadMap'

              [0m [0m10:05:35,430 INFO  [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 50) HHH000204: Processing PersistenceUnitInfo [

                name: roadMap

                ...]

              [0m [0m10:05:35,632 INFO  [org.hibernate.Version] (ServerService Thread Pool -- 50) HHH000412: Hibernate Core {4.3.7.Final}

              [0m [0m10:05:35,642 INFO  [org.hibernate.cfg.Environment] (ServerService Thread Pool -- 50) HHH000206: hibernate.properties not found

              [0m [0m10:05:35,645 INFO  [org.hibernate.cfg.Environment] (ServerService Thread Pool -- 50) HHH000021: Bytecode provider name : javassist

              [0m [0m10:05:35,773 INFO  [org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016002: Processing weld deployment roadmap.war

              [0m [0m10:05:35,965 INFO  [org.hibernate.validator.internal.util.Version] (MSC service thread 1-1) HV000001: Hibernate Validator 5.1.3.Final

              [0m [0m10:05:36,487 INFO  [org.jboss.weld.deployer] (MSC service thread 1-2) JBAS016005: Starting Services for CDI deployment: roadmap.war

              [0m [0m10:05:36,536 INFO  [org.jboss.weld.Version] (MSC service thread 1-2) WELD-000900: 2.2.6 (Final)

              [0m [0m10:05:36,609 INFO  [org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016008: Starting weld service for deployment roadmap.war

              [0m [0m10:05:36,908 INFO  [org.jboss.as.jpa] (ServerService Thread Pool -- 50) JBAS011409: Starting Persistence Unit (phase 2 of 2) Service 'roadmap.war#roadMap'

              [0m [0m10:05:37,019 INFO  [org.hibernate.annotations.common.Version] (ServerService Thread Pool -- 50) HCANN000001: Hibernate Commons Annotations {4.0.4.Final}

              [0m [0m10:05:37,538 INFO  [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 50) HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect

              [0m [0m10:05:37,599 INFO  [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (ServerService Thread Pool -- 50) HHH000397: Using ASTQueryTranslatorFactory

              [0m [0m10:05:40,394 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-4) JBAS017534: Registered web context: /roadmap

              [0m [0m10:05:40,589 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 28) JBAS018559: Deployed "roadmap.war" (runtime-name : "roadmap.war")

              [0m [0m10:05:40,651 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management

              [0m [0m10:05:40,652 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990

              [0m [0m10:05:40,653 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.2.0.Final "Tweek" started in 15467ms - Started 270 of 324 services (92 services are lazy, passive or on-demand)

               

              As you can see, RESTEasy never launches. 

              Also, here are the contents of my application file:

              @ApplicationPath("/services")

              public class RoadmapApplication extends Application {

               

               

                  public RoadmapApplication() {

                      Security.addProvider(new BouncyCastleProvider());

                  }

               

              Ann my web.xml:

              <?xml version="1.0" encoding="UTF-8"?>

              <web-app 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"

                         version="3.0">

              </web-app>