System.out.println("The size of domList is"+domList.size());
James Sabre wrote:It's not obvious to me why you need the method setDomList() since you always create a new list in the getDomList(). Also, why does domList need to be an instance variable?
amit punekar wrote:Yeah.
You debug that thing and you should be fine after fix.
Mike Zal wrote:
It seemed weird that you were trying to set the domainType of a variable that is not show where it is declared or what it does. It is also strange that you change its value after you send the request dispatch forward.
amit punekar wrote:Hi,
All Mike is trying to point out possible error in the way you are calling the function setXXX() and not syntactically.
You seems to be using "domainType_Oid" as part of string concatenation in your SQL. If this is true then shouldn't you be setting this value before you invoke "getDomList()" which uses this value as mentioned above.
Mike Zal wrote:Have you verified any of the following:
domainType_Oid is not equals to 0 or negative one
Are you successfully connecting to the database
Did the query return any value?
I think your problem is that you are not setting the domainType_Oid variable (it explains why you are receiving a NullPointerException). Can you add some debug to print the value of domainType_Oid to the system log before the first if statement?
Mike Zal wrote:Not really since none of the debug you printed seems to match what is inside the getDomList() method. Either your System.out.print statements are printing somewhere else or the code is never being executed. Can you try making a small change to your code and see if you see any of the new debug.