REST Query does not work properly I think

I have now tried to execute JSON requests from PostMan multible times with the same result?
What is wrong?

Here is the queries i have created:


<queries xmlns="http://schemas.haulmont.com/cuba/rest-queries.xsd">
    <query entity="business$BusinessUser"
           name="businessUser-query"
           view="business-user-browse">
        <jpql>
            <![CDATA[select u from business$BusinessUser u where u.login = :login]]>
        </jpql>
        <params>
            <param name="login"
                   type="java.lang.String"/>
        </params>
    </query>
    <query entity="business$DriverLog"
           name="driverLog-query"
           view="driverLog-browse">
        <jpql>
            <![CDATA[select e from business$DriverLog e where e.employee.login :login]]>
        </jpql>
        <params>
            <param name="login"
                   type="java.lang.String"/>
        </params>
    </query>
    <query entity="business$DrivingLicense"
           name="drivingLicense-query"
           view="drivingLicense-browse">
        <jpql>
            <![CDATA[select e from business$DriverLog e where e.employee.login :login]]>
        </jpql>
        <params>
            <param name="login"
                   type="java.lang.String"/>
        </params>
    </query>
</queries>

When I run the first query:

http://localhost:8080/bus/rest/v2/queries/business$BusinessUser/businessUser-query?login=admin

The result is as expected:


[
    {
        "_entityName": "business$BusinessUser",
        "_instanceName": "Administrator",
        "id": "60885987-1b61-4247-94c7-dff348347f93",
        "loginLowerCase": "admin",
        "login": "admin",
        "password": "**********************************************",
        "createTs": "2017-08-06 22:43:32.351",
        "group": {
            "_entityName": "sec$Group",
            "_instanceName": "Company",
            "id": "0fa2b1a5-1d68-4d69-9fbd-dff348347f93",
            "name": "Company"
        },
        "active": true,
        "name": "Administrator"
    }
]

But when I try to run the second query:


http://localhost:8080/bus/rest/v2/queries/business$DriverLog/driverLog-query?login=admin

The result is


{
    "error": "Query not found",
    "details": "Query with name driverLog-query for entity business$DriverLog not found"
}

And when I removes all the querys and restart the server the querys is still on the server

Any Ideas?

Hi,
The “Query not found” error occurs when requested entity, query and parameter could not be found in the rest-queries.xml
I have tried to reproduce the problem but in my test-project, everything works well even when several queries have a parameter with the same name.
One of the possible reason is that the query config was not deployed at the moment the request was sent. Try to redeploy the application and ensure the correct rest-queries.xml is put to Tomcat.