Hey,
i’m working with XWiki Debian 11.5 and updated it recently to this version. Since then all my XWiki.JavaScriptExtensions and XWiki.StyleSheetExtensions are not loaded anymore. They are set to be working on the whole wiki. I do have admin rights. Nevertheless they do work, if they are set to page level. Also some image-attachments are not loaded properly (500 Internal Server Error) since the update. But theses images are loaded and shown in the exported pdf document via pdf exporter.
Sorry to hear that.
I’ve just tested on 11.5 with a stylesheet skin extension and it worked fine.
Could you provide more info? Also could you check the xwiki logs to see if there’s anything amiss?
Thanks
Looks a lot like the author of those pages does not have admin right anymore for some reason.
Iam searching the log file right now.
I guess the author does have admin rights on that page. If i enter
{{velocity}}
$hasadmin
{{/velocity}}
the boolean true is shown.
my wikistructur:
Wiki
->Subpages
->->Subpages
(extensions are stored here)
->->->SubSubpages
(extensions not working here)
my logs are full with the following messages:
2019-07-17 08:58:19,582 [http://mywiki/] WARN o.x.v.i.DefaultVelocityEngine - Deprecated usage of getter [com.xpn.xwiki.api.DeprecatedContext.getMacro] in 735:mywiki.WebHome@27,10
2019-07-17 08:58:19,614 [http://mywiki/] WARN o.x.v.i.DefaultVelocityEngine - Deprecated usage of getter [com.xpn.xwiki.api.DeprecatedContext.getMacro] in 735:mywiki.WebHome@27,10
2019-07-17 08:58:19,628 [http://mywiki/] ERROR o.x.r.i.m.v.VelocityMacro - Can't find velocity macro filter
org.xwiki.component.manager.ComponentLookupException: Can't find descriptor for the component with type [interface org.xwiki.rendering.macro.velocity.filter.VelocityMacroFilter] and hint [code]
at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:212)
Any help is appreciated
This is the right of the current user so it does not really show anything unless you are sure the current user is the author of those pages.
You are right. But i set up a new site where the author (me) has admin rights. Still my extensions are not loaded.
I have to admit, i dont know what iam looking at - here some more logs:
2019-07-17 09:25:01,327 [localhost-startStop-1] ERROR .i.DefaultExtensionInitializer - Failed to initialize local extension [org.xwiki.platform:xwiki-platform-watchlist-ui/11.4]
org.xwiki.extension.ExtensionException: Failed to initialize dependency [org.xwiki.platform:xwiki-platform-watchlist-api-11.4]
at org.xwiki.extension.handler.internal.DefaultExtensionInitializer.initializeExtensionInNamespace(DefaultExtensionInitializer.java:195)
at org.xwiki.extension.handler.internal.DefaultExtensionInitializer.initializeExtensionInNamespace(DefaultExtensionInitializer.java:161)
at org.xwiki.extension.handler.internal.DefaultExtensionInitializer.initializeExtension(DefaultExtensionInitializer.java:127)
at org.xwiki.extension.handler.internal.DefaultExtensionInitializer.initialize(DefaultExtensionInitializer.java:105)
at org.xwiki.extension.handler.internal.DefaultExtensionInitializer.initialize(DefaultExtensionInitializer.java:81)
at org.xwiki.component.embed.InitializableLifecycleHandler.handle(InitializableLifecycleHandler.java:39)
at org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:365)
at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:189)
at org.xwiki.container.servlet.XWikiServletContextListener.contextInitialized(XWikiServletContextListener.java:120)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4841)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5265)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:581)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1685)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.xwiki.extension.InstallException: Failed to initialize extension [org.xwiki.platform:xwiki-platform-watchlist-api/11.4]
at org.xwiki.extension.handler.internal.DefaultExtensionHandlerManager.initialize(DefaultExtensionHandlerManager.java:156)
at org.xwiki.extension.handler.internal.DefaultExtensionInitializer.initializeExtensionInNamespace(DefaultExtensionInitializer.java:202)
at org.xwiki.extension.handler.internal.DefaultExtensionInitializer.initializeExtensionInNamespace(DefaultExtensionInitializer.java:161)
at org.xwiki.extension.handler.internal.DefaultExtensionInitializer.initializeExtensionInNamespace(DefaultExtensionInitializer.java:189)
... 23 common frames omitted
Caused by: org.xwiki.extension.InstallException: Failed to load jar file components
at org.xwiki.extension.jar.internal.handler.JarExtensionHandler.loadComponents(JarExtensionHandler.java:241)
at org.xwiki.extension.jar.internal.handler.JarExtensionHandler.install(JarExtensionHandler.java:165)
at org.xwiki.extension.jar.internal.handler.JarExtensionHandler.initialize(JarExtensionHandler.java:143)
at org.xwiki.extension.handler.internal.DefaultExtensionHandlerManager.initialize(DefaultExtensionHandlerManager.java:154)
... 26 common frames omitted
Caused by: java.lang.RuntimeException: Failed to get interface for [org.xwiki.watchlist.internal.ActivityEventWatchListEventConverter]
at org.xwiki.component.annotation.ComponentAnnotationLoader.getGenericInterfaces(ComponentAnnotationLoader.java:403)
at org.xwiki.component.annotation.ComponentAnnotationLoader.findComponentRoleTypes(ComponentAnnotationLoader.java:324)
at org.xwiki.component.annotation.ComponentAnnotationLoader.findComponentRoleTypes(ComponentAnnotationLoader.java:308)
at org.xwiki.component.annotation.ComponentAnnotationLoader.getComponentsDescriptors(ComponentAnnotationLoader.java:169)
at org.xwiki.component.annotation.ComponentAnnotationLoader.register(ComponentAnnotationLoader.java:217)
at org.xwiki.component.annotation.ComponentAnnotationLoader.initialize(ComponentAnnotationLoader.java:138)
at org.xwiki.extension.jar.internal.handler.JarExtensionHandler.loadComponents(JarExtensionHandler.java:227)
... 29 common frames omitted
Maybe this is something:
2019-07-15 09:14:06,982 [http://mywiki/WebHome?language=de&docVersion=38.4] WARN c.x.x.w.s.JsExtension - Failed to compress JS extension: null
As i mentioned serveral images are not loaded properly. I tried to reinclude them in the specific page, but this caused some strange behavoir:
I navigate to the wiki page were the image is missing.
I edit the page with wysiwyg editor and chose to reimport the image via the toolbar
The image, thats missing is already selected
I reselect the image and hit okay
The image is shown in the wysiwyg editor
I hit save OR preview
The image is missing
I got the following messages from the log:
2019-07-17 10:30:29,248 [http://mywiki/myimage.png?width=1000&rev=1.1] WARN c.x.x.w.XWikiAction - Uncaught exception: Error number 0 in 11: Uncaught exception
com.xpn.xwiki.XWikiException: Error number 0 in 11: Uncaught exception
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:524)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:215)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:112)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:109)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:132)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:498)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:537)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1081)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658)
at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1580)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1537)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException: null
at com.xpn.xwiki.doc.XWikiAttachment.getLatestStoredVersion(XWikiAttachment.java:923)
at com.xpn.xwiki.doc.XWikiAttachment.reloadAttachmentContent(XWikiAttachment.java:894)
at com.xpn.xwiki.doc.XWikiAttachment.getContentInputStream(XWikiAttachment.java:880)
at com.xpn.xwiki.web.DownloadAction.sendContent(DownloadAction.java:303)
at com.xpn.xwiki.web.DownloadAction.render(DownloadAction.java:183)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:497)
... 44 common frames omitted
Also i created a new wiki in a multiwiki enviroment (iam the owner)
created an new page
created a stylesheet extension
set the stylesheet extension to page level (working)
set the stylesheet extension to wiki level (NOT working)
I believe i am missing programming rights. could this have some impact on the extensions?
Okay finally, I found a solution. Still, it is a bit strange. We got a multi wiki environment. I have admin rights for one of the sub wikis, which includes some Stylesheet and JavaScript extensions. These did not work on the wiki level only on page level. After I got admin rights / programming rights for the ROOT wiki and saved my extensions again to wiki level everything worked fine. But now i have admin rights for the ROOT wiki, this is not intended. I should only have admin rights of my sub wiki and my extensions should work, but that’s not the case.
Nevertheless, thank you for your help and have a nice day.
PR are required only if the scope is global. For a “wiki” scope only Admin rights is required. It means the last author of the doc needs to have Admin rights when the doc is saved.