Return to Jive Software

Skip navigation
1,624 Views 5 Replies Last post: Nov 4, 2009 3:16 PM by kevin.imber RSS
timcolson Novice 30 posts since
May 25, 2007
Currently Being Moderated

Oct 9, 2009 12:54 PM

Jive Forums bug in moveForums() remote API method?

Last night I tried in vain to use the remote API in Jive Forums 5.5.19 to move a Forum to a different Category.

 

In the Jive Web Services Developer Guide the Forum Service has a moveForums method that takes to long IDs:

 

moveForums  -   Move the forum with the specified ID to the category with the specified ID.

 

There is another method to "mergeForums()" and I'm using that just fine.

 

moveForums( F, C) ... Jive throws an exception from "Forum F is not in category C"....

 

Yeah, I know that, that's the category I want to move it to...so, move it!

The category does exist. If I try a category for C that does not, I get an (expected) error that the category is not found.

 

Exception in thread "main" org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Forum 1686 is not in category 262

org.codehaus.xfire.fault.XFireFault: Forum 1686 is not in category 262

at org.codehaus.xfire.fault.Soap11FaultSerializer.readMessage(Soap11FaultSerializer.java:31)

at org.codehaus.xfire.fault.SoapFaultSerializer.readMessage(SoapFaultSerializer.java:28)

at org.codehaus.xfire.soap.handler.ReadHeadersHandler.checkForFault(ReadHeadersHandler.java:111)

at org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHandler.java:67)

at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)

at org.codehaus.xfire.client.Client.onReceive(Client.java:382)

at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:139)

at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)

at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)

at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)

at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:75)

at org.codehaus.xfire.client.Client.invoke(Client.java:335)

at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)

at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)

at $Proxy4.moveForums(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:597)

at com.jivesoftware.forum.webservices.ServiceLocator$ExceptionHandler.invoke(ServiceLocator.java:381)

at $Proxy4.moveForums(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:597)

at com.jivesoftware.forum.webservices.ServiceLocator$CacheHandler.invoke(ServiceLocator.java:522)

at $Proxy5.moveForums(Unknown Source)

 

For fun, I also tried changing the order of the arguments - moveForums( C, F)... Jive says "Forum C not found", totally expected that.

 

As a workaround, I tried to just get the Forum f, set the category ID manually with f. setCategory(C) and then forumSvc.updateForum(f).

 

That works great for setting the name (i.e. to rename the forum), but oddly, it fails with the exact same stack track as above.

 

import com.jivesoftware.forum.webservices

 

ForumService forumSvc; // injected and known to work for mergeForums(id,id)

 

// Fails as described above...

forumSvc.moveForums( forumID, catID);

 

// Fails to actually update the forum

Forum f = forumSvc.getForum((long)forumID);

Long oldCatID = f.getCategoryID();

f.setCategoryID(destinationCategoryID);

forumSvc.updateForum(f);

 

 

 

I'm bummed. I have thousands of forums (yes, really, and please don't ask why) that I need to merge and move. Ever tried doing this with a 5,000 item drop-down in the Admin UI? Nah, I'm sure you haven't. Take it from me, it's not pretty. If the remote API "moveForums()" would work as advertised, I'm happy.

 

I don't know what's going on. Ideas? Anybody at Jive able to have a quick peek at the source for this and/or tell me if this is a known issue that might be fixed in a patch I don't have installed? :-)

 

 

-Tim

kevin.imber Jive Employee 2,726 posts since
Oct 19, 2009
Currently Being Moderated
Nov 4, 2009 3:16 PM in response to: timcolson
Re: Jive Forums bug in moveForums() remote API method?

Hey Tim,

 

I'm glad that you figured this out.  Let me know if you have any other questions.

 

Thanks,

Kevin

More Like This

  • Retrieving data ...

Bookmarked By (0)

To better serve our customers we have included functionality to automatically follow up on a case after it has been idle for more than 5 days, and then auto close after an additional 3 days of inactivity. Choose No to acknowledge that this case will remain idle for longer than 5 days.
Making cases public allows other customers to learn from the solution of the case. It can also be used to gain feedback from others in the community. Ask our Support Engineers for more info, but we encourage you to make your cases public.