• Post Reply Bookmark Topic Watch Topic
  • New Topic

java.lang.illegalargumentException: node to traverse cannot be null!:

 
chandrap prakash
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using hibernate and i have written hql query , but while executing this i am geeting "java.lang.illegalargumentException: node to traverse cannot be null!:".

Due to this my functionality is failing.the hql query which i have written is:


String query="from Active_Provider where provider_first_name like ISNULL("+fnCriteria+") and"
+"provider_last_name like ISNULL("+lnCriteria+") and npi like ISNULL("+npiCriteria+") and "
+" provider_LicenseNumberStateCode like ISNULL("+ps+") and provider_Business_Address_PostalCode like ISNULL("+zip+")";

and through hibernate template i am executing this query as:

List<Active_Provider> ap= getHibernateTemplate().find(query);

the parameter which i am passing in ISNULL function is as this string "lnCriteria=ln+"%".

Please look into this,what is wrong in the syntax of this query .In DB i am using SQLServer.

Thanks in advance

Chandra Prakash


 
Reehan Lalkhanwar
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see the query executing with a like and ISNULL together.
What is your requirement to use these two options together?
Also you can try executing the query directly on the DB to check if it works.
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!