2 Replies Latest reply on Jan 22, 2016 1:22 AM by tole42

    null pointer exception using curl to deploy a .war / .ear file

    tole42

      Hi,

       

      i am trying to deploy an app via the wildfly rest-api. Unfortately i got the following NPE:

       

      10:13:47,958 ERROR [io.undertow.request] (XNIO-1 task-10) Undertow request failed HttpServerExchange{ POST /management/add-content}: java.lang.NullPointerException

              at org.jboss.as.domain.http.server.DomainApiUploadHandler.handleRequest(DomainApiUploadHandler.java:66)

              at org.jboss.as.domain.http.server.security.SubjectDoAsHandler$1.run(SubjectDoAsHandler.java:72)

              at org.jboss.as.domain.http.server.security.SubjectDoAsHandler$1.run(SubjectDoAsHandler.java:68)

              at java.security.AccessController.doPrivileged(Native Method)

              at javax.security.auth.Subject.doAs(Subject.java:422)

              at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:92)

              at org.jboss.as.domain.http.server.security.SubjectDoAsHandler.handleRequest(SubjectDoAsHandler.java:68)

              at org.jboss.as.domain.http.server.security.SubjectDoAsHandler.handleRequest(SubjectDoAsHandler.java:63)

              at io.undertow.server.handlers.BlockingHandler.handleRequest(BlockingHandler.java:56)

              at org.jboss.as.domain.http.server.DomainApiCheckHandler.handleRequest(DomainApiCheckHandler.java:84)

              at io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:52)

              at io.undertow.server.Connectors.executeRootHandler(Connectors.java:199)

              at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:774)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

              at java.lang.Thread.run(Thread.java:745)

       

      curl -F "file=test.war" --digest --user user:password http://192.168.198.207:9990/management/add-content

      -> {"outcome" : "success", "result" : { "BYTES_VALUE" : "VzHNr4HvhWOK0BQ4ZScHl0d9gI8=" }}

       

      curl --digest --user user:password http://192.168.198.207:9990/management/add-content -H "Content-Type: application/json" -X POST -d @request.json

      <html><head><title>Error</title></head><body>500 - Internal Server Error</body></html> (and the server site NPE)

       

      the request.json is:

      {

        "content": [{

        "hash": {

        "BYTES_VALUE": "VzHNr4HvhWOK0BQ4ZScHl0d9gI8="

        }

        }],

        "address": [{

        "deployment": "test.war"

        }],

        "operation": "add",

        "enabled": "true"

      }

       

       

      i tried wildfly 9.0.2 and wildfly 8.2 (standalone)

       

      any ideas?