java.io.IOException: Invalid URI character encoding

Java.net JIRA | Cheng Fang | 6 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    3.1 build dated 11/10/2010 setting ejb-container monitoring level to HIGH, deploy and run an app that calls some ejb methods like EJBObject.isIdentical, EJBObject.remove. When getting the monitoring stats of some ejb methods, it failed: [#|2010-11-10T16:28:54.240-0500|WARNING|glassfish3.1|com.sun.grizzly.config.GrizzlyServiceListener|_ThreadID=17;_ThreadName=Thread-1;|Internal Server error: /monitoring/domain/server/applications/stateless_migration_twothree_annotated/stateless_migration_twothree_annotated_ejb.jar/TwoTestBean/bean-methods/isIdentical-javax\.ejb\.EJBObject java.io.IOException: Invalid URI character encoding at com.sun.grizzly.util.http.HttpRequestURIDecoder.decode(HttpRequestURIDecoder.java:101) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:185) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:817) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:718) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1007) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:680) |#]

    Java.net JIRA | 6 years ago | Cheng Fang
    java.io.IOException: Invalid URI character encoding
  2. 0

    Anyone experience PCI Compliance scan create errors in application server?

    Stack Overflow | 2 years ago | user46688
    java.io.CharConversionException: EOF at com.sun.grizzly.util.buf.UDecoder.convert(UDecoder.java:140) at com.sun.grizzly.util.buf.UDecoder.convert(UDecoder.java:257) at com.sun.grizzly.util.buf.UDecoder.convert(UDecoder.java:235) at com.sun.grizzly.util.http.HttpRequestURIDecoder.decode(HttpRequestURIDecoder.java:98) at com.sun.enterprise.v3.services.impl.ContainerMapper.lookupHandler(ContainerMapper.java:243) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:194) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
  3. 0

    Glassfish V3 - How do you debug SnifferAdapter errors ?

    Oracle Community | 7 years ago | htsguru
    java.lang.RuntimeException: SnifferAdapter cannot map themself.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Oracle GlassFish 3.1

    Oracle Community | 6 years ago | seagate-746906
    java.lang.ClassCastException: com.sun.grizzly.config.ContextRootInfo > cannot > be cast to org.apache.catalina.Context > at > org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:529) > > at > org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:271) > > at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231) > > at > com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:172) > > at > com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822) > at > com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719) > at > com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013) > at > com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225) > > at > com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) > > at > com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) > > at > com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) > > at > com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) > at > com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) > > at > com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) > >
  6. 0

    Running a standalone instance of grizzly, It's possible to spot this exception by sending a malformed http post request using telnet: mag 29, 2013 11:31:53 AM com.sun.grizzly.http.ProcessorTask parseRequest SEVERE: GRIZZLY0042: Error creating internal request. java.lang.IllegalArgumentException at com.sun.grizzly.util.http.MimeHeaders.getUniqueValue(MimeHeaders.java:365) at com.sun.grizzly.tcp.Request.getContentLengthLong(Request.java:377) at com.sun.grizzly.http.ProcessorTask.prepareRequest(ProcessorTask.java:1477) at com.sun.grizzly.http.ProcessorTask.parseRequest(ProcessorTask.java:948) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:707) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1036) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:231) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:722) Here is the malformed post request: -------------------[snippet]-----------[snippet]-----------[snippet]----------------- POST /gs HTTP/1.1 Host: localhost:5002 Content-Type: text/plain Content-Length: 40 aaaaabbbbbaaaaabbbbbaaaaabbbbbaaaaabbbbb POST /gs HTTP/1.1 Host: localhost:5002 Content-Type: text/plain Content-Length: 40 aaaaabbbbbaaaaabbbbbaaaaabbbbbaaaaabbbbb POST /gs HTTP/1.1 Host: localhost:5002 Content-Type: text/plain Content-Length: 40 aaaaabbbbbaaaaabbbbbaaaaabbbbbaaaaabbbbb POST /gs HTTP/1.1 Host: localhost:5002 Content-Type: text/plain Content-Length: 40 aaaaabbbbbaaaaabbbbbaaaaabbbbbaaaaabbbbb POST /gs HTTP/1.1 Host: localhost:5002 Content-Type: text/plain Content-Length: 40 -------------------[snippet]-----------[snippet]-----------[snippet]----------------- GrizzlyTestError.java -------------------[snippet]-----------[snippet]-----------[snippet]----------------- package test; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.sun.grizzly.http.embed.GrizzlyWebServer; import com.sun.grizzly.http.servlet.ServletAdapter; public class GrizzlyTestError { /** * @author Daniele Spagnulo * @param args * @throws IOException */ public static void main(String[] args) throws IOException { GrizzlyWebServer server = new GrizzlyWebServer(5002); server.setCoreThreads(25); server.setMaxThreads(100); ServletAdapter adapter = new ServletAdapter( new HttpServlet() { private static final long serialVersionUID = 6610532824368397176L; @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException,IOException { System.out.println("Request from: "+req.getRemoteAddr()); } }); server.addGrizzlyAdapter(adapter, new String[]{"/"}); server.start(); } } -------------------[snippet]-----------[snippet]-----------[snippet]-----------------

    Java.net JIRA | 4 years ago | xar
    java.lang.IllegalArgumentException

    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.io.IOException

      Invalid URI character encoding

      at com.sun.grizzly.util.http.HttpRequestURIDecoder.decode()
    2. Grizzly WS
      HttpRequestURIDecoder.decode
      1. com.sun.grizzly.util.http.HttpRequestURIDecoder.decode(HttpRequestURIDecoder.java:101)
      1 frame
    3. Kernel Classes
      ContainerMapper.service
      1. com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:185)
      1 frame
    4. Grizzly WS
      AbstractThreadPool$Worker.run
      1. com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:817)
      2. com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:718)
      3. com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1007)
      4. com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
      5. com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
      6. com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
      7. com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
      8. com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
      9. com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
      10. com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
      11. com.sun.grizzly.ContextTask.run(ContextTask.java:71)
      12. com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
      13. com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
      13 frames
    5. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:680)
      1 frame