On two different Confluence installations (one 5.1.5 and one 5.3.4) we're experiencing a very strange problem with Custom Space PDF Export: when you select "Custom Export" and the page tree is fetched with Ajax, an IllegalArgumentException is thrown and the following screen is shown:
The stack trace of the exception is this: stacktrace.txt
Interesting is this: when we delete the cache directories from the [confluence-data] directory (plugins-cache, osgi-cache, ...) the problem is solved temporarily. But after some time it reoccurs.
I started the system in debug mode and I actually digged my way into the XWork source code. The final piece of code is in DefaultActionInvocation.invokeAction:
private String invokeAction(Action action, ActionConfig actionConfig) throws Exception { // ... try { Method method = actionConfig.getMethod(); if (action instanceof Proxy) { // ... } else { return (String) method.invoke(action, new Object[0]); } } catch (NoSuchMethodException e) { // ... }
The method.invoke statement throws the exception. In here, I inspected a bit and got the following:
// IllegalArgumentException: method.invoke(action, new Object[0]); // "success" action.getClass().getMethod("doContentTree").invoke(action) // false action.getClass().getMethod("doContentTree") == method
I'm guessing that something is wrong with the cached doContentTree method in the actions ActionConfig. We're also wondering why an empty Object array is passed as second argument to method.invoke, and why the argument is not left empty.
The docs of Method.invoke say that an IllegalArgumentException is thrown in the following cases:
* @exception IllegalArgumentException if the method is an * instance method and the specified object argument * is not an instance of the class or interface * declaring the underlying method (or of a subclass * or implementor thereof); if the number of actual * and formal parameters differ; if an unwrapping * conversion for primitive arguments fails; or if, * after possible unwrapping, a parameter value * cannot be converted to the corresponding formal * parameter type by a method invocation conversion.
Any help appreciated!
Community moderators have prevented the ability to post new answers.
3years later, i stumbled in this issue. Confluence 5.8.8, flying-pdf plugin version 3.3.4.
I fixed it but duplicating the functionality but through rest. Nothing fancy, just works.
Can find plugin here: https://github.com/chmod/pdffix
Please note that there exists a JIRA issue covering this bug: CONF-33659: Exporting space content via Custom Pdf Export results in IllegalArgumentException
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No ideas? I'm sure there must be some developers out there who faced a similar problem :(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.