java.lang.ClassCastException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • This snippet of relevant perl code: {code} my %pageoptions = ( minorEdit => 1, versionComment => 'Auto generated', ); $wiki = XMLRPC::Lite -> proxy($url) -> uri ($url); $authToken = $wiki->call('confluence2.login', $user,$pass)->result(); $page = $wiki->call('confluence2.getPage', $authToken, $myspace, $mypage)->result(); $page->{content} = "<p>hello</p>"; $result = $wiki->call('confluence2.updatePage', $authToken, $page, \%pageoptions)->result(); print "Updated page with result $result\n"; {code} causes a Java exception on the server and fails to update the page. {code} 2014-08-18 12:14:24,915 INFO [TP-Processor43] [confluence.rpc.auth.TokenAuthenticationInvocationHandler] invokeAuthenticatedMethod Executing remote API method [ getPage ] as user [ dbalmer ] 2014-08-18 12:14:25,078 INFO [TP-Processor1] [confluence.rpc.auth.TokenAuthenticationInvocationHandler] invokeAuthenticatedMethod Executing remote API method [ updatePage ] as user [ dbalmer ] 2014-08-18 12:14:25,079 ERROR [TP-Processor1] [confluence.rpc.auth.TokenAuthenticationInvocationHandler] invokeAuthenticatedMethod Error during invocation of method: updatePage -- url: /rpc/xmlrpc | userName: dbalmer | method: updatePage java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String at com.atlassian.confluence.rpc.xmlrpc.XmlRpcUtils.convertLong(XmlRpcUtils.java:53) at com.atlassian.confluence.rpc.xmlrpc.XmlRpcUtils.createRemotePageFromPageStruct(XmlRpcUtils.java:21) at com.atlassian.confluence.rpc.xmlrpc.ConfluenceXmlRpcHandlerImpl.updatePage(ConfluenceXmlRpcHandlerImpl.java:442) at sun.reflect.GeneratedMethodAccessor1182.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.atlassian.confluence.rpc.auth.TokenAuthenticationInvocationHandler.invokeAuthenticatedMethod(TokenAuthenticationInvocationHandler.java:93) at com.atlassian.confluence.rpc.auth.TokenAuthenticationInvocationHandler.invoke(TokenAuthenticationInvocationHandler.java:69) at com.sun.proxy.$Proxy2277.updatePage(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.xmlrpc.Invoker.execute(Invoker.java:130) at org.apache.xmlrpc.XmlRpcWorker.invokeHandler(XmlRpcWorker.java:84) {code}
    via by Doug Balmer,
  • This snippet of relevant perl code: {code} my %pageoptions = ( minorEdit => 1, versionComment => 'Auto generated', ); $wiki = XMLRPC::Lite -> proxy($url) -> uri ($url); $authToken = $wiki->call('confluence2.login', $user,$pass)->result(); $page = $wiki->call('confluence2.getPage', $authToken, $myspace, $mypage)->result(); $page->{content} = "<p>hello</p>"; $result = $wiki->call('confluence2.updatePage', $authToken, $page, \%pageoptions)->result(); print "Updated page with result $result\n"; {code} causes a Java exception on the server and fails to update the page. {code} 2014-08-18 12:14:24,915 INFO [TP-Processor43] [confluence.rpc.auth.TokenAuthenticationInvocationHandler] invokeAuthenticatedMethod Executing remote API method [ getPage ] as user [ dbalmer ] 2014-08-18 12:14:25,078 INFO [TP-Processor1] [confluence.rpc.auth.TokenAuthenticationInvocationHandler] invokeAuthenticatedMethod Executing remote API method [ updatePage ] as user [ dbalmer ] 2014-08-18 12:14:25,079 ERROR [TP-Processor1] [confluence.rpc.auth.TokenAuthenticationInvocationHandler] invokeAuthenticatedMethod Error during invocation of method: updatePage -- url: /rpc/xmlrpc | userName: dbalmer | method: updatePage java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String at com.atlassian.confluence.rpc.xmlrpc.XmlRpcUtils.convertLong(XmlRpcUtils.java:53) at com.atlassian.confluence.rpc.xmlrpc.XmlRpcUtils.createRemotePageFromPageStruct(XmlRpcUtils.java:21) at com.atlassian.confluence.rpc.xmlrpc.ConfluenceXmlRpcHandlerImpl.updatePage(ConfluenceXmlRpcHandlerImpl.java:442) at sun.reflect.GeneratedMethodAccessor1182.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.atlassian.confluence.rpc.auth.TokenAuthenticationInvocationHandler.invokeAuthenticatedMethod(TokenAuthenticationInvocationHandler.java:93) at com.atlassian.confluence.rpc.auth.TokenAuthenticationInvocationHandler.invoke(TokenAuthenticationInvocationHandler.java:69) at com.sun.proxy.$Proxy2277.updatePage(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.xmlrpc.Invoker.execute(Invoker.java:130) at org.apache.xmlrpc.XmlRpcWorker.invokeHandler(XmlRpcWorker.java:84) {code}
    via by Doug Balmer,
    • java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String at com.atlassian.confluence.rpc.xmlrpc.XmlRpcUtils.convertLong(XmlRpcUtils.java:53) at com.atlassian.confluence.rpc.xmlrpc.XmlRpcUtils.createRemotePageFromPageStruct(XmlRpcUtils.java:21) at com.atlassian.confluence.rpc.xmlrpc.ConfluenceXmlRpcHandlerImpl.updatePage(ConfluenceXmlRpcHandlerImpl.java:442) at sun.reflect.GeneratedMethodAccessor1182.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.atlassian.confluence.rpc.auth.TokenAuthenticationInvocationHandler.invokeAuthenticatedMethod(TokenAuthenticationInvocationHandler.java:93) at com.atlassian.confluence.rpc.auth.TokenAuthenticationInvocationHandler.invoke(TokenAuthenticationInvocationHandler.java:69) at com.sun.proxy.$Proxy2277.updatePage(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.xmlrpc.Invoker.execute(Invoker.java:130) at org.apache.xmlrpc.XmlRpcWorker.invokeHandler(XmlRpcWorker.java:84)
    No Bugmate found.