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

DynamicFeature will cause NPE in Undertow + Resteasy + Weld deployment

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • 4.0.0.Beta5, 3.9.3.Final
    • jaxrs
    • None

    Description

      When I try to deploy resteasy + Weld in undertow, I found the DynamicFeature interface will cause NPE. I've created a sample code base to show what I mean here: https://github.com/ligangty/undertow-resteasy

      In this code base, I've mixed the usage of undertow+resteasy+Weld together, and created one resource class SimpleResource with two @GET methods. Then created a DynamicFeature filter "SimpleResourceDynamicFilter". But when I try to start the undertow, the code will fail and report that there is a NPE problem like below:

      java.lang.NullPointerException: null
      	at com.github.ligangty.undertow.resteasy.test.rest.SimpleResourceDynamicFilter$Proxy$_$$_WeldClientProxy.configure(Unknown Source)
      	at org.jboss.resteasy.core.ResourceMethodInvoker.<init>(ResourceMethodInvoker.java:112)
      	at org.jboss.resteasy.core.ResourceMethodRegistry.processMethod(ResourceMethodRegistry.java:351)
      
      

      To start this project, directly run "mvn exec:java". (Before running please uncomment these two annotation to make this filter deployed: https://github.com/ligangty/undertow-resteasy/blob/master/src/main/java/com/github/ligangty/undertow/resteasy/test/rest/SimpleResourceDynamicFilter.java#L11)

      Env:
      Undertow: 2.0.1 Final
      Resteasy: 4.0.0.Beta5 (or 3.9.3.Final)
      Weld: 2.4.8.Final

      Attachments

        Activity

          People

            Unassigned Unassigned
            gli2@redhat.com Gang Li
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: