Thanks for the additional information. To confirm, the image placeholder is pointing to an internal URL and still showing “Blocked URL”? You’re correct, in that case the image shouldn’t be blocked.
Are you seeing any errors in the logs that you’d be able to share when you attempt to export to the page to a PDF? Any more information you could provide to help us reproduce this issue would help and we’ll keep an eye on the issue as requested.
Unable to reproduce this one on our end and nothing notable has changed with respect to this functionality in m132. This could potentially occur if there is a plugin bundling its own copy of commons-lang3.
@Kusal could you add java.util.ImmutableCollections$ListN#isEmpty() the global allowlist?
This could probably be the case for several / all of the methods for ImmutableCollections.
Hi @Kusal , could you assist on this issues for us seem like the dom4j is in the list of grey api removal for third party library, we have no choice now, we did add the dom4j dependency as a compile scope and after that we did encounter castException like below when the plugin app execute DocumentHelper.parseText(descriptorXml).getRootElement(); Is this is due to the DocumentFactory is implement as a singleton class and system bundle did’t expose this?
Caused by: java.lang.ClassCastException: class org.dom4j.DocumentFactory cannot be cast to class org.dom4j.DocumentFactory (org.dom4j.DocumentFactory is in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @33dc9660; org.dom4j.DocumentFactory is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @6b7e1d49)
at org.dom4j.DocumentFactory.getInstance(DocumentFactory.java:92)
at org.dom4j.io.SAXReader.getDocumentFactory(SAXReader.java:667)
at org.dom4j.io.SAXReader.createContentHandler(SAXReader.java:948)
at org.dom4j.io.SAXReader.read(SAXReader.java:478)
However, I can’t find info about it being deprecated or how to replace it. Any hints would be much appreciated!
Adding more context:
org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getGetStartedLink' in class our-app-class.GlobalSettingsAction threw exception java.lang.NoSuchMethodError: 'com.atlassian.confluence.status.service.SystemInformationService our-app-class.AdminSettingsAction.getSystemInformationService()' at /templates/includes/version.vm[line 12, column 25]
at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:356)
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:284)
at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262)
at org.apache.velocity.runtime.parser.node.ASTReference.evaluate(ASTReference.java:470)
at org.apache.velocity.runtime.parser.node.ASTExpression.evaluate(ASTExpression.java:62)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:85)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
at org.apache.velocity.runtime.directive.Parse.render(Parse.java:263)
[...]
We’ve used -Datlassian.velocity.method.allowlist.debug=true to make sure it’s not an allowlist issue, but it did not make a difference.
That’s not due to Velocity allowlist, but rather that method getGetStartedLink does not exist in your GlobalSettingsAction. Indeed, the name getGetStartedLink sounds odd; surely it should be getStartedLink, without the 2nd get, yes? Check your code; I suspect a bug on your end there.
We’re having issues moving over to the new API interfaces for webfragments, we swapped over to the new interface, but this doesn’t seem to work at runtime:
org.apache.velocity.exception.MethodInvocationException: Invocation of method ‘getDisplayableWebPanels’ in class com.atlassian.confluence.impl.plugin.web.readonly.ReadOnlyWebInterfaceManager threw exception java.lang.ClassCastException: class com.onresolve.scriptrunner.fragments.ScriptRunnerWebPanel cannot be cast to class com.atlassian.plugin.web.model.WebPanel (com.onresolve.scriptrunner.fragments.ScriptRunnerWebPanel is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @10c742b; com.atlassian.plugin.web.model.WebPanel is in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @3c83468e) at template/includes/macros.vm[line 1402, column 49]
Another issue we have is that we need to access <param> attributes from WebPanel, but I don’t see a way to do this from the current API
Use case is we’re migrating everything to XML registration, but in ScriptRunner we need to be able to pass a user script as an XML attribute, that the web panel can then execute/render.
All ModuleDescriptors have the #getParams() method and all WebFragments have the #getParams() method, both return Map<String, String> which comes from <param key="the-key" value="the-value" />, but …
Is this the script to generate the HTML or a JS script that the panel includes via the WRM? Sorry, I can’t really tell, so I’m not sure what to advise.
Indeed, the name getGetStartedLink sounds odd; surely it should be getStartedLink , without the 2nd get , yes?
It does sound odd, but the method name is indeed getGetStartedLink, because it’s supposed to get the url that the “Get Started” button links to.
In the meantime, we’ve found out that our method uses com.atlassian.confluence.core.ConfluenceActionSupport.getSystemInformationService() which has been deprecated:
Deprecated, for removal: This API element is subject to removal in a future version.since 8.5.5, use thesystemInformationServiceprotected field directly when extending this class.
However, the systemInformationService protected field doesn’t exist in 7.x, and perhaps even pre 8.5.5 so we need to implement some kind of internal abstraction layer unless there is something available in the confluence-compat-lib which I haven’t checked yet.
We’re running into the same problem. Looks like it is impossible to use the web panel module type for 3rd party apps on Confluence 9.0.0-beta2.
@mkemp I have not tried to reproduce with a minimal code example, but it should be as trivial as:
Create an app that can only use the public API (not com.atlassian namespace in plugin key, or whatever your secret is )
Add a webpanel module where the class implements the new com.atlassian.plugin.web.api.model.WebPanel interface (instead of the classic com.atlassian.plugin.web.model.WebPanel)
Try to install in beta2 and open a page where the webpanel is loaded
@ggautam This needs to be fixed as soon as possible. Please do not release 9.0.0 with this bug. It breaks most of our apps.
I have a test project made with the atlas-create-confluence-plugin to help me with working out some of the fragment changes. If you check out the main branch and follow the readme it should reproduce the ClassCastException we are getting.
Here is the repo
It runs 9.0.0-m132 at the moment but same thing happens on 9.0.0-beta2