java.lang.IllegalArgumentException: Cannot create URL for this address /MyService

Spring JIRA | F. Daniel Parra Vizcaíno | 8 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    When using SimpleJaxWsServiceExporter into a .war application deployed in Weblogic, it never can start-up due to the following exception: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.remoting.jaxws.SimpleJaxWsServiceExporter#0' defined in ServletContext resource [/WEB-INF/webmvc-config.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Cannot create URL for this address /MyService. [........] java.lang.IllegalArgumentException: Cannot create URL for this address /MyService at weblogic.wsee.jaxws.spi.WLSEndpoint.publish(WLSEndpoint.java:133) at org.springframework.remoting.jaxws.SimpleJaxWsServiceExporter.publishEndpoint(SimpleJaxWsServiceExporter.java:67) at org.springframework.remoting.jaxws.AbstractJaxWsServiceExporter.publishEndpoints(AbstractJaxWsServiceExporter.java:125) at org.springframework.remoting.jaxws.AbstractJaxWsServiceExporter.afterPropertiesSet(AbstractJaxWsServiceExporter.java:104) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory .java:1369) Truncated. see log file for complete stacktrace The problem is that the Weblogic JAX-WS implementation that is being called by SimpleJaxWsServiceExporter to publish the service doesn't accept URIs without a trailing slash '/'. I have found out that patching the following method in SimpleJaxWsServiceExporter by adding the required slash character enables the webservice publication: protected void publishEndpoint(Endpoint endpoint, WebService annotation) { String fullAddress = this.baseAddress + annotation.serviceName() + '/'; // Added slash for Weblogic 10.3 endpoint.publish(fullAddress); } Indeed, I'm not sure is this patch is appliable for different application servers that Weblogic 10.3

    Spring JIRA | 8 years ago | F. Daniel Parra Vizcaíno
    java.lang.IllegalArgumentException: Cannot create URL for this address /MyService
  2. 0

    When using SimpleJaxWsServiceExporter into a .war application deployed in Weblogic, it never can start-up due to the following exception: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.remoting.jaxws.SimpleJaxWsServiceExporter#0' defined in ServletContext resource [/WEB-INF/webmvc-config.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Cannot create URL for this address /MyService. [........] java.lang.IllegalArgumentException: Cannot create URL for this address /MyService at weblogic.wsee.jaxws.spi.WLSEndpoint.publish(WLSEndpoint.java:133) at org.springframework.remoting.jaxws.SimpleJaxWsServiceExporter.publishEndpoint(SimpleJaxWsServiceExporter.java:67) at org.springframework.remoting.jaxws.AbstractJaxWsServiceExporter.publishEndpoints(AbstractJaxWsServiceExporter.java:125) at org.springframework.remoting.jaxws.AbstractJaxWsServiceExporter.afterPropertiesSet(AbstractJaxWsServiceExporter.java:104) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory .java:1369) Truncated. see log file for complete stacktrace The problem is that the Weblogic JAX-WS implementation that is being called by SimpleJaxWsServiceExporter to publish the service doesn't accept URIs without a trailing slash '/'. I have found out that patching the following method in SimpleJaxWsServiceExporter by adding the required slash character enables the webservice publication: protected void publishEndpoint(Endpoint endpoint, WebService annotation) { String fullAddress = this.baseAddress + annotation.serviceName() + '/'; // Added slash for Weblogic 10.3 endpoint.publish(fullAddress); } Indeed, I'm not sure is this patch is appliable for different application servers that Weblogic 10.3

    Spring JIRA | 8 years ago | F. Daniel Parra Vizcaíno
    java.lang.IllegalArgumentException: Cannot create URL for this address /MyService

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Cannot create URL for this address /MyService

      at weblogic.wsee.jaxws.spi.WLSEndpoint.publish()
    2. weblogic.wsee.jaxws
      WLSEndpoint.publish
      1. weblogic.wsee.jaxws.spi.WLSEndpoint.publish(WLSEndpoint.java:133)
      1 frame
    3. Spring
      AbstractJaxWsServiceExporter.afterPropertiesSet
      1. org.springframework.remoting.jaxws.SimpleJaxWsServiceExporter.publishEndpoint(SimpleJaxWsServiceExporter.java:67)
      2. org.springframework.remoting.jaxws.AbstractJaxWsServiceExporter.publishEndpoints(AbstractJaxWsServiceExporter.java:125)
      3. org.springframework.remoting.jaxws.AbstractJaxWsServiceExporter.afterPropertiesSet(AbstractJaxWsServiceExporter.java:104)
      3 frames