nvmurali
Apr 4th, 2007, 06:58 AM
So, with the help of this link:
http://bram.jteam.nl/index.php/2007/01/31/spring-dwr-ajax-made-easy/
I kind of got DWR list page to show up. However, anytime I try to execute any of the functions shown on the page, it throws an error.
This is what I first put in
<bean id="myManager" class="llr.service.impl.MyManagerImpl">
<dwr:remote javascript="MyAjaxManagerService">
<dwr:include method="loadById"/>
<dwr:include method="loadByUserId"/>
</dwr:remote>
<property name="myDao" ref="myDao"/>
</bean>
[code]
The logs show
[code]
007-04-04 01:32:53,437 WARN [org.directwebremoting.impl.DefaultRemoter] - Method execution failed:
java.lang.IllegalArgumentException: object is not an instance of declaring class
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.directwebremoting.impl.ExecuteAjaxFilter.doFil ter(ExecuteAjaxFilter.java:34)
I looked a little further and found a <dwr:configuration> tag which I thought would be the correct way to do it.
So, here's what I have now
<bean id="myManager" class="com.service.impl.MyManagerImpl">
<dwr:remote javascript="MyAjaxManagerService">
<dwr:include method="loadById"/>
<dwr:include method="loadByUserId"/>
</dwr:remote>
<property name="myDao" ref="myDao"/>
</bean>
<dwr:configuration>
<dwr:create type="new"
class="com.service.impl.MyManagerImpl""
javascript="MyAjaxService"/>
<dwr:convert type="bean" class="com.model.TestObject" />
</dwr:configuration>
This now gives me Null Pointer exceptions on Loading (in the tomcat logs)
http://getahead.org/blog/joe/2006/06/14/spring_2_namespaces_and_dwr.html
is the link I was trying to base my code off.
Please help!
http://bram.jteam.nl/index.php/2007/01/31/spring-dwr-ajax-made-easy/
I kind of got DWR list page to show up. However, anytime I try to execute any of the functions shown on the page, it throws an error.
This is what I first put in
<bean id="myManager" class="llr.service.impl.MyManagerImpl">
<dwr:remote javascript="MyAjaxManagerService">
<dwr:include method="loadById"/>
<dwr:include method="loadByUserId"/>
</dwr:remote>
<property name="myDao" ref="myDao"/>
</bean>
[code]
The logs show
[code]
007-04-04 01:32:53,437 WARN [org.directwebremoting.impl.DefaultRemoter] - Method execution failed:
java.lang.IllegalArgumentException: object is not an instance of declaring class
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.directwebremoting.impl.ExecuteAjaxFilter.doFil ter(ExecuteAjaxFilter.java:34)
I looked a little further and found a <dwr:configuration> tag which I thought would be the correct way to do it.
So, here's what I have now
<bean id="myManager" class="com.service.impl.MyManagerImpl">
<dwr:remote javascript="MyAjaxManagerService">
<dwr:include method="loadById"/>
<dwr:include method="loadByUserId"/>
</dwr:remote>
<property name="myDao" ref="myDao"/>
</bean>
<dwr:configuration>
<dwr:create type="new"
class="com.service.impl.MyManagerImpl""
javascript="MyAjaxService"/>
<dwr:convert type="bean" class="com.model.TestObject" />
</dwr:configuration>
This now gives me Null Pointer exceptions on Loading (in the tomcat logs)
http://getahead.org/blog/joe/2006/06/14/spring_2_namespaces_and_dwr.html
is the link I was trying to base my code off.
Please help!