users@glassfish.java.net

Spring 3.0.3 Hibernate 3.5, JPA 2.0 GWT 2.0.4 GlassFish V3.0.1

From: <glassfish_at_javadesktop.org>
Date: Wed, 14 Jul 2010 08:45:49 PDT

Hi,
When Deploy my app, I have this trace:

GRAVE: 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.StandardContext.start(StandardContext.java:5232)
        at com.sun.enterprise.web.WebModule.start(WebModule.java:499)

[b]My web.xml[/b]
<?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>
[b][/b]
<?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>[i][/i]
[Message sent by forum member 'filihc']

http://forums.java.net/jive/thread.jspa?messageID=477651