Hello,
We are after RedHat OS migration from v7.9 to 8.9 which also brought MySQL migration from 5.7 to v8.
We have two installations of XWiki (on the same host) used with the latest Tomcat v9, the test instance is at v14.7, production is at v12.2.1. Both uses the same DB service with their own dedicated databases. After migration they have the same JDBC configuration, they have difference only on credentials.
After this migration, we have faced with the issue of not starting of our test instance, after some investigation we found that default java has been replaced from OpenJDK 11.0.23+9 to 1.8.0_412-b08. We have directed this instance to use 11.0.23+9 again, but still not worked, so we have cleared cache by remove (rename…) data/cache folder of the instance.
Since then it seems better at startup time but get error when it tries to check if it needs database migration, it fails to get the current DB version. The database version (xwikidbversion table) is able to reach manually with the credentials. The requests for the site get 404.
In the localhost log we also get the following error stack:
12-Jun-2024 08:52:35.916 SEVERE [main] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class [org.xwiki.container.servlet.XWikiServletContextListener]
java.lang.IncompatibleClassChangeError: class net.java.truevfs.kernel.impl.DefaultManagerFactory has interface net.java.truevfs.kernel.spec.spi.FsManagerFactory as super class
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1022)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:555)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:594)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:527)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:398)
What could be the next step on investigation or do you have any ideas to step forward? Until it has issues with requesting DB version, we don’t think application migration could be a correct step.
Thanks in advance,
Peter.
Do you have a bit more around that error ? It would be interesting to see what exactly is trying to use net.java.truevfs.kernel.impl.DefaultManagerFactory
.
Not really…
We have this in catalina out:
12-Jun-2024 08:52:35.916 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
12-Jun-2024 08:52:35.919 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal Context [/xwiki] startup failed due to previous errors
12-Jun-2024 08:52:36.110 WARNING [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [xwiki] registered the JDBC driver [org.apache.calcite.jdbc.Driver] but failed to unregister it when the web
application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
12-Jun-2024 08:52:36.110 WARNING [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [xwiki] registered the JDBC driver [org.apache.solr.handler.sql.CalciteSolrDriver] but failed to unregister
it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
and this is the full stack for the error mentioned above:
12-Jun-2024 08:52:35.916 SEVERE [main] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class [org.xwiki.container.servlet.XWikiServletContextListener]
java.lang.IncompatibleClassChangeError: class net.java.truevfs.kernel.impl.DefaultManagerFactory has interface net.java.truevfs.kernel.spec.spi.FsManagerFactory as super class
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1022)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:555)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:594)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:527)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:398)
at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.nextProviderClass(ServiceLoader.java:1210)
at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1221)
at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1265)
at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1300)
at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1385)
at java.base/java.lang.Iterable.forEach(Iterable.java:74)
at global.namespace.service.wight.core.ServiceLocator.providers(ServiceLocator.java:121)
at global.namespace.service.wight.core.ServiceLocator.provider(ServiceLocator.java:115)
at global.namespace.service.wight.core.ServiceLocator.provider(ServiceLocator.java:110)
at net.java.truevfs.kernel.spec.sl.FsManagerLocator$Lazy.<clinit>(FsManagerLocator.java:40)
at net.java.truevfs.kernel.spec.sl.FsManagerLocator.get(FsManagerLocator.java:35)
at net.java.truevfs.access.TConfig.<init>(TConfig.java:246)
at net.java.truevfs.access.TConfig.<clinit>(TConfig.java:208)
at org.xwiki.vfs.internal.VfsAttachDriverRegistrationListener.initialize(VfsAttachDriverRegistrationListener.java:99)
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.getInstanceMap(EmbeddableComponentManager.java:242)
at org.xwiki.component.embed.EmbeddableComponentManager.getInstanceList(EmbeddableComponentManager.java:225)
at org.xwiki.observation.internal.DefaultObservationManager.initializeListeners(DefaultObservationManager.java:166)
at org.xwiki.observation.internal.DefaultObservationManager.getListenersByEvent(DefaultObservationManager.java:132)
at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:283)
at org.xwiki.component.internal.StackingComponentEventManager.sendEvent(StackingComponentEventManager.java:151)
at org.xwiki.component.internal.StackingComponentEventManager.flushEvents(StackingComponentEventManager.java:92)
at org.xwiki.container.servlet.XWikiServletContextListener.contextInitialized(XWikiServletContextListener.java:133)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4462)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4914)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:683)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:658)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:661)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1175)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1888)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1086)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1584)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:312)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:114)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:345)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:893)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:794)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1332)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1322)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:866)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:248)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:433)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:925)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
at org.apache.catalina.startup.Catalina.start(Catalina.java:735)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:345)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:476)
Ha net.java.truevfs.kernel.impl.DefaultManagerFactory
is not actually a Java standard class, it’s part of truevfs.
You sure the only thing that changed is the system and Java version (but still the same major Java version from what I understand)?
This error suggests that the JAR files truevfs-kernel-spec-.jar and truevfs-kernel-impl-.jar don’t match each other anymore. Those are not bundle in XWiki Standard by default (even if xwiki-platform-vfs-api is a standard module, the feature it bring is not included by default).
Do you remember if you need it ? If you don’t need it you could try to remove any folder (extension) which contains “vfs” in the name in data/extension/repository
(even if you do need it you could always reinstall it anyway).
Thank you, we have deleted these classes, now it starts. We will reinstall the VFS-API extension if needed.
We suspect that - as I mentioned - we had a java8 detour maybe it mixed up something or maybe as both truevfs v12.2 and 14.0 were present, the autoloader could use some different method in using wildcards.
Anyway, thanks, it starts up now fine.