Uploaded image for project: 'AeroGear'
  1. AeroGear
  2. AEROGEAR-6904

Exception when trying to @Inject DefaultJavaSender

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • None
    • None
    • None

    Description

      Trying to use a @Producer for the DefaultJavaSender, in the form:

      ..
      @Produces @ApplicationScoped
      public DefaultJavaSender produceJavaSender() {
         return new DefaultJavaSender("http://localhost:8080/ag-push", new RestEasyClient());
      }
      

      I got back an exception from CDI of a missing no no-args constructor:

      ...
      org.jboss.weld.exceptions.UnproxyableResolutionException: WELD-001435 Normal scoped bean class org.aerogear.unifiedpush.DefaultJavaSender is not proxyable because it has no no-args constructor - Producer Method [DefaultJavaSender] with qualifiers [@Any @Default] declared as [[method] @Produces @ApplicationScoped public org.jboss.aerogear.prodoctor.resources.Resources.produceJavaSender()].
      	at org.jboss.weld.util.Proxies.getUnproxyableClassException(Proxies.java:211)
      	at org.jboss.weld.util.Proxies.getUnproxyableTypeException(Proxies.java:178)
      	at org.jboss.weld.util.Proxies.getUnproxyableTypesExceptionInt(Proxies.java:193)
      ...
      

      not sure if I am missing sth here..

      I solved it by adding a 'protected' non-args constructor to DefaultJavaSender class

      Attachments

        Activity

          People

            sebastienblanc Sebastien Blanc (Inactive)
            cvasilak_jira Christos Vasilakis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: