2 Replies Latest reply on Jan 16, 2014 3:13 PM by Savvas Andreas Moysidis

    REST endpoint fails to deploy in WildFly

    Savvas Andreas Moysidis Newbie

      Hi,

       

      I came across a problem while trying to deploy a REST endpoint in WildFly. Specifically, I have a very simple app with one endpoint which I activate using the Application subclass approach and adding my resource class to the Set returned by the getClasses() method.

      Now, when I deploy this app to a 7.1 instance, is is being deployed fine and I can access the endpoint using an http client. When I deploy the very same app to WildFly (wildfly-8.0.0.CR1) using the "Add and Remove" button in Eclipse I am getting the following exception:

       

      Caused by: org.jboss.weld.exceptions.DefinitionException: WELD-000075: Normal scoped managed bean implementation class has a public field:  [EnhancedAnnotatedFieldImpl] public org.jboss.resteasy.core.AcceptHeaderByFileSuffixFilter.mediaTypeMappings

          at org.jboss.weld.bean.ManagedBean.checkBeanImplementation(ManagedBean.java:218)

          at org.jboss.weld.bean.AbstractClassBean.internalInitialize(AbstractClassBean.java:74)

          at org.jboss.weld.bean.ManagedBean.internalInitialize(ManagedBean.java:96)

          at org.jboss.weld.bean.RIBean.initialize(RIBean.java:65)

          at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$5.doWork(ConcurrentBeanDeployer.java:114)

          at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$5.doWork(ConcurrentBeanDeployer.java:112)

          at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)

          at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)

          at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_45]

          ... 3 more

       

      and some lines after that I see this:

       

      JBAS014775:New missing/unsatisfied dependencies:
        service jboss.deployment.unit."jboss-as-helloworld-rs.war".WeldBootstrapService (missing) dependents: [service jboss.deployment.unit."jboss-as-helloworld-rs.war".component."org.jboss.weld.servlet.WeldTerminalListener".WeldInstantiator, service jboss.undertow.deployment.default-server.default-host./jboss-as-helloworld-rs.UndertowDeploymentInfoService, service jboss.deployment.unit."jboss-as-helloworld-rs.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".WeldInstantiator, service jboss.deployment.unit."jboss-as-helloworld-rs.war".CdiValidatorFactoryService, JBAS014799: ... and 2 more ]
        service jboss.deployment.unit."jboss-as-helloworld-rs.war".WeldStartService (missing) dependents: [service jboss.deployment.unit."jboss-as-helloworld-rs.war".component."org.jboss.weld.servlet.WeldTerminalListener".WeldInstantiator, service jboss.deployment.unit."jboss-as-helloworld-rs.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".WeldInstantiator, service jboss.deployment.unit."jboss-as-helloworld-rs.war".CdiValidatorFactoryService]
        service jboss.deployment.unit."jboss-as-helloworld-rs.war".component."com.sun.faces.config.ConfigureListener".CREATE (missing) dependents: [service jboss.deployment.unit."jboss-as-helloworld-rs.war".component."com.sun.faces.config.ConfigureListener".START]
        service jboss.deployment.unit."jboss-as-helloworld-rs.war".component."com.sun.faces.config.ConfigureListener".START (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./jboss-as-helloworld-rs.UndertowDeploymentInfoService, service jboss.undertow.deployment.default-server.default-host./jboss-as-helloworld-rs, service jboss.deployment.unit."jboss-as-helloworld-rs.war".deploymentCompleteService]
        service jboss.deployment.unit."jboss-as-helloworld-rs.war".component."javax.faces.webapp.FacetTag".CREATE (missing) dependents: [service jboss.deployment.unit."jboss-as-helloworld-rs.war".component."javax.faces.webapp.FacetTag".START]
        service jboss.deployment.unit."jboss-as-helloworld-rs.war".component."javax.faces.webapp.FacetTag".START (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./jboss-as-helloworld-rs.UndertowDeploymentInfoService]
        service jboss.deployment.unit."jboss-as-helloworld-rs.war".component."javax.faces.webapp.FacetTag".WeldInstantiator (missing) dependents: [service jboss.deployment.unit."jboss-as-helloworld-rs.war".component."javax.faces.webapp.FacetTag".START]
        service jboss.deployment.unit."jboss-as-helloworld-rs.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".START (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./jboss-as-helloworld-rs.UndertowDeploymentInfoService, service jboss.undertow.deployment.default-server.default-host./jboss-as-helloworld-rs, service jboss.deployment.unit."jboss-as-helloworld-rs.war".deploymentCompleteService]
        service jboss.deployment.unit."jboss-as-helloworld-rs.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".CREATE (missing) dependents: [service jboss.deployment.unit."jboss-as-helloworld-rs.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".START]
        service jboss.deployment.unit."jboss-as-helloworld-rs.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".START (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./jboss-as-helloworld-rs.UndertowDeploymentInfoService]
        service jboss.deployment.unit."jboss-as-helloworld-rs.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".WeldInstantiator (missing) dependents: [service jboss.deployment.unit."jboss-as-helloworld-rs.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".START]
        service jboss.deployment.unit."jboss-as-helloworld-rs.war".component."org.jboss.weld.servlet.WeldInitialListener".CREATE (missing) dependents: [service jboss.deployment.unit."jboss-as-helloworld-rs.war".component."org.jboss.weld.servlet.WeldInitialListener".START]
        service jboss.deployment.unit."jboss-as-helloworld-rs.war".component."org.jboss.weld.servlet.WeldInitialListener".START (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./jboss-as-helloworld-rs.UndertowDeploymentInfoService, service jboss.deployment.unit."jboss-as-helloworld-rs.war".deploymentCompleteService]
        service jboss.deployment.unit."jboss-as-helloworld-rs.war".component."org.jboss.weld.servlet.WeldInitialListener".WeldInstantiator (missing) dependents: [service jboss.deployment.unit."jboss-as-helloworld-rs.war".component."org.jboss.weld.servlet.WeldInitialListener".START]
        service jboss.deployment.unit."jboss-as-helloworld-rs.war".component."org.jboss.weld.servlet.WeldTerminalListener".CREATE (missing) dependents: [service jboss.deployment.unit."jboss-as-helloworld-rs.war".component."org.jboss.weld.servlet.WeldTerminalListener".START]
        service jboss.deployment.unit."jboss-as-helloworld-rs.war".component."org.jboss.weld.servlet.WeldTerminalListener".START (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./jboss-as-helloworld-rs.UndertowDeploymentInfoService, service jboss.deployment.unit."jboss-as-helloworld-rs.war".deploymentCompleteService]
        service jboss.deployment.unit."jboss-as-helloworld-rs.war".component."org.jboss.weld.servlet.WeldTerminalListener".WeldInstantiator (missing) dependents: [service jboss.deployment.unit."jboss-as-helloworld-rs.war".component."org.jboss.weld.servlet.WeldTerminalListener".START]
        service jboss.deployment.unit."jboss-as-helloworld-rs.war".ee.ComponentRegistry (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./jboss-as-helloworld-rs.UndertowDeploymentInfoService]
        service jboss.deployment.unit."jboss-as-helloworld-rs.war".jndiDependencyService (missing) dependents: [service jboss.deployment.unit."jboss-as-helloworld-rs.war".component."javax.faces.webapp.FacetTag".START, service jboss.deployment.unit."jboss-as-helloworld-rs.war".component."org.jboss.weld.servlet.WeldTerminalListener".START, service jboss.deployment.unit."jboss-as-helloworld-rs.war".component."org.jboss.weld.servlet.WeldInitialListener".START, service jboss.deployment.unit."jboss-as-helloworld-rs.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".START]
        service jboss.undertow.deployment.default-server.default-host./jboss-as-helloworld-rs (missing) dependents: [service jboss.deployment.unit."jboss-as-helloworld-rs.war".deploymentCompleteService]
      JBAS014777:   Services which failed to start:  service jboss.deployment.unit."jboss-as-helloworld-rs.war".WeldStartService

       

       

      The only managed resources in the app are the resource endpoint and the Application subclass and none of them defines a public field. Any ideas?

       

      Thanks,

      Savvas