java.lang.IllegalArgumentException: todo

MuleSoft JIRA | Ben Mathews | 5 years ago
  1. 0

    A jersey endpoint that posts a multipart/form-data message w/o a parameter named payload throws IllegalArgumentException. It seems to me that this exception if branch should just be removed. I don't know why it is there to start with though. {code:title=HttpMuleMessageFactory} protected Object extractPayloadFromHttpRequest(HttpRequest httpRequest) throws IOException { Object body = null; if (httpRequest.getContentType().contains("multipart/form-data")) { MultiPartInputStream in = new MultiPartInputStream(httpRequest.getBody(), httpRequest.getContentType(), null); //We need to store this so that the headers for the part can be read parts = in.getParts(); for (Part part : parts) { if (part.getName().equals("payload")) { body = part.getInputStream(); break; } } if (body == null) { throw new IllegalArgumentException("todo"); } } {code} {panel:title=stack trace} Root Exception stack trace: java.lang.IllegalArgumentException: todo at org.mule.transport.http.HttpMuleMessageFactory.extractPayloadFromHttpRequest(HttpMuleMessageFactory.java:105) at org.mule.transport.http.HttpMuleMessageFactory.extractPayload(HttpMuleMessageFactory.java:72) at org.mule.transport.AbstractMuleMessageFactory.create(AbstractMuleMessageFactory.java:47) at org.mule.transport.AbstractMuleMessageFactory.create(AbstractMuleMessageFactory.java:31) at org.mule.transport.AbstractTransportMessageHandler.createMuleMessage(AbstractTransportMessageHandler.java:446) at org.mule.transport.AbstractTransportMessageHandler.createMuleMessage(AbstractTransportMessageHandler.java:463) at org.mule.transport.http.HttpMessageReceiver$HttpWorker.doRequest(HttpMessageReceiver.java:241) at org.mule.transport.http.HttpMessageReceiver$HttpWorker.processRequest(HttpMessageReceiver.java:229) at org.mule.transport.http.HttpMessageReceiver$HttpWorker.run(HttpMessageReceiver.java:161) at org.mule.work.WorkerContext.run(WorkerContext.java:310) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) {panel} {code:title=Jersey method} @POST @Consumes(MediaType.MULTIPART_FORM_DATA) public final Response postFile( @FormDataParam("file") final InputStream x12file) {} {code} {code:xml title=configuration} <flow name="X12Files"> <inbound-endpoint address="http://localhost:8080/unionstation" /> <jersey:resources> <component class="com.company.rest.X12FilesResource" /> </jersey:resources> </flow> {code}

    MuleSoft JIRA | 5 years ago | Ben Mathews
    java.lang.IllegalArgumentException: todo
  2. 0

    A jersey endpoint that posts a multipart/form-data message w/o a parameter named payload throws IllegalArgumentException. It seems to me that this exception if branch should just be removed. I don't know why it is there to start with though. {code:title=HttpMuleMessageFactory} protected Object extractPayloadFromHttpRequest(HttpRequest httpRequest) throws IOException { Object body = null; if (httpRequest.getContentType().contains("multipart/form-data")) { MultiPartInputStream in = new MultiPartInputStream(httpRequest.getBody(), httpRequest.getContentType(), null); //We need to store this so that the headers for the part can be read parts = in.getParts(); for (Part part : parts) { if (part.getName().equals("payload")) { body = part.getInputStream(); break; } } if (body == null) { throw new IllegalArgumentException("todo"); } } {code} {panel:title=stack trace} Root Exception stack trace: java.lang.IllegalArgumentException: todo at org.mule.transport.http.HttpMuleMessageFactory.extractPayloadFromHttpRequest(HttpMuleMessageFactory.java:105) at org.mule.transport.http.HttpMuleMessageFactory.extractPayload(HttpMuleMessageFactory.java:72) at org.mule.transport.AbstractMuleMessageFactory.create(AbstractMuleMessageFactory.java:47) at org.mule.transport.AbstractMuleMessageFactory.create(AbstractMuleMessageFactory.java:31) at org.mule.transport.AbstractTransportMessageHandler.createMuleMessage(AbstractTransportMessageHandler.java:446) at org.mule.transport.AbstractTransportMessageHandler.createMuleMessage(AbstractTransportMessageHandler.java:463) at org.mule.transport.http.HttpMessageReceiver$HttpWorker.doRequest(HttpMessageReceiver.java:241) at org.mule.transport.http.HttpMessageReceiver$HttpWorker.processRequest(HttpMessageReceiver.java:229) at org.mule.transport.http.HttpMessageReceiver$HttpWorker.run(HttpMessageReceiver.java:161) at org.mule.work.WorkerContext.run(WorkerContext.java:310) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) {panel} {code:title=Jersey method} @POST @Consumes(MediaType.MULTIPART_FORM_DATA) public final Response postFile( @FormDataParam("file") final InputStream x12file) {} {code} {code:xml title=configuration} <flow name="X12Files"> <inbound-endpoint address="http://localhost:8080/unionstation" /> <jersey:resources> <component class="com.company.rest.X12FilesResource" /> </jersey:resources> </flow> {code}

    MuleSoft JIRA | 5 years ago | Ben Mathews
    java.lang.IllegalArgumentException: todo
  3. 0

    RE: Working on a branch with latest datanucleus

    isis-users | 2 years ago | Branham, Jeremy [HR]
    java.lang.IllegalArgumentException: mismatch in OidAdapter map: adapter's Oid: TODO:1^1:tester:, provided adapter's OID: TODO:1^1:tester:; map's adapter's Oid: TODO:1^1:tester:
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Bug 471109 – Cannot deploy resource-only .war in tomcat

    eclipse.org | 7 months ago
    org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/api-explorer]]
  6. 0

    ERROR MAKE ROCKET

    GitHub | 3 months ago | harriss95
    java.lang.reflect.InvocationTargetException

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      todo

      at org.mule.transport.http.HttpMuleMessageFactory.extractPayloadFromHttpRequest()
    2. HTTP Transport
      HttpMuleMessageFactory.extractPayload
      1. org.mule.transport.http.HttpMuleMessageFactory.extractPayloadFromHttpRequest(HttpMuleMessageFactory.java:105)
      2. org.mule.transport.http.HttpMuleMessageFactory.extractPayload(HttpMuleMessageFactory.java:72)
      2 frames
    3. Mule Core
      AbstractTransportMessageHandler.createMuleMessage
      1. org.mule.transport.AbstractMuleMessageFactory.create(AbstractMuleMessageFactory.java:47)
      2. org.mule.transport.AbstractMuleMessageFactory.create(AbstractMuleMessageFactory.java:31)
      3. org.mule.transport.AbstractTransportMessageHandler.createMuleMessage(AbstractTransportMessageHandler.java:446)
      4. org.mule.transport.AbstractTransportMessageHandler.createMuleMessage(AbstractTransportMessageHandler.java:463)
      4 frames
    4. HTTP Transport
      HttpMessageReceiver$HttpWorker.run
      1. org.mule.transport.http.HttpMessageReceiver$HttpWorker.doRequest(HttpMessageReceiver.java:241)
      2. org.mule.transport.http.HttpMessageReceiver$HttpWorker.processRequest(HttpMessageReceiver.java:229)
      3. org.mule.transport.http.HttpMessageReceiver$HttpWorker.run(HttpMessageReceiver.java:161)
      3 frames
    5. Mule Core
      WorkerContext.run
      1. org.mule.work.WorkerContext.run(WorkerContext.java:310)
      1 frame
    6. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      3. java.lang.Thread.run(Thread.java:636)
      3 frames