2010-08-18 1 views
0

J'ai trouvé l'erreur "Erreur de configuration de l'écouteur d'application de la classe org.directwebremoting.servlet.DwrListener" lors du déploiement d'une application utilisant dwr dans tomcat6. Voici mon web.xmlrencontrer "Erreur lors de la configuration de l'écouteur d'application de la classe org.directwebremoting.servlet.DwrListener"

<display-name>DWR (Direct Web Remoting)</display-name> 
    <description>A Simple Demo DWR</description> 
    <listener> 
    <listener-class>org.directwebremoting.servlet.DwrListener</listener-class> 
    </listener> 


<servlet> 
    <servlet-name>dwr-invoker</servlet-name> 
    <display-name>DWR Servlet</display-name> 
    <description>Direct Web Remoter Servlet</description> 
    <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class> 

<!-- This should NEVER be present in live --> 
<init-param> 
    <param-name>debug</param-name> 
    <param-value>true</param-value> 
</init-param> 

<!-- Remove this unless you want to use active reverse ajax --> 
<init-param> 
    <param-name>activeReverseAjaxEnabled</param-name> 
    <param-value>true</param-value> 
</init-param> 

<!-- By default DWR creates application scope objects when they are first 
used. This creates them when the app-server is started --> 
<init-param> 
    <param-name>initApplicationScopeCreatorsAtStartup</param-name> 
    <param-value>true</param-value> 
</init-param> 

<!-- WARNING: allowing JSON-RPC connections bypasses much of the security 
protection that DWR gives you. Take this out if security is important --> 
<init-param> 
    <param-name>jsonRpcEnabled</param-name> 
    <param-value>true</param-value> 
</init-param> 

<!-- WARNING: allowing JSONP connections bypasses much of the security 
protection that DWR gives you. Take this out if security is important --> 
<init-param> 
    <param-name>jsonpEnabled</param-name> 
    <param-value>true</param-value> 
</init-param> 

<!-- data: URLs are good for small images, but are slower, and could OOM for 
larger images. Leave this out (or keep 'false') for anything but small images --> 
<init-param> 
    <param-name>preferDataUrlSchema</param-name> 
    <param-value>false</param-value> 
</init-param> 

<!-- This enables full streaming mode. It's probably better to leave this 
out if you are running across the Internet --> 
<init-param> 
    <param-name>maxWaitAfterWrite</param-name> 
    <param-value>-1</param-value> 
</init-param> 


    <init-param> 
    <param-name>org.directwebremoting.extend.ServerLoadMonitor</param-name> 
    <param-value>org.directwebremoting.impl.PollingServerLoadMonitor</param-value> 
</init-param> 



<!-- 
For more information on these parameters, see: 
- http://getahead.org/dwr/server/servlet 
- http://getahead.org/dwr/reverse-ajax/configuration 
--> 
<load-on-startup>1</load-on-startup> 
    </servlet> 

Répondre

2

Êtes-vous obtenez une erreur de ClassNotFound ainsi?

Avez-vous placé dwr.jar dans le répertoire WEB-INF/lib de votre webapp?

+0

Je réinstalle le tomcat et le message d'erreur change en quelque sorte en SEVERE: Allocate l'exception pour la servlet dwr-invokerjava.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory puis j'inclus la bibliothèque dans lib/et le problème a été résolu. – user415726

+0

Merci pour beaucoup, il résout mon problème.Peut-être imaginer que l'IDE est tellement stupide qu'il ne sait pas copier le pot automatiquement. – DiveInto

+0

@DiveInto: si l'IDE est si stupide. Ne l'utilise pas. :-P –

Questions connexes