Announcement Announcement Module
Collapse
No announcement yet.
Axis remoting and JDK 5.0 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Axis remoting and JDK 5.0

    I'm having an problem with an Axis service that works fine without the following combination: JDK 5.0, Resin 3, and Axis 1.2b. If I use JDK 1.4.2, I don't have any issues. Here's the exception I'm getting:

    Code:
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loginServiceLookup' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: local part cannot be "null" when creating a QName
    java.lang.IllegalArgumentException: local part cannot be "null" when creating a QName
      at javax.xml.namespace.QName.<init>&#40;QName.java&#58;164&#41;
      at javax.xml.namespace.QName.<init>&#40;QName.java&#58;211&#41;
      at org.springframework.remoting.jaxrpc.LocalJaxRpcServiceFactory.getQName&#40;LocalJaxRpcServiceFactory.java&#58;124&#41;
      at org.springframework.remoting.jaxrpc.JaxRpcPortClientInterceptor.afterPropertiesSet&#40;JaxRpcPortClientInterceptor.java&#58;267&#41;
      at org.springframework.remoting.jaxrpc.JaxRpcPortProxyFactoryBean.afterPropertiesSet&#40;JaxRpcPortProxyFactoryBean.java&#58;55&#41;
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods&#40;AbstractAutowireCapableBeanFactory.java&#58;1037&#41;
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean&#40;AbstractAutowireCapableBeanFactory.java&#58;305&#41;
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean&#40;AbstractAutowireCapableBeanFactory.java&#58;223&#41;
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean&#40;AbstractBeanFactory.java&#58;236&#41;
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean&#40;AbstractBeanFactory.java&#58;159&#41;
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons&#40;DefaultListableBeanFactory.java&#58;255&#41;
      at org.springframework.context.support.AbstractApplicationContext.refresh&#40;AbstractApplicationContext.java&#58;317&#41;
      at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh&#40;AbstractRefreshableWebApplicationContext.java&#58;131&#41;
      at org.springframework.web.context.ContextLoader.createWebApplicationContext&#40;ContextLoader.java&#58;177&#41;
      at org.springframework.web.context.ContextLoader.initWebApplicationContext&#40;ContextLoader.java&#58;105&#41;
      at org.springframework.web.context.ContextLoaderListener.contextInitialized&#40;ContextLoaderListener.java&#58;48&#41;
      at com.caucho.server.webapp.Application.start&#40;Application.java&#58;1690&#41;
      at com.caucho.server.deploy.Entry.startImpl&#40;Entry.java&#58;498&#41;
      at com.caucho.server.deploy.Entry.redeployIfModifiedImpl&#40;Entry.java&#58;452&#41;
      at com.caucho.server.deploy.Entry.startAutomatic&#40;Entry.java&#58;385&#41;
      at com.caucho.server.deploy.DeployContainer.start&#40;DeployContainer.java&#58;154&#41;
      at com.caucho.server.webapp.ApplicationContainer.start&#40;ApplicationContainer.java&#58;595&#41;
      at com.caucho.server.host.Host.start&#40;Host.java&#58;492&#41;
      at com.caucho.server.deploy.Entry.startImpl&#40;Entry.java&#58;498&#41;
      at com.caucho.server.deploy.Entry.redeployIfModifiedImpl&#40;Entry.java&#58;452&#41;
      at com.caucho.server.deploy.Entry.startAutomatic&#40;Entry.java&#58;385&#41;
      at com.caucho.server.deploy.DeployContainer.start&#40;DeployContainer.java&#58;154&#41;
      at com.caucho.server.host.HostContainer.start&#40;HostContainer.java&#58;507&#41;
      at com.caucho.server.resin.ServletServer.start&#40;ServletServer.java&#58;894&#41;
      at com.caucho.server.resin.ResinServer.start&#40;ResinServer.java&#58;466&#41;
      at com.caucho.server.resin.Resin.init&#40;Resin.java&#58;297&#41;
      at com.caucho.server.resin.Resin.main&#40;Resin.java&#58;553&#41;
    I'm guessing that this some sort of classpath issue that occurs because JDK 5.0 ships with JAX-RPC included. I tried removing the jaxrpc.jar that ships with Resin as well as the axis jaxrpc from the web application's classloader to solve the problem, but it did not work. Anyone dealt with this problem yet?

  • #2
    This looks like a configuration issue. The QName class encapsulates a full XML name with local part and namespace part. Perhaps there are differences between the way the XML parser in JDK 5.0 handles these. Can you post your Spring config and your wsdd file?

    Also have you tried this in Tomcat 5.5 just to see if it works there?

    Rob

    Comment


    • #3
      Originally posted by robh
      This looks like a configuration issue. The QName class encapsulates a full XML name with local part and namespace part. Perhaps there are differences between the way the XML parser in JDK 5.0 handles these. Can you post your Spring config and your wsdd file?

      Also have you tried this in Tomcat 5.5 just to see if it works there?

      Rob
      Thanks for the response Rob. I did a little more research and it seems that the version of JAXB that ships with JDK 1.5 does not allow you to construct QName's when the local part is null (instead it throws the IllegalArgumentException that I am getting). It seems doing something incorrect with my namespaces.

      I'm actually consuming a .NET web service, so there is a not a WSDD file. I'm generating the client stub's using WSDL2Java. Here's the definitions portion of the WSDL:

      Code:
      <?xml version="1.0" encoding="utf-8"?>
      <definitions xmlns&#58;http="http&#58;//schemas.xmlsoap.org/wsdl/http/" xmlns&#58;soap="http&#58;//schemas.xmlsoap.org/wsdl/soap/" xmlns&#58;s="http&#58;//www.w3.org/2001/XMLSchema" xmlns&#58;s0="http&#58;//CrashReports.IN.Gov/eServices" xmlns&#58;soapenc="http&#58;//schemas.xmlsoap.org/soap/encoding/" xmlns&#58;tm="http&#58;//microsoft.com/wsdl/mime/textMatching/" xmlns&#58;mime="http&#58;//schemas.xmlsoap.org/wsdl/mime/" targetNamespace="http&#58;//CrashReports.IN.Gov/eServices" xmlns="http&#58;//schemas.xmlsoap.org/wsdl/">
      ...
      </definitions>
      And the task:

      Code:
         <ant&#58;taskdef name="axis-wsdl2java" classname="org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask" classpathref="maven.dependency.classpath" />
         <ant&#58;axis-wsdl2java url="$&#123;crash.service.url&#125;?wsdl"
          output="$&#123;basedir&#125;/src"
          all="true"
          debug="false"
          helpergen="true"
          verbose="true"
          testCase="true">
          <mapping namespace="http&#58;//CrashReports.IN.Gov/eServices" package="ai.isp.crash.client" />
         </ant&#58;axis-wsdl2java>
      Here's my Spring configuration:

      Code:
        <bean id="loginServiceLocator" class="ai.isp.crash.client.ELoginLocator" />
                                                                                      
        <bean id="loginServiceLookup" class="org.springframework.remoting.jaxrpc.JaxRpcPortProxyFactoryBean">
          <property name="jaxRpcService">
            <ref bean="loginServiceLocator" />
          </property>
          <property name="portName">
            <value>loginServiceLookup</value>
          </property>
          <property name="portInterface">
            <value>ai.isp.crash.client.ELoginSoap</value>
          </property>
          <property name="serviceInterface">
            <value>ai.isp.crash.dao.LoginServiceDAO</value>
          </property>
        </bean>
      I appreciate the help.

      Comment

      Working...
      X