You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by ANJANEYA PRASAD NIDUBROLU <an...@gmail.com> on 2017/09/12 04:55:23 UTC
REST API qryexe saying Argument cannot be null: sql.
Hello...
I have created a cache and querying it via REST API with the below
http://xx.xx.xx.xx:PPPP
/ignite?cmd=qryexe&pageSize=10&arg1=%22xyz-1%22qry=serial_number+%3D+%3F
Response is as below
{
"successStatus": 1,
"error": "Ouch! Argument cannot be null: sql",
"sessionToken": null,
"response": null
}
Not sure why this happening. I have tried multiple other options but no
luck.
on visor the below command fine fore
cache -c=<cache_name> -scan
I am using Ignite 2.0.0 version.
For your reference:
REST API version command response:
{
"successStatus": 0,
"error": null,
"sessionToken": null,
"response": "2.0.0"
}
Please help.
Thanks,
Anjaneya.
Re: REST API qryexe saying Argument cannot be null: sql.
Posted by Roman Shtykh <rs...@yahoo.com>.
Hi Anji,
Can you provide more details (what queries are issued, what output is produced, etc.) for your additional questions to be answered?
-- Roman
On Thursday, September 14, 2017, 4:37:08 AM GMT+9, ANJANEYA PRASAD NIDUBROLU <an...@gmail.com> wrote:
Hello Roman,
Thanks...I have tried adding '&' and looks like it will work, currently I am getting exceptions due to class/ type i created.But, one doubt will REST API not accept single argument?
In my earlier example, i tried arg1=xxx&qry=yyyy+%3D+%3F, then it is complaining that parameter '#1' is not set.Again i tried the same by adding another predicate and came with successStatus = 0.
Similarly, how about more than 3 or 4 arguments, will i be able to use arg3, arg4, ....?
Please suggest.
Thanks,Anji.
On Wed, Sep 13, 2017 at 9:44 AM, Roman Shtykh <rs...@yahoo.com> wrote:
Hi Anji,
The error says that you don't provide sql query.You might miss "&" before "qry".
-- Roman
On Wednesday, September 13, 2017, 2:42:12 AM GMT+9, ANJANEYA PRASAD NIDUBROLU <an...@gmail.com> wrote:
Thanks Evgenii...
Actually i have included "Type" and "CacheName" also. But i pasted wrong url by mistakenly. The result is still the same. Here in the query/ REST url nowhere i am using "sql". May be "qry" from the REST url/command will be parsed to "sql". Not sure how and where this parsing is happening and what is wrong with the url I am trying.
Any thoughts please?
Thanks,Anji.
On Tuesday, September 12, 2017, ezhuravlev <e....@gmail.com> wrote:
Hi,
I don't see in your query defined cacheName and type parameters. If cache
name not provided, default cache will be used.
You can find all this information in the documentation:
https://apacheignite.readme.io /docs/rest-api#section-sql-que ry-execute
Also, have you checked logs from Ignite node?
Evgenii
--
Sent from: http://apache-ignite-users.705 18.x6.nabble.com/
Re: REST API qryexe saying Argument cannot be null: sql.
Posted by Roman Shtykh <rs...@yahoo.com>.
Hi Anji,
The error says that you don't provide sql query.You might miss "&" before "qry".
-- Roman
On Wednesday, September 13, 2017, 2:42:12 AM GMT+9, ANJANEYA PRASAD NIDUBROLU <an...@gmail.com> wrote:
Thanks Evgenii...
Actually i have included "Type" and "CacheName" also. But i pasted wrong url by mistakenly. The result is still the same. Here in the query/ REST url nowhere i am using "sql". May be "qry" from the REST url/command will be parsed to "sql". Not sure how and where this parsing is happening and what is wrong with the url I am trying.
Any thoughts please?
Thanks,Anji.
On Tuesday, September 12, 2017, ezhuravlev <e....@gmail.com> wrote:
Hi,
I don't see in your query defined cacheName and type parameters. If cache
name not provided, default cache will be used.
You can find all this information in the documentation:
https://apacheignite.readme.io /docs/rest-api#section-sql-que ry-execute
Also, have you checked logs from Ignite node?
Evgenii
--
Sent from: http://apache-ignite-users.705 18.x6.nabble.com/
Re: REST API qryexe saying Argument cannot be null: sql.
Posted by ANJANEYA PRASAD NIDUBROLU <an...@gmail.com>.
Thanks Evgenii...
Actually i have included "Type" and "CacheName" also. But i pasted wrong
url by mistakenly. The result is still the same. Here in the query/ REST
url nowhere i am using "sql". May be "qry" from the REST url/command will
be parsed to "sql". Not sure how and where this parsing is happening and
what is wrong with the url I am trying.
Any thoughts please?
Thanks,
Anji.
On Tuesday, September 12, 2017, ezhuravlev <e....@gmail.com> wrote:
> Hi,
>
> I don't see in your query defined cacheName and type parameters. If cache
> name not provided, default cache will be used.
>
> You can find all this information in the documentation:
> https://apacheignite.readme.io/docs/rest-api#section-sql-query-execute
>
> Also, have you checked logs from Ignite node?
>
> Evgenii
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>
Re: REST API qryexe saying Argument cannot be null: sql.
Posted by ezhuravlev <e....@gmail.com>.
Hi,
I don't see in your query defined cacheName and type parameters. If cache
name not provided, default cache will be used.
You can find all this information in the documentation:
https://apacheignite.readme.io/docs/rest-api#section-sql-query-execute
Also, have you checked logs from Ignite node?
Evgenii
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/