cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Candaş Pamukçu (JIRA) <j...@apache.org>
Subject [jira] [Created] (CXF-4788) Spring initialization failure related with CXF 2.4.10 and upper
Date Tue, 29 Jan 2013 08:47:12 GMT
Candaş Pamukçu created CXF-4788:
-----------------------------------

             Summary: Spring initialization failure related with CXF 2.4.10 and upper
                 Key: CXF-4788
                 URL: https://issues.apache.org/jira/browse/CXF-4788
             Project: CXF
          Issue Type: Bug
          Components: Integration
    Affects Versions: 2.7.2, 2.4.10
            Reporter: Candaş Pamukçu
            Priority: Minor


Hi, 

Detailed explanation is at stackoverflow

link: http://stackoverflow.com/questions/14505849/spring-initialization-failure-related-with-cxf-2-4-10



We have a working system with following technologies

<spring-version>3.0.1.RELEASE</spring-version>
<quartz-version>1.5.2</quartz-version>
<axi2-version>1.5.4</axi2-version>
<cxf.version>2.2.12</cxf.version>

But after I tried to upgrade our dependencies some binding problems occured and I couldn't
find any answer on web so I'm looking for help.

I upgraded spring and quartz successfully, but when I tired to upgrade cxf it became a nightmare.

Now we are running on Spring 3.2.0.RELEASE with Quartz 1.8.6 but we can not go any higher
than cxf 2.3.11,

When I tired to use cxf 2.7.2 first I had some conflicts about XmlSchema (method not found
exception), I overcome it by excluding old version from axis2 dependencies (XmlSchema 1.4.3)
and imported latest version xmlschema-core 2.0.3 and problem solved.

But I started to get the following exception, this is happening immediatly after going upper
than cxf 2.3.11.

    Oca 24, 2013 5:36:38 PM org.apache.catalina.core.StandardContext listenerStart
    SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'userService': Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException:
java.lang.NullPointerException
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1486)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:607)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
        at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4323)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4780)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:785)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:763)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:557)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1124)
        at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1047)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:542)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1390)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:355)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
        at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:313)
        at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:293)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:996)
        at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:771)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:988)
        at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:275)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
        at org.apache.catalina.core.StandardService.startInternal(StandardService.java:427)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:649)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:585)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
        at com.googlecode.t7mp.RunMojo.execute(RunMojo.java:52)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
    Caused by: javax.xml.ws.WebServiceException: java.lang.NullPointerException
        at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:357)
        at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:246)
        at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:525)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1612)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1553)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1483)
        ... 65 more
    Caused by: java.lang.NullPointerException
        at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createBindingInfo(AbstractWSDLBasedEndpointFactory.java:338)
        at org.apache.cxf.jaxws.JaxWsServerFactoryBean.createBindingInfo(JaxWsServerFactoryBean.java:181)
        at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpointInfo(AbstractWSDLBasedEndpointFactory.java:258)
        at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:143)
        at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:159)
        at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:207)
        at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:442)
        at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:329)
        ... 74 more

    Oca 24, 2013 5:36:38 PM org.apache.catalina.core.StandardContext startInternal
    SEVERE: Error listenerStart
    Oca 24, 2013 5:36:38 PM org.apache.catalina.core.StandardContext startInternal
    SEVERE: Context [/mpp] startup failed due to previous errors
    Oca 24, 2013 5:36:38 PM org.apache.catalina.core.ApplicationContext log
    INFO: Closing Spring root WebApplicationContext
    Oca 24, 2013 5:36:38 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
    SEVERE: The web application [/mpp] registered the JBDC driver [com.mysql.jdbc.Driver]
but failed to unregister it when the web application was stopped. To prevent a memory leak,
the JDBC Driver has been forcibly unregistered.
    Oca 24, 2013 5:36:38 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
    SEVERE: The web application [/mpp] appears to have started a thread named [Abandoned connection
cleanup thread] but has failed to stop it. This is very likely to create a memory leak.

I have already read the migration documantation but coudnt find any answer regarding to my
problem.

This is what my shortnened pom.xml looks like

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <spring-version>3.2.0.RELEASE</spring-version>
        <cxf.version>2.6.0</cxf.version>
        <aspectjrt-version>1.6.2</aspectjrt-version>
        <aspectjweaver-version>1.5.0</aspectjweaver-version>
        <log4j-version>1.2.17</log4j-version>
    </properties>

    <dependencies>

        <!-- CXF Dependencies -->
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-api</artifactId>
            <version>${cxf.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-frontend-jaxws</artifactId>
            <version>${cxf.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-transports-http</artifactId>
            <version>${cxf.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-ws-security</artifactId>
            <version>${cxf.version}</version>
        </dependency>

        <!-- Spring Dependencies -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>${spring-version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${spring-version}</version>
            <type>pom</type>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
            <version>${spring-version}</version>
            <type>pom</type>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context-support</artifactId>
            <version>${spring-version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.ws.xmlschema</groupId>
            <artifactId>xmlschema-core</artifactId>
            <version>2.0.3</version>
        </dependency>
    </dependencies>

This is my webservice interface

    @WebService(name="UserWSImplService", targetNamespace = "http://user.services.ws.fourplay.com.tr/")
    public interface UserWSIF

This is my webservice implementation

    @WebService(endpointInterface = "tr.com.fourplay.ws.services.user.UserWSIF")
    public class UserWSImpl implements UserWSIF

This is my config xml

    <bean id="userDBImpl" class="tr.com.fourplay.db.services.user.UserDBImpl" />
    <bean id="userSrv" class="tr.com.fourplay.ws.services.user.UserWSImpl" >
        <property name="dbImpl" ref="userDBImpl" />
    </bean>

    <jaxws:endpoint id="userService" implementor="#userSrv" address="/userService" >
    </jaxws:endpoint>

This is my web.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app 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>Mobile Service Platform</display-name>

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

        <context-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>
                classpath:application-context.xml
            </param-value>
        </context-param>

        <servlet>
            <servlet-name>CXFServlet</servlet-name>
            <display-name>CXF Servlet</display-name>
            <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>

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

    </web-app>

Any help will be highly appriciated.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message