java.lang.IllegalArgumentException: can't parse argument number FOO.ping(?

Apache's JIRA Issue Tracker | aaron pieper | 9 years ago
  1. 0

    One of my interceptors threw an exception which included a question mark in the message, something like "Uncategorized SQLException for SQL [{call FOO.ping(?, ?)}]". CXF trapped this error and tried to log it with LogUtils. However, I guess LogUtils interprets the question marks in some special way, so instead of logging the exception properly, it fails with a different error. java.lang.IllegalArgumentException: can't parse argument number FOO.ping(? at java.text.MessageFormat.makeFormat(MessageFormat.java:1330) at java.text.MessageFormat.applyPattern(MessageFormat.java:450) at java.text.MessageFormat.<init>(MessageFormat.java:350) at java.text.MessageFormat.format(MessageFormat.java:803) at org.apache.cxf.common.logging.LogUtils.log(LogUtils.java:256) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:77) at org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDestination.java:79) at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:264) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:170) at org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXFServlet.java:148) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093) at foo.impl.Myilter.doFilter(MyFilter.java:125) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

    Apache's JIRA Issue Tracker | 9 years ago | aaron pieper
    java.lang.IllegalArgumentException: can't parse argument number FOO.ping(?
  2. 0

    One of my interceptors threw an exception which included a question mark in the message, something like "Uncategorized SQLException for SQL [{call FOO.ping(?, ?)}]". CXF trapped this error and tried to log it with LogUtils. However, I guess LogUtils interprets the question marks in some special way, so instead of logging the exception properly, it fails with a different error. java.lang.IllegalArgumentException: can't parse argument number FOO.ping(? at java.text.MessageFormat.makeFormat(MessageFormat.java:1330) at java.text.MessageFormat.applyPattern(MessageFormat.java:450) at java.text.MessageFormat.<init>(MessageFormat.java:350) at java.text.MessageFormat.format(MessageFormat.java:803) at org.apache.cxf.common.logging.LogUtils.log(LogUtils.java:256) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:77) at org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDestination.java:79) at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:264) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:170) at org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXFServlet.java:148) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093) at foo.impl.Myilter.doFilter(MyFilter.java:125) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

    Apache's JIRA Issue Tracker | 9 years ago | aaron pieper
    java.lang.IllegalArgumentException: can't parse argument number FOO.ping(?
  3. 0

    Cxf reuse already generated jaxb classes

    Stack Overflow | 3 years ago
    java.lang.IllegalArgumentException: can't parse argument number ''{0}''
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Exception while logging warning in AbstractJavadocCheck

    GitHub | 2 years ago | baratali
    java.lang.IllegalArgumentException: can't parse argument number: @link EntityEntry
  6. 0

    Exceptions from MessageFormat aren't caught

    GitHub | 2 years ago | unok-kun
    java.lang.IllegalArgumentException: can't parse argument number:

    7 unregistered visitors
    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

      can't parse argument number FOO.ping(?

      at java.text.MessageFormat.makeFormat()
    2. Java RT
      MessageFormat.format
      1. java.text.MessageFormat.makeFormat(MessageFormat.java:1330)
      2. java.text.MessageFormat.applyPattern(MessageFormat.java:450)
      3. java.text.MessageFormat.<init>(MessageFormat.java:350)
      4. java.text.MessageFormat.format(MessageFormat.java:803)
      4 frames
    3. Apache CXF Core
      ChainInitiationObserver.onMessage
      1. org.apache.cxf.common.logging.LogUtils.log(LogUtils.java:256)
      2. org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
      3. org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:77)
      3 frames
    4. Apache CXF Runtime HTTP Transport
      AbstractCXFServlet.doPost
      1. org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDestination.java:79)
      2. org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:264)
      3. org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)
      4. org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:170)
      5. org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXFServlet.java:148)
      5 frames
    5. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      2 frames
    6. Jetty Server
      ServletHandler$CachedChain.doFilter
      1. org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
      2. org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
      2 frames
    7. foo.impl
      Myilter.doFilter
      1. foo.impl.Myilter.doFilter(MyFilter.java:125)
      1 frame
    8. Jetty Server
      ServletHandler$CachedChain.doFilter
      1. org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
      1 frame