java - Liferay Service Builder Not recognized function -
i added new method on service builder:
public irrule rulecreation() throws systemexception, portalexception { irrule rule = new irruleimpl(); return rule; }
the method recognised portlet class (no errors presented):
public class ruleportlet extends mvcportlet{ public void addrule(actionrequest request, actionresponse response) throws exception { themedisplay themedisplay = (themedisplay)request.getattribute(webkeys.theme_display); irrule rule = irrulelocalserviceutil.rulecreation(); // method!!!! rule.setcompanyid(themedisplay.getcompanyid()); rule.setgroupid(themedisplay.getscopegroupid()); rule.setrulename(paramutil.getstring(request, "rulename")); rule.setruledescription(paramutil.getstring(request, "ruledescription")); rule.setrulefile(paramutil.getstring(request, "rulefile")); arraylist<string> errors = new arraylist<string>(); if (rulevalidator.validaterule(rule, errors)) { irrulelocalserviceutil.addrule(rule, themedisplay.getuserid()); sessionmessages.add(request, "product-saved-successfully"); } else { sessionerrors.add(request, "fields-required"); } } ...
but @ time of testing function i'm having error throw console...
java.lang.nosuchmethoderror: com.ent.oriol.inputrules.service.irrulelocalserviceutil.rulecreation()lcom/ent/oriol/inputrules/model/irrule;
how possible? should solve problem?? in past added other functions service builder (localserviceimpl class) without troubles!
thank help, oriol
as commented restart helped, issue old code got cached somehow, maybe in running debugger process did not pick class changes caused servicebuilder when services rebuilt.
it's hard tell after fact - if can reproduce this, interesting know circumstances, e.g. ide, test setup etc. otherwise, i'm afraid, you'll have see glitch in matrix.