Hi All,
I am having issue with calling java event. I get following error: ----------------------------------------------------------------------- The Following Errors Occurred: Error calling event: org.ofbiz.webapp.event.EventHandlerException: Problems processing event: java.lang.NoSuchMethodException: org.ofbiz.learning.learning.LearningEvents.receiveParams(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) (org.ofbiz.learning.learning.LearningEvents.receiveParams(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)) ----------------------------------------------------------------------- If I remove java event call from request-map it renders the screen (of course without processing anything since its not processing java event/method). And with the <event> tag in request-map I get blank screen. I have stopped and re-compiled component without any error. I really appreciate the help. Thanks in advance. |
Hi su2,
What calling method or request-map uri ? Are you sure that your path on the event is good ? Are you sure that your class build is in the CLASS_PATH ? Nicolas su2 a écrit : > Hi All, > > I am having issue with calling java event. > > If I remove java event call from request-map it renders the screen (of > course without processing anything since its not processing java > event/method). And with the <event> tag in request-map I get blank screen. > > I have stopped and re-compiled component without any error. > > I really appreciate the help. > > Thanks in advance. > > -- Nicolas MALIN Consultant Tél : 06.17.66.40.06 Site projet : http://www.neogia.org/ ------- Société LibrenBerry Tél : 02.48.02.56.12 Site : http://www.librenberry.net/ |
Hi Nicolas,
Following is my request-map -------------------------------------------------------------------- <request-map uri="ReceiveParams"> <event type="java" path="org.ofbiz.learning.learning.LearningEvents" invoke="receiveParams"/> <response name="success" type="view" value="WelcomeVisitor"/> </request-map> -------------------------------------------------------------------- Yeah, I think the path on the event is correct. I was little confuse on your last question regarding CLASS_PATH. I do have <classpath type="jar" location="build/lib/*"/> in ofbiz-component.xml. Thanks.
|
In reply to this post by su2
As it renders the screen, when you remove the java event, bcoz ofbiz by
default takes response as "success", maybe then your "receiveParams" method must be returning some other response instead of "success" On Fri, Sep 4, 2009 at 1:00 AM, su2 <[hidden email]> wrote: > > Hi All, > > I am having issue with calling java event. > > If I remove java event call from request-map it renders the screen (of > course without processing anything since its not processing java > event/method). And with the <event> tag in request-map I get blank screen. > > I have stopped and re-compiled component without any error. > > I really appreciate the help. > > Thanks in advance. > > -- > View this message in context: > http://www.nabble.com/Problems-processing-event%3A-java.lang.NoSuchMethodException-tp25282598p25282598.html > Sent from the OFBiz - User mailing list archive at Nabble.com. > > |
In reply to this post by Malin Nicolas
add a response error that goes to an error.jsp
as do you have a view defined as WelcomeVisitor su2 sent the following on 9/3/2009 12:58 PM: > Hi Nicolas, > > Following is my request-map > -------------------------------------------------------------------- > <request-map uri="ReceiveParams"> > <event type="java" path="org.ofbiz.learning.learning.LearningEvents" > invoke="receiveParams"/> > <response name="success" type="view" value="WelcomeVisitor"/> > </request-map> > -------------------------------------------------------------------- > > Yeah, I think the path on the event is correct. > > I was little confuse on your last question regarding CLASS_PATH. > > I do have <classpath type="jar" location="build/lib/*"/> in > ofbiz-component.xml. > > Thanks. > > Malin Nicolas wrote: >> Hi su2, >> >> What calling method or request-map uri ? >> >> Are you sure that your path on the event is good ? >> Are you sure that your class build is in the CLASS_PATH ? >> >> Nicolas >> >> su2 a écrit : >>> Hi All, >>> >>> I am having issue with calling java event. >>> >>> If I remove java event call from request-map it renders the screen (of >>> course without processing anything since its not processing java >>> event/method). And with the <event> tag in request-map I get blank >>> screen. >>> >>> I have stopped and re-compiled component without any error. >>> >>> I really appreciate the help. >>> >>> Thanks in advance. >>> >>> >> >> -- >> Nicolas MALIN >> Consultant >> Tél : 06.17.66.40.06 >> Site projet : http://www.neogia.org/ >> ------- >> Société LibrenBerry >> Tél : 02.48.02.56.12 >> Site : http://www.librenberry.net/ >> >> >> > -- BJ Freeman http://www.businessesnetwork.com/automation http://bjfreeman.elance.com http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro Systems Integrator. |
In reply to this post by Abdullah Shaikh
Hi abdullah80,
I am not sure, How would I check what my method is returning. And this happens to all my new as well as previously working methods. Thanks for your help.
|
You need to check the return statements of "receiveParams" method, and as
you say that its happening to all your methods, then I don't know if this is the issue, but mostly likely it should be the response returned. Check all you return statements. On Fri, Sep 4, 2009 at 7:38 PM, su2 <[hidden email]> wrote: > > Hi abdullah80, > > I am not sure, How would I check what my method is returning. And this > happens to all my new as well as previously working methods. > > Thanks for your help. > > > > > abdullah80 wrote: > > > > As it renders the screen, when you remove the java event, bcoz ofbiz by > > default takes response as "success", maybe then your "receiveParams" > > method > > must be returning some other response instead of "success" > > > > On Fri, Sep 4, 2009 at 1:00 AM, su2 <[hidden email]> wrote: > > > >> > >> Hi All, > >> > >> I am having issue with calling java event. > >> > >> If I remove java event call from request-map it renders the screen (of > >> course without processing anything since its not processing java > >> event/method). And with the <event> tag in request-map I get blank > >> screen. > >> > >> I have stopped and re-compiled component without any error. > >> > >> I really appreciate the help. > >> > >> Thanks in advance. > >> > >> -- > >> View this message in context: > >> > http://www.nabble.com/Problems-processing-event%3A-java.lang.NoSuchMethodException-tp25282598p25282598.html > >> Sent from the OFBiz - User mailing list archive at Nabble.com. > >> > >> > > > > > > -- > View this message in context: > http://www.nabble.com/Problems-processing-event%3A-java.lang.NoSuchMethodException-tp25282598p25295009.html > Sent from the OFBiz - User mailing list archive at Nabble.com. > > |
Hi Abdullah,
Thanks for your response. I tried making a new .java class in src file and moving all my method there and it worked! I am not sure what might be the reason though its the same exact file but a fresh copy. Thanks for your help.
|
Free forum by Nabble | Edit this page |