Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-3237

WELD-001125: Illegal bean type interface

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 3.13.2.Final
    • CDI Integration
    • None
    • Hide

      Create a Java EE project and include as a dependency (possibly transitively) Rest Easy.   Notice Wildfly CDI tries to scan the jars and doesn't like what it finds.

       

       

      Show
      Create a Java EE project and include as a dependency (possibly transitively) Rest Easy.   Notice Wildfly CDI tries to scan the jars and doesn't like what it finds.    

    Description

      If I include Rest Easy in my Wildfly Java EE project I'll see warnings about CDI not liking Rest Easy classes when I deploy the war file.  I don't have a beans.xml in my project.   Here are the warnings:

       

      12:30:26,859 INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool – 1) WELD-001125: Illegal bean type interface org.jboss.resteasy.core.messagebody.AsyncBufferedMessageBodyWriter<javax.xml.bind.JAXBElement<?>> ignored on [EnhancedAnnotatedTypeImpl] public @Produces @ApplicationScoped @Consumes @Provider class org.jboss.resteasy.plugins.providers.jaxb.JAXBElementProvider
      12:30:26,859 INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool – 1) WELD-001125: Illegal bean type org.jboss.resteasy.plugins.providers.jaxb.AbstractJAXBProvider<javax.xml.bind.JAXBElement<?>> ignored on [EnhancedAnnotatedTypeImpl] public @Produces @ApplicationScoped @Consumes @Provider class org.jboss.resteasy.plugins.providers.jaxb.JAXBElementProvider
      12:30:26,859 INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool – 1) WELD-001125: Illegal bean type interface javax.ws.rs.ext.MessageBodyReader<javax.xml.bind.JAXBElement<?>> ignored on [EnhancedAnnotatedTypeImpl] public @Produces @ApplicationScoped @Consumes @Provider class org.jboss.resteasy.plugins.providers.jaxb.JAXBElementProvider
      12:30:26,859 INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool – 1) WELD-001125: Illegal bean type class org.jboss.resteasy.plugins.providers.AbstractEntityProvider<javax.xml.bind.JAXBElement<?>> ignored on [EnhancedAnnotatedTypeImpl] public @Produces @ApplicationScoped @Consumes @Provider class org.jboss.resteasy.plugins.providers.jaxb.JAXBElementProvider
      12:30:26,859 INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool – 1) WELD-001125: Illegal bean type interface org.jboss.resteasy.spi.AsyncMessageBodyWriter<javax.xml.bind.JAXBElement<?>> ignored on [EnhancedAnnotatedTypeImpl] public @Produces @ApplicationScoped @Consumes @Provider class org.jboss.resteasy.plugins.providers.jaxb.JAXBElementProvider
      12:30:26,860 INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool – 1) WELD-001125: Illegal bean type interface javax.ws.rs.ext.MessageBodyWriter<javax.xml.bind.JAXBElement<?>> ignored on [EnhancedAnnotatedTypeImpl] public @Produces @ApplicationScoped @Consumes @Provider class org.jboss.resteasy.plugins.providers.jaxb.JAXBElementProvider
      12:30:26,893 WARN  [org.jboss.weld.Bootstrap] (Weld Thread Pool – 17) WELD-000167: Class org.jboss.resteasy.core.AsynchronousDispatcher is annotated with @RequestScoped but it does not declare an appropriate constructor therefore is not registered as a bean!
      12:30:26,896 INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool – 11) WELD-001125: Illegal bean type javax.ws.rs.ext.MessageBodyReader<java.util.List<?>> ignored on [EnhancedAnnotatedTypeImpl] public @ApplicationScoped @Consumes @Provider class org.jboss.resteasy.plugins.providers.multipart.ListMultipartReader
      12:30:26,896 INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool – 9) WELD-001125: Illegal bean type javax.ws.rs.ext.MessageBodyReader<java.util.Map<?, ?>> ignored on [EnhancedAnnotatedTypeImpl] public @ApplicationScoped @Consumes @Provider class org.jboss.resteasy.plugins.providers.multipart.MapMultipartFormDataReader

       

       

      Note: I'm actually including the Keycloak-admin-client jar as a dependency in my Wildfly Java EE project, but Rest Easy is a transitive dependency:

      https://mvnrepository.com/artifact/org.keycloak/keycloak-admin-client/19.0.2

       

      Any tips on what to do about this?   Is there a way to include this library in Wildfly without getting CDI WARNINGS?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              slominskir Ryan Slominski
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: