javax.xml.rpc.JAXRPCException: Cannot find operation: toString - none defined

Spring JIRA | Nils-Helge Garli | 1 decade ago
  1. 0

    When using an interceptor with the JaxRpcPortProxyFactoryBean, an exception is thrown during initialization of the Spring Context. It appears that somewhere in the initialization, the toString method of the interceptor is invoked, which in turn will invoke toString on the JaxRpcPortProxy, which in turn attempts to invoke a toString operation on the web service that it proxies. The stack trace (plus some debug info) is: 4632 [main] INFO org.springframework.beans.factory.support.DefaultListableBeanFactory - Destroying singletons in factory {org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [debugInterceptor,amazon,debugAdvisor,amazonTarget]; Root of BeanFactory hierarchy} 4633 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Retrieving depending beans for bean 'debugAdvisor' 4633 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Applying DestructionAwareBeanPostProcessors to bean with name 'debugAdvisor' 4634 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Retrieving depending beans for bean 'debugInterceptor' 4635 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Applying DestructionAwareBeanPostProcessors to bean with name 'debugInterceptor' 4635 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Retrieving depending beans for bean 'amazonTarget' 4635 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Applying DestructionAwareBeanPostProcessors to bean with name 'amazonTarget' org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'amazon' defined in class path resource [applicationContext-spring-test.xml]: Initialization of bean failed; nested exception is javax.xml.rpc.JAXRPCException: Cannot find operation: toString - none defined javax.xml.rpc.JAXRPCException: Cannot find operation: toString - none defined at org.apache.axis.client.Call.setOperation(Call.java:1309) at org.apache.axis.client.AxisClientProxy.invoke(AxisClientProxy.java:154) at $Proxy0.toString(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.springframework.remoting.jaxrpc.JaxRpcPortClientInterceptor.invoke(JaxRpcPortClientInterceptor.java:294) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:138) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:148) at $Proxy1.toString(Unknown Source) at java.lang.String.valueOf(String.java:2131) at java.lang.StringBuffer.append(StringBuffer.java:370) at org.springframework.aop.target.SingletonTargetSource.toString(SingletonTargetSource.java:50) at java.lang.String.valueOf(String.java:2131) at java.lang.StringBuffer.append(StringBuffer.java:370) at org.springframework.aop.framework.AdvisedSupport.toString(AdvisedSupport.java:478) at java.lang.String.valueOf(String.java:2131) at java.lang.StringBuffer.append(StringBuffer.java:370) at org.springframework.aop.framework.ProxyFactoryBean.setBeanFactory(ProxyFactoryBean.java:174) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:245) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:177) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:159) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:177) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:268) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:58) at spring.bug.SpringBugTest.testAmazonService(SpringBugTest.java:23) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203)

    Spring JIRA | 1 decade ago | Nils-Helge Garli
    javax.xml.rpc.JAXRPCException: Cannot find operation: toString - none defined
  2. 0

    When using an interceptor with the JaxRpcPortProxyFactoryBean, an exception is thrown during initialization of the Spring Context. It appears that somewhere in the initialization, the toString method of the interceptor is invoked, which in turn will invoke toString on the JaxRpcPortProxy, which in turn attempts to invoke a toString operation on the web service that it proxies. The stack trace (plus some debug info) is: 4632 [main] INFO org.springframework.beans.factory.support.DefaultListableBeanFactory - Destroying singletons in factory {org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [debugInterceptor,amazon,debugAdvisor,amazonTarget]; Root of BeanFactory hierarchy} 4633 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Retrieving depending beans for bean 'debugAdvisor' 4633 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Applying DestructionAwareBeanPostProcessors to bean with name 'debugAdvisor' 4634 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Retrieving depending beans for bean 'debugInterceptor' 4635 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Applying DestructionAwareBeanPostProcessors to bean with name 'debugInterceptor' 4635 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Retrieving depending beans for bean 'amazonTarget' 4635 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Applying DestructionAwareBeanPostProcessors to bean with name 'amazonTarget' org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'amazon' defined in class path resource [applicationContext-spring-test.xml]: Initialization of bean failed; nested exception is javax.xml.rpc.JAXRPCException: Cannot find operation: toString - none defined javax.xml.rpc.JAXRPCException: Cannot find operation: toString - none defined at org.apache.axis.client.Call.setOperation(Call.java:1309) at org.apache.axis.client.AxisClientProxy.invoke(AxisClientProxy.java:154) at $Proxy0.toString(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.springframework.remoting.jaxrpc.JaxRpcPortClientInterceptor.invoke(JaxRpcPortClientInterceptor.java:294) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:138) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:148) at $Proxy1.toString(Unknown Source) at java.lang.String.valueOf(String.java:2131) at java.lang.StringBuffer.append(StringBuffer.java:370) at org.springframework.aop.target.SingletonTargetSource.toString(SingletonTargetSource.java:50) at java.lang.String.valueOf(String.java:2131) at java.lang.StringBuffer.append(StringBuffer.java:370) at org.springframework.aop.framework.AdvisedSupport.toString(AdvisedSupport.java:478) at java.lang.String.valueOf(String.java:2131) at java.lang.StringBuffer.append(StringBuffer.java:370) at org.springframework.aop.framework.ProxyFactoryBean.setBeanFactory(ProxyFactoryBean.java:174) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:245) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:177) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:159) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:177) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:268) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:58) at spring.bug.SpringBugTest.testAmazonService(SpringBugTest.java:23) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203)

    Spring JIRA | 1 decade ago | Nils-Helge Garli
    javax.xml.rpc.JAXRPCException: Cannot find operation: toString - none defined
  3. 0

    I am playing with Spring's webservice support. See forum: http://forum.springframework.org/viewtopic.php?p=11579#11579 I was outputting debug information and I stumpled on an exception. First the stack-trace: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ediDao' defined in ServletConte eptionsException: PropertyAccessExceptionsException (1 errors); nested propertyAccessExceptions are: [org.springframewo ion: toString - none defined] PropertyAccessExceptionsException (1 errors) org.springframework.beans.MethodInvocationException: Property 'service' threw exception; nested exception is javax.xml. javax.xml.rpc.JAXRPCException: Cannot find operation: toString - none defined at org.apache.axis.client.Call.setOperation(Call.java:1253) at org.apache.axis.client.AxisClientProxy.invoke(AxisClientProxy.java:184) at $Proxy0.toString(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.springframework.remoting.rmi.RmiClientInterceptorUtils.doInvoke(RmiClientInterceptorUtils.java:98) at org.springframework.remoting.rmi.RmiClientInterceptorUtils.invoke(RmiClientInterceptorUtils.java:67) at org.springframework.remoting.jaxrpc.JaxRpcPortClientInterceptor.invoke(JaxRpcPortClientInterceptor.java:341) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174) at $Proxy1.toString(Unknown Source) at dk.webfragt.access.edi.EDIDao.setService(EDIDao.java:49) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:779) And my spring.xml file <bean id="ediWS" class="dk.webfragt.access.edi.EDIWebServiceFactory"> <property name="serviceInterface"> <value>dk.webfragt.access.edi.Version</value> </property> <property name="wsdlDocumentUrl"> <value>http://localhost:8181/axis/services/Version?wsdl</value> </property> <property name="namespaceUri"> <value>http://localhost:8181/axis/services/Version</value> </property> <property name="serviceName"> <value>VersionService</value> </property> <property name="portName"> <value>Version</value> </property> </bean> And the code that causes this error public void setService(Version v) { logger.debug("Setting service: " + v); this.ver = v; } The problem: Using Spring JAX-RPC will throw an exception if using toString() on the service interface. In my code above I log to debug the service interface (Version). If I remove the debug code line it works fine. Since Version is an interface I can not implemenet a toString method. I think Spring should have a default toString() that output the JAX-RPC Service/Port name.

    Spring JIRA | 1 decade ago | Claus Ibsen
    javax.xml.rpc.JAXRPCException: Cannot find operation: toString - none defined
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    I am playing with Spring's webservice support. See forum: http://forum.springframework.org/viewtopic.php?p=11579#11579 I was outputting debug information and I stumpled on an exception. First the stack-trace: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ediDao' defined in ServletConte eptionsException: PropertyAccessExceptionsException (1 errors); nested propertyAccessExceptions are: [org.springframewo ion: toString - none defined] PropertyAccessExceptionsException (1 errors) org.springframework.beans.MethodInvocationException: Property 'service' threw exception; nested exception is javax.xml. javax.xml.rpc.JAXRPCException: Cannot find operation: toString - none defined at org.apache.axis.client.Call.setOperation(Call.java:1253) at org.apache.axis.client.AxisClientProxy.invoke(AxisClientProxy.java:184) at $Proxy0.toString(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.springframework.remoting.rmi.RmiClientInterceptorUtils.doInvoke(RmiClientInterceptorUtils.java:98) at org.springframework.remoting.rmi.RmiClientInterceptorUtils.invoke(RmiClientInterceptorUtils.java:67) at org.springframework.remoting.jaxrpc.JaxRpcPortClientInterceptor.invoke(JaxRpcPortClientInterceptor.java:341) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174) at $Proxy1.toString(Unknown Source) at dk.webfragt.access.edi.EDIDao.setService(EDIDao.java:49) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:779) And my spring.xml file <bean id="ediWS" class="dk.webfragt.access.edi.EDIWebServiceFactory"> <property name="serviceInterface"> <value>dk.webfragt.access.edi.Version</value> </property> <property name="wsdlDocumentUrl"> <value>http://localhost:8181/axis/services/Version?wsdl</value> </property> <property name="namespaceUri"> <value>http://localhost:8181/axis/services/Version</value> </property> <property name="serviceName"> <value>VersionService</value> </property> <property name="portName"> <value>Version</value> </property> </bean> And the code that causes this error public void setService(Version v) { logger.debug("Setting service: " + v); this.ver = v; } The problem: Using Spring JAX-RPC will throw an exception if using toString() on the service interface. In my code above I log to debug the service interface (Version). If I remove the debug code line it works fine. Since Version is an interface I can not implemenet a toString method. I think Spring should have a default toString() that output the JAX-RPC Service/Port name.

    Spring JIRA | 1 decade ago | Claus Ibsen
    javax.xml.rpc.JAXRPCException: Cannot find operation: toString - none defined
  6. 0

    calling a WS from a servlet...EndpointPort does not contain operation meta.

    Oracle Community | 8 years ago | 843833
    javax.xml.rpc.JAXRPCException: Cannot find child element: {http://com.susan/SusanWS/types}LoginWebService

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. javax.xml.rpc.JAXRPCException

      Cannot find operation: toString - none defined

      at org.apache.axis.client.Call.setOperation()
    2. Axis Web Services
      AxisClientProxy.invoke
      1. org.apache.axis.client.Call.setOperation(Call.java:1309)
      2. org.apache.axis.client.AxisClientProxy.invoke(AxisClientProxy.java:154)
      2 frames
    3. Unknown
      $Proxy0.toString
      1. $Proxy0.toString(Unknown Source)
      1 frame
    4. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:324)
      4 frames
    5. Spring
      JaxRpcPortClientInterceptor.invoke
      1. org.springframework.remoting.jaxrpc.JaxRpcPortClientInterceptor.invoke(JaxRpcPortClientInterceptor.java:294)
      1 frame
    6. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:138)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:148)
      2 frames
    7. Unknown
      $Proxy1.toString
      1. $Proxy1.toString(Unknown Source)
      1 frame
    8. Java RT
      StringBuffer.append
      1. java.lang.String.valueOf(String.java:2131)
      2. java.lang.StringBuffer.append(StringBuffer.java:370)
      2 frames
    9. Spring AOP
      SingletonTargetSource.toString
      1. org.springframework.aop.target.SingletonTargetSource.toString(SingletonTargetSource.java:50)
      1 frame
    10. Java RT
      StringBuffer.append
      1. java.lang.String.valueOf(String.java:2131)
      2. java.lang.StringBuffer.append(StringBuffer.java:370)
      2 frames
    11. Spring AOP
      AdvisedSupport.toString
      1. org.springframework.aop.framework.AdvisedSupport.toString(AdvisedSupport.java:478)
      1 frame
    12. Java RT
      StringBuffer.append
      1. java.lang.String.valueOf(String.java:2131)
      2. java.lang.StringBuffer.append(StringBuffer.java:370)
      2 frames
    13. Spring AOP
      ProxyFactoryBean.setBeanFactory
      1. org.springframework.aop.framework.ProxyFactoryBean.setBeanFactory(ProxyFactoryBean.java:174)
      1 frame
    14. Spring Beans
      DefaultListableBeanFactory.preInstantiateSingletons
      1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:245)
      2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:177)
      3. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:159)
      4. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:177)
      4 frames
    15. Spring Context
      ClassPathXmlApplicationContext.<init>
      1. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:268)
      2. org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:58)
      2 frames
    16. spring.bug
      SpringBugTest.testAmazonService
      1. spring.bug.SpringBugTest.testAmazonService(SpringBugTest.java:23)
      1 frame
    17. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:324)
      4 frames
    18. JUnit
      TestSuite.run
      1. junit.framework.TestCase.runTest(TestCase.java:154)
      2. junit.framework.TestCase.runBare(TestCase.java:127)
      3. junit.framework.TestResult$1.protect(TestResult.java:106)
      4. junit.framework.TestResult.runProtected(TestResult.java:124)
      5. junit.framework.TestResult.run(TestResult.java:109)
      6. junit.framework.TestCase.run(TestCase.java:118)
      7. junit.framework.TestSuite.runTest(TestSuite.java:208)
      8. junit.framework.TestSuite.run(TestSuite.java:203)
      8 frames