Announcement Announcement Module
Collapse
No announcement yet.
GlassFish PWC1430: Unable to add listener Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • GlassFish PWC1430: Unable to add listener

    Hi,

    When deploy my app (GWT 2.0.4, JPA 2.0, Hibernate 3.5, Spring 3.5)

    I've the next trace:

    Code:
    ADVERTENCIA: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: PWC1430: Unable to add listener of type: org.springframework.web.context.ContextLoaderListener, because it does not implement any of the required ServletContextListener, ServletContextAttributeListener, ServletRequestListener, ServletRequestAttributeListener, HttpSessionListener, or HttpSessionAttributeListener interfaces
    java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: PWC1430: Unable to add listener of type: org.springframework.web.context.ContextLoaderListener, because it does not implement any of the required ServletContextListener, ServletContextAttributeListener, ServletRequestListener, ServletRequestAttributeListener, HttpSessionListener, or HttpSessionAttributeListener interfaces
    	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:932)
    	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:912)
    	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:694)
    	at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1947)
    	at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1619)
    	at com.sun.enterprise.web.WebApplication.start(WebApplication.java:90)....

    Code:
    My aplicationContext.xml
    
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    	xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context"
    	xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx"
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd   http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd   http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd   http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd   http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">
    	
    	
    	<context:property-placeholder location="classpath*:META-INF/spring/*.properties" />
    	
    	<context:spring-configured />
    	
    	<context:component-scan base-package="com.inter.wimslive">
    		<context:exclude-filter expression=".*_Roo_.*"
    			type="regex" />
    		<context:exclude-filter expression="org.springframework.stereotype.Controller"
    			type="annotation" />
    	</context:component-scan>
    
    
    
    
    	<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
    			destroy-method="close" >
    		<property name="driverClassName" value="${database.driverClassName}" />
    		<property name="url" value="${database.url}" />
    		<property name="username" value="${database.username}" />
    		<property name="password" value="${database.password}" />
    	</bean>
    	
    	
    
    
    	<!--<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
    		<property name="entityManagerFactory" ref="entityManagerFactory" />
    	</bean>-->
    	
    	<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
            <property name="sessionFactory" ref="sessionFactory"/>
        </bean>
        
        <tx:annotation-driven transaction-manager="transactionManager" />
        
        <tx:jta-transaction-manager/>
    
    
    	<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
    		<property name="dataSource" ref="dataSource" />
    	</bean>
    
    	<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
    		<property name="dataSource" ref="dataSource" />
    		<property name="mappingResources">
    			<list>
    				<value>com/inter/wimslive/entity/hbm/Empleados.hbm.xml</value>
    			</list>
    		</property>
    		<!--<property name="hibernateProperties">
    			<props>
    				<prop key="hibernate.dialect">${hibernate.dialect}</prop>
    				<prop key="hibernate.show_sql">true</prop>
    				<prop key="hibernate.format_sql">true</prop>
    				<prop key="hibernate.use_sql_comments">false</prop>
    				<prop key="hibernate.bytecode.use_reflection_optimizer">true</prop>
    				<prop key="hibernate.jdbc.batch_size">20</prop>
    				<prop key="hibernate.c3p0.min_size">10</prop>
    				<prop key="hibernate.c3p0.max_size">100</prop>
    				<prop key="hibernate.c3p0.timeout">10</prop>
    				<prop key="hibernate.c3p0.acquireRetryAttempts">30</prop>
    				<prop key="hibernate.c3p0.acquireIncrement">5</prop>
    				<prop key="hibernate.c3p0.idleConnectionTestPeriod">100</prop>
    				<prop key="hibernate.c3p0.initialPoolSize">20</prop>
    				<prop key="hibernate.c3p0.maxPoolSize">100</prop>
    				<prop key="hibernate.c3p0.maxIdleTime">300</prop>
    				<prop key="hibernate.c3p0.maxStatements">50</prop>
    				<prop key="hibernate.c3p0.minPoolSize">10</prop>
    				<prop key="hibernate.c3p0.preferredTestQuery">SELECT 1</prop>
    				<prop key="hibernate.c3p0.testConnectionOnCheckout">true</prop>
    			</props>
    		</property>
    	--></bean>
    </beans>
    
    
    My web.xml
    
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    	id="WebApp_ID" version="2.5" metadata-complete="true">
    	<display-name>wimslive</display-name>
    
    	<!-- spring integration -->
    	<context-param>
    		<param-name>log4jConfigLocation</param-name>
    		<param-value>/WEB-INF/classes/log4j.properties</param-value>
    	</context-param>
    
    	<!--
    		<param-value>classpath*:META-INF/spring/applicationContext*.xml</param-value>
    	-->
    	<context-param>
    		<param-name>contextConfigLocation</param-name>
    		<param-value>classpath*:META-INF/spring/applicationContext*.xml</param-value>
    	</context-param>
    
    
    	<listener>
    		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    	</listener>
    
    	<listener>
    		<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
    	</listener>
    
    	<!-- Handles Spring requests -->
    	<!-- SpringGwt remote service servlet -->
    	<servlet>
    		<servlet-name>springGwtRemoteServiceServlet</servlet-name>
    		<servlet-class>com.inter.wimslive.server.SpringGwtRemoteServiceServlet</servlet-class>
    	</servlet>
    	<servlet-mapping>
    		<servlet-name>springGwtRemoteServiceServlet</servlet-name>
    		<url-pattern>/wimslive/*</url-pattern>
    	</servlet-mapping>
    
    	<session-config>
    		<session-timeout>30</session-timeout>
    	</session-config>
    
    	<welcome-file-list>
    		<welcome-file>wimslive.html</welcome-file>
    
    	</welcome-file-list>
    </web-app>
Working...
X