Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-9191

Navigate Accounts tree does not work

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Release Branch 16.11
    • Fix Version/s: Upcoming Release, 16.11.02
    • Component/s: accounting
    • Labels:
      None
    • Environment:

      windows 10

      Description

      go to
      Accounting --> Global GL Setting --> Navigate Accounts
      when I try to open tree, gave me in URL https://localhost:8443/accounting/control/GlAccountNavigate?glAccountId=100000&trail=null|100000

      and gave me white page !!? it should expand the tree !
      NOTE: OFBiz ver. 16.11.01 and database Oracle 12c

        Activity

        Hide
        jacques.le.roux Jacques Le Roux added a comment -
        Show
        jacques.le.roux Jacques Le Roux added a comment - Thanks Moatasim, There is indeed an issue which can be reproduced on the official demo stable (R16) https://ofbiz-vm2.apache.org:18443/accounting/control/GlAccountNavigate?trail=null |100000 trunk https://ofbiz-vm2.apache.org:8443/accounting/control/GlAccountNavigate?trail=null |100000 But works in old (R13) https://ofbiz-vm2.apache.org:28443/accounting/control/GlAccountNavigate?trail=null%7C100000 Then note that it works also in both stable and trunk when encoding | with %7C1 trunk https://ofbiz-vm2.apache.org:8443/accounting/control/GlAccountNavigate?trail=null%7C100000 stable (R16) https://ofbiz-vm2.apache.org:18443/accounting/control/GlAccountNavigate?trail=null%7C100000 So it's an encoding issue...
        Hide
        moatasim Moatasim Al Masri added a comment -

        thank you Jacques
        could you tell me how can I fix the encoding in my trunk.

        I downloaded latest current truck today from https://ci.apache.org/projects/ofbiz/snapshots/ but still not solved.

        thank you again

        Show
        moatasim Moatasim Al Masri added a comment - thank you Jacques could you tell me how can I fix the encoding in my trunk. I downloaded latest current truck today from https://ci.apache.org/projects/ofbiz/snapshots/ but still not solved. thank you again
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        OK this is the problem:

        2017-01-31 15:30:15,159 |http-nio-8443-exec-3 |ControlServlet                |T| [[[GlAccountNavigate(Domain:https://localhost)] Request Done- total:0.715,since last([GlAccountNavigat...):0.715]]
        Jan 31, 2017 3:30:18 PM org.apache.coyote.http11.AbstractHttp11Processor process
        INFO: Error parsing HTTP request header
         Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
        java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
                at org.apache.coyote.http11.AbstractNioInputBuffer.parseRequestLine(AbstractNioInputBuffer.java:283)
                at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1017)
                at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
                at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
                at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
                at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
                at java.lang.Thread.run(Thread.java:745)
        

        So it seems Tomcat is no longer accepting the | char because
        https://ofbiz-vm2.apache.org:28443/accounting/control/GlAccountNavigate?trail=null|100000
        works (| not encoded)

        Show
        jacques.le.roux Jacques Le Roux added a comment - OK this is the problem: 2017-01-31 15:30:15,159 |http-nio-8443-exec-3 |ControlServlet |T| [[[GlAccountNavigate(Domain:https: //localhost)] Request Done- total:0.715,since last([GlAccountNavigat...):0.715]] Jan 31, 2017 3:30:18 PM org.apache.coyote.http11.AbstractHttp11Processor process INFO: Error parsing HTTP request header Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level. java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986 at org.apache.coyote.http11.AbstractNioInputBuffer.parseRequestLine(AbstractNioInputBuffer.java:283) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1017) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang. Thread .run( Thread .java:745) So it seems Tomcat is no longer accepting the | char because https://ofbiz-vm2.apache.org:28443/accounting/control/GlAccountNavigate?trail=null |100000 works (| not encoded)
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Thanks Moatasim Al Masri for report,

        Fixed in
        trunk r1781125
        R16.11 r1781126

        This is due to a change in (at least) Tomcat 8.0.39
        https://stackoverflow.com/questions/41053653/tomcat-8-is-not-able-to-handle-get-request-with-in-query-parameters
        http://tomcat.10.x6.nabble.com/Tomcat-8-0-39-and-tomcat-8-5-8-fails-handling-requsest-td5057320.html

        I tried other ways but none worked and I prefer to keep this simple.

        • Using an encoder at this stage (just before calling the macro) is not an option. Or maybe by using the encoder on the linkurl variable alone. But then linkurl must be transformed in a String and back to a StringBuilder or more refactoring is needed. It does not worth it IMO.
        • Also using encode="true" for links in AccountingTrees.xml does not work.
        Show
        jacques.le.roux Jacques Le Roux added a comment - Thanks Moatasim Al Masri for report, Fixed in trunk r1781125 R16.11 r1781126 This is due to a change in (at least) Tomcat 8.0.39 https://stackoverflow.com/questions/41053653/tomcat-8-is-not-able-to-handle-get-request-with-in-query-parameters http://tomcat.10.x6.nabble.com/Tomcat-8-0-39-and-tomcat-8-5-8-fails-handling-requsest-td5057320.html I tried other ways but none worked and I prefer to keep this simple. Using an encoder at this stage (just before calling the macro) is not an option. Or maybe by using the encoder on the linkurl variable alone. But then linkurl must be transformed in a String and back to a StringBuilder or more refactoring is needed. It does not worth it IMO. Also using encode="true" for links in AccountingTrees.xml does not work.
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Actually using encode="true" for links in AccountingTrees.xml should work. We could create a JIra for that, but I fear that by encoding the whole URI it would be less legible, KISS way... Still it's bad to have an encoding option which does not work :/

        Show
        jacques.le.roux Jacques Le Roux added a comment - Actually using encode="true" for links in AccountingTrees.xml should work. We could create a JIra for that, but I fear that by encoding the whole URI it would be less legible, KISS way... Still it's bad to have an encoding option which does not work :/
        Hide
        moatasim Moatasim Al Masri added a comment -

        thank you

        Show
        moatasim Moatasim Al Masri added a comment - thank you
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        BTW I created OFBIZ-9202 "Encoding links for nodes in trees does not work"

        Show
        jacques.le.roux Jacques Le Roux added a comment - BTW I created OFBIZ-9202 "Encoding links for nodes in trees does not work"
        Hide
        moatasim Moatasim Al Masri added a comment -

        I downloaded the current trunk from https://ci.apache.org/projects/ofbiz/snapshots/
        and it is worked fine

        Show
        moatasim Moatasim Al Masri added a comment - I downloaded the current trunk from https://ci.apache.org/projects/ofbiz/snapshots/ and it is worked fine
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Yes, it's fixed at r1781125, but we should be able to encode links in nodes trees. In this case I preferred to keep things simple, so OFBIZ-9202 more to remember for a perfect future

        Show
        jacques.le.roux Jacques Le Roux added a comment - Yes, it's fixed at r1781125, but we should be able to encode links in nodes trees. In this case I preferred to keep things simple, so OFBIZ-9202 more to remember for a perfect future

          People

          • Assignee:
            jacques.le.roux Jacques Le Roux
            Reporter:
            moatasim Moatasim Al Masri
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development