dwr can't find any classes?? Spring+dwr

View: New views
7 Messages — Rating Filter:   Alert me  

dwr can't find any classes?? Spring+dwr

by geek.shrek :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I'm trying to integrate dwr with spring.

but dwr could not find any classes registered.
my error is "No class by name: Service"

Here is my web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4"
        xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
        <display-name>ReverseAjax</display-name>

        <servlet>
                <servlet-name>TestServlet</servlet-name>
                <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
                <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet-mapping>
                <servlet-name>TestServlet</servlet-name>
                <url-pattern>*.do</url-pattern>
        </servlet-mapping>
        <servlet>
                <servlet-name>dwr</servlet-name>
                <servlet-class>org.directwebremoting.spring.DwrSpringServlet</servlet-class>
                <init-param>
                        <param-name>debug</param-name>
                        <param-value>true</param-value>
                </init-param>
        </servlet>
               
        <servlet-mapping>
                <servlet-name>dwr</servlet-name>
                <url-pattern>/dwr/*</url-pattern>
        </servlet-mapping>

        <context-param>
                <param-name>contextConfigLocation</param-name>
                <param-value>/WEB-INF/applicationContext.xml</param-value>
        </context-param>

        <listener>
                <listener-class>
                        org.springframework.web.context.ContextLoaderListener
                </listener-class>
        </listener>

        <servlet-mapping>
                <servlet-name>TestServlet</servlet-name>
                <url-pattern>/TestServlet</url-pattern>
        </servlet-mapping>

        <welcome-file-list>
                <welcome-file>index.html</welcome-file>
        </welcome-file-list>
</web-app>

TestServlet-servlet.xml
<beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dwr="http://www.directwebremoting.org/schema/spring-dwr"
        xsi:schemaLocation="http://www.springframework.org/schema/beans 
                           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
                           http://www.directwebremoting.org/schema/spring-dwr
                           http://www.directwebremoting.org/schema/spring-dwr-2.0.xsd">

        <!-- Mandatory DWR configuration -->
        <dwr:configuration />
        <dwr:controller id="dwrController" debug="true" />

        <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
                <property value="true" name="alwaysUseFullPath"></property>
                <property name="mappings">
                        <props>
                                <prop key="/dwr/**/*">dwrController</prop>
                                <prop key="/interface/**">dwrController</prop>
                                <prop key="/engine.js">dwrController</prop>
                <prop key="/util.js">dwrController</prop>
            </props>

        </property>
        </bean>

        <bean class="utils.Service" id="Service">
                <dwr:remote javascript="Service">
                </dwr:remote>
        </bean>
</beans>

Can someone point me what is wrong with my configuration.  

Thanks,

Re: dwr can't find any classes?? Spring+dwr

by XMaNIaC :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Use DwrSpringServlet or <dwr:controller>. One or the other but not both

Regards

On Wed, Nov 4, 2009 at 4:09 PM, geek.shrek <miss_cool_666@...> wrote:

Hi,

I'm trying to integrate dwr with spring.

but dwr could not find any classes registered.
my error is "No class by name: Service"

Here is my web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4"
       xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
       <display-name>ReverseAjax</display-name>

       <servlet>
               <servlet-name>TestServlet</servlet-name>

<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
               <load-on-startup>1</load-on-startup>
       </servlet>
       <servlet-mapping>
               <servlet-name>TestServlet</servlet-name>
               <url-pattern>*.do</url-pattern>
       </servlet-mapping>
       <servlet>
               <servlet-name>dwr</servlet-name>

<servlet-class>org.directwebremoting.spring.DwrSpringServlet</servlet-class>
               <init-param>
                       <param-name>debug</param-name>
                       <param-value>true</param-value>
               </init-param>
       </servlet>

       <servlet-mapping>
               <servlet-name>dwr</servlet-name>
               <url-pattern>/dwr/*</url-pattern>
       </servlet-mapping>

       <context-param>
               <param-name>contextConfigLocation</param-name>
               <param-value>/WEB-INF/applicationContext.xml</param-value>
       </context-param>

       <listener>
               <listener-class>
                       org.springframework.web.context.ContextLoaderListener
               </listener-class>
       </listener>

       <servlet-mapping>
               <servlet-name>TestServlet</servlet-name>
               <url-pattern>/TestServlet</url-pattern>
       </servlet-mapping>

       <welcome-file-list>
               <welcome-file>index.html</welcome-file>
       </welcome-file-list>
</web-app>

TestServlet-servlet.xml
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:dwr="http://www.directwebremoting.org/schema/spring-dwr"
       xsi:schemaLocation="http://www.springframework.org/schema/beans

http://www.springframework.org/schema/beans/spring-beans-2.5.xsd

http://www.directwebremoting.org/schema/spring-dwr

http://www.directwebremoting.org/schema/spring-dwr-2.0.xsd">

       <!-- Mandatory DWR configuration -->
       <dwr:configuration />
       <dwr:controller id="dwrController" debug="true" />

       <bean
class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
               <property value="true" name="alwaysUseFullPath"></property>
               <property name="mappings">
                       <props>
                               <prop key="/dwr/**/*">dwrController</prop>
                               <prop key="/interface/**">dwrController</prop>
                               <prop key="/engine.js">dwrController</prop>
               <prop key="/util.js">dwrController</prop>
           </props>

       </property>
       </bean>

       <bean class="utils.Service" id="Service">
               <dwr:remote javascript="Service">
               </dwr:remote>
       </bean>
</beans>

Can someone point me what is wrong with my configuration.  :-(

Thanks,

--
View this message in context: http://old.nabble.com/dwr-can%27t-find-any-classes---Spring%2Bdwr-tp26197921p26197921.html
Sent from the DWR - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...



Re: dwr can't find any classes?? Spring+dwr

by geek.shrek :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for the reply

I removed the DwrSpringServlet, and keep <dwr:controller>
but now the error become
"[PageNotFound] No mapping found for HTTP request with URI [/ReverseAjaxTest/] in DispatcherServlet with name 'TestServlet'"

Did I missed something else?

Thanks,


XMaNIaC wrote:
Use DwrSpringServlet or <dwr:controller>. One or the other but not both

Regards

Re: dwr can't find any classes?? Spring+dwr

by XMaNIaC :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

With 3.0 try <dwr:url-mapping />. With 2.x David has posted several examples. Search the list 

Regards

On Wed, Nov 4, 2009 at 5:15 PM, geek.shrek <miss_cool_666@...> wrote:

Thanks for the reply :-)

I removed the DwrSpringServlet, and keep <dwr:controller>
but now the error become
"[PageNotFound] No mapping found for HTTP request with URI
[/ReverseAjaxTest/] in DispatcherServlet with name 'TestServlet'"

Did I missed something else?

Thanks,



XMaNIaC wrote:
>
> Use DwrSpringServlet or <dwr:controller>. One or the other but not both
>
> Regards
>
>

--
View this message in context: http://old.nabble.com/dwr-can%27t-find-any-classes---Spring%2Bdwr-tp26197921p26199376.html
Sent from the DWR - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...



Re: dwr can't find any classes?? Spring+dwr

by davidmarginian :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://www.butterdev.com/category/spring/

You can download the shell of a working config here.  You may want to try starting here and then adding to it slowly.

On Wed, Nov 4, 2009 at 9:34 AM, Jose Noheda <jose.noheda@...> wrote:
With 3.0 try <dwr:url-mapping />. With 2.x David has posted several examples. Search the list 

Regards

On Wed, Nov 4, 2009 at 5:15 PM, geek.shrek <miss_cool_666@...> wrote:

Thanks for the reply :-)

I removed the DwrSpringServlet, and keep <dwr:controller>
but now the error become
"[PageNotFound] No mapping found for HTTP request with URI
[/ReverseAjaxTest/] in DispatcherServlet with name 'TestServlet'"

Did I missed something else?

Thanks,



XMaNIaC wrote:
>
> Use DwrSpringServlet or <dwr:controller>. One or the other but not both
>
> Regards
>
>

--
View this message in context: http://old.nabble.com/dwr-can%27t-find-any-classes---Spring%2Bdwr-tp26197921p26199376.html
Sent from the DWR - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...




Re: dwr can't find any classes?? Spring+dwr

by geek.shrek :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you :)

I've tried your example.
I'am able to run the example, but when I hit dwrSampleApp/dwr

I have this error
[PageNotFound] No mapping for [/dwrSampleApp/dwr] in DispatcherServlet with name 'dwrSampleApp'




davidmarginian wrote:
http://www.butterdev.com/category/spring/

You can download the shell of a working config here.  You may want to try
starting here and then adding to it slowly.

On Wed, Nov 4, 2009 at 9:34 AM, Jose Noheda <jose.noheda@gmail.com> wrote:

> With 3.0 try <dwr:url-mapping />. With 2.x David has posted several
> examples. Search the list
>
> Regards
>
> On Wed, Nov 4, 2009 at 5:15 PM, geek.shrek <miss_cool_666@yahoo.com>wrote:
>
>>
>> Thanks for the reply :-)
>>
>> I removed the DwrSpringServlet, and keep <dwr:controller>
>> but now the error become
>> "[PageNotFound] No mapping found for HTTP request with URI
>> [/ReverseAjaxTest/] in DispatcherServlet with name 'TestServlet'"
>>
>> Did I missed something else?
>>
>> Thanks,
>>
>>
>>
>> XMaNIaC wrote:
>> >
>> > Use DwrSpringServlet or <dwr:controller>. One or the other but not both
>> >
>> > Regards
>> >
>> >
>>
>> --
>> View this message in context:
>> http://old.nabble.com/dwr-can%27t-find-any-classes---Spring%2Bdwr-tp26197921p26199376.html
>> Sent from the DWR - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@dwr.dev.java.net
>> For additional commands, e-mail: users-help@dwr.dev.java.net
>>
>>
>

Re: dwr can't find any classes?? Spring+dwr

by davidmarginian :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Just open the browser and go to:
http://yourhost:yourport/dwrSampleApp

If you want to see the test page go to:
http://yourhost:yourport/dwrSampleApp/dwr/index.html

Read about mappings if you don't understand this.


On Wed, Nov 4, 2009 at 1:23 PM, geek.shrek <miss_cool_666@...> wrote:

Thank you :)

I've tried your example.
I'am able to run the example, but when I hit dwrSampleApp/dwr

I have this error
[PageNotFound] No mapping for [/dwrSampleApp/dwr] in DispatcherServlet with
name 'dwrSampleApp'





davidmarginian wrote:
>
> http://www.butterdev.com/category/spring/
>
> You can download the shell of a working config here.  You may want to try
> starting here and then adding to it slowly.
>
> On Wed, Nov 4, 2009 at 9:34 AM, Jose Noheda <jose.noheda@...> wrote:
>
>> With 3.0 try <dwr:url-mapping />. With 2.x David has posted several
>> examples. Search the list
>>
>> Regards
>>
>> On Wed, Nov 4, 2009 at 5:15 PM, geek.shrek
>> <miss_cool_666@...>wrote:
>>
>>>
>>> Thanks for the reply :-)
>>>
>>> I removed the DwrSpringServlet, and keep <dwr:controller>
>>> but now the error become
>>> "[PageNotFound] No mapping found for HTTP request with URI
>>> [/ReverseAjaxTest/] in DispatcherServlet with name 'TestServlet'"
>>>
>>> Did I missed something else?
>>>
>>> Thanks,
>>>
>>>
>>>
>>> XMaNIaC wrote:
>>> >
>>> > Use DwrSpringServlet or <dwr:controller>. One or the other but not
>>> both
>>> >
>>> > Regards
>>> >
>>> >
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/dwr-can%27t-find-any-classes---Spring%2Bdwr-tp26197921p26199376.html
>>> Sent from the DWR - Users mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@...
>>> For additional commands, e-mail: users-help@...
>>>
>>>
>>
>
>

--
View this message in context: http://old.nabble.com/dwr-can%27t-find-any-classes---Spring%2Bdwr-tp26197921p26203953.html
Sent from the DWR - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...