The only reason I can see why you'd get an NPE on that line is if denylistrcd were null. GenericValue won't throw an NPE on a call to getString().
Regards Scott On 29/06/2011, at 12:28 PM, BJ Freeman wrote: > I am calling a new routine from controller.java > So I am not down to the log4 level yet. > > denylist = delegator.findList("VisitFllter", EntityCondition > .makeCondition(exprs, EntityOperator.AND), null, null, > null, Boolean.FALSE); > > while (denylistitr.hasNext()&&status == Boolean.FALSE) { > GenericValue denylistrcd = (GenericValue) denylistitr.next(); > I am getting a > java.lang.NullPointerException on this line > String remoteHoststr =denylistrcd.getString("remoteHost"); > > it works find it the field is not null > > Scott Gray sent the following on 6/28/2011 3:55 PM: >> You'll have to provide more detail about the error, but >> GenericEntity.getXXX(...) doesn't really throw any sort of exceptions. >> >> Regards >> Scott >> >> HotWax Media >> http://www.hotwaxmedia.com >> >> On 29/06/2011, at 10:45 AM, BJ Freeman wrote: >> >>> I know you can, through expressions, setup null_field parms. >>> I have a field as a string and do a GenericValue.getString("fieldname") >>> and it throws a null exception. >>> what I am looking for is to go through I iteration and check if the >>> field is empty(null). >>> >>> is there something I missed? >>
smime.p7s
Description: S/MIME cryptographic signature