Intermittent Grails Exception: MissingMethodException -


we have issue on our production system , of our test systems. have intermittent grails exception occurs in view.

no signature of method: static org.apache.commons.lang.stringutils.isnotblank() applicable argument types: (null) values: [null] possible solutions: isnotblank(java.lang.string), isblank(java.lang.string)

the error seems suggest grails can't seem figure out should use stringutils.isnotblank(string) should used when null passed it.

we noticed that:

  • on production, issue appeared , took more 12 hours before seemed magically disappear. search of logs seems suggest no reboot took place.
  • a developer saw no issue on test system in morning. after few hours, able reproduce it. resolve, rebooted tomcat.

i'm not sure grails version or how check it. if comment below on how find that, i'd happy edit question grails version.

  • what causes , there way can reliably reproduce it?
  • is there reliable way work around it?

i can reproduce in console running:

org.apache.commons.lang.stringutils.isnotblank((object)null) => error 

passing null allows compiler coerce null string:

org.apache.commons.lang.stringutils.isnotblank(null) => false 

it's possible whatever passing in strictly typed other string null. groovy compiler pretty smart of coercing types, have seen blow on easy cases. true if using @compilestatic and/or using native java objects.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -