This is what I see in the logs:
2019-05-03 13:49:28,434 [main] WARN .o.i.DefaultObservationManager - The [com.xpn.xwiki.plugin.activitystream.internal.RecordableEventListener] listener is overwriting a previously registered listener [org.xwiki.eventstream.store.internal.RecordableEventListener] since they both are registered under the same id [RecordableEventListener]. In the future consider removing a Listener first if you really want to register it again.
2019-05-03 13:49:30,336 [main] INFO o.x.o.i.s.DefaultOfficeServer - Open Office instance started.
2019-05-03 13:49:30,352 [main] ERROR .o.i.DefaultObservationManager - Failed to send event [org.xwiki.observation.event.ApplicationStartedEvent@40e41f88] to listener [com.xpn.xwiki.plugin.activitystream.internal.ActivityStreamMappingInitializer@27b7913]
java.lang.NullPointerException: null
at org.hibernate.cfg.Configuration.add(Configuration.java:720)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:756)
at com.xpn.xwiki.plugin.activitystream.internal.ActivityStreamMappingInitializer.loadMappingFile(ActivityStreamMappingInitializer.java:71)
at com.xpn.xwiki.plugin.activitystream.internal.ActivityStreamMappingInitializer.onEvent(ActivityStreamMappingInitializer.java:65)
at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:309)
at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:274)
at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:326)
at org.xwiki.container.servlet.XWikiServletContextListener.contextInitialized(XWikiServletContextListener.java:126)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4668)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5136)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:713)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:695)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1133)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1868)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1045)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:429)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1577)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:929)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:831)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:423)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:928)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Catalina.start(Catalina.java:638)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
In 11.1, I only saw this line in the log:
2019-04-16 14:42:31,676 [main] WARN .o.i.DefaultObservationManager - The [com.xpn.xwiki.plugin.activitystream.internal.RecordableEventListener] listener is overwriting a previously registered listener [org.xwiki.eventstream.store.internal.RecordableEventListener] since they both are registered under the same id [RecordableEventListener]. In the future consider removing a Listener first if you really want to register it again.
I see this behavior in 2 different instances (both were upgraded from from 11.1 to 11.3).
Is this expected, or is there something I can do to resolve this error?
Thanks
Bill
Check the release notes for 11.2:
Side note: it’s always important to read all the release notes between your version and the version you’re upgrading to, especially the part that lists issues…
EDIT: Forgot to mention that my guess is that you still have the activitystream mapping in your hibernate.cfg.xml file
Hello Vincent,
Thank you. I am always very careful to diff the older and upgrade versions before deploying. The activitystream
mapping is not present in the hibernate.cfg.xml
file in either instance.
Any other ideas?
Thanks!
Bill
Hi Bill. In your logs you have:
2019-05-03 13:49:30,352 [main] ERROR .o.i.DefaultObservationManager - Failed to send event [org.xwiki.observation.event.ApplicationStartedEvent@40e41f88] to listener [com.xpn.xwiki.plugin.activitystream.internal.ActivityStreamMappingInitializer@27b7913]
This suggests you have the activitystream plugin defined in xwiki.cfg (in the plugins
property). Can you check?
Hello Vincent,
I believe you are correct – I removed the lines from the other unused portions of the file, but maybe not from the active portion. I will be able to check this next week.
Thanks!
Bill
It also suggests that you have the activitystream plugin somewhere in WEB-INF/lib
which is not normal and wrong. This may mean a bad upgrade of the WAR with some copy over some older install?
Thank you Vincent. My PostgreSQL configuration section in hibernate.cfg.xml
is the following:
<property name="connection.url">jdbc:postgresql://localhost:5432/xwiki?gsslib=auto</property>
<!-- <property name="connection.username">xwiki</property> -->
<!-- <property name="connection.password">xwiki</property> -->
<property name="connection.driver_class">org.postgresql.Driver</property>
<property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
<property name="jdbc.use_streams_for_binary">false</property>
<property name="xwiki.virtual_mode">schema</property>
<property name="hibernate.connection.charSet">UTF-8</property>
<property name="hibernate.connection.useUnicode">true</property>
<property name="hibernate.connection.characterEncoding">utf8</property>
<mapping resource="xwiki.postgresql.hbm.xml"/>
<mapping resource="feeds.hbm.xml"/>
<mapping resource="instance.hbm.xml"/>
<mapping resource="notification-filter-preferences.hbm.xml"/>
<mapping resource="mailsender.hbm.xml"/>
It does not contain the line <mapping resource="eventstream.hbm.xml"/>
.
Also, I can’t find any reference to activitystream
in my xwiki.cfg
file. The only differences between the 11.3 release version of xwiki.cfg
and my xwiki.cfg
are the following:
xwiki.authentication.group.allgroupimplicit=1
xwiki.store.cache.capacity=1000
xwiki.authentication.validationKey=<random string>
xwiki.authentication.encryptionKey=<random string>
…and a set of xwiki.authentication.ldap
settings. The string stream
does not occur in the file.
The string stream
does occur in xwiki.properties
, but all of those settings are commented out.
It also suggests that you have the activitystream plugin somewhere in WEB-INF/lib which is not normal and wrong. This may mean a bad upgrade of the WAR with some copy over some older install?
There are no files containing the string activitystream
in the WEB-INF/lib
directory. The files named stream in that directory are the following:
LastWriteTime Length Name
------------- ------ ----
2/16/2019 7:38 AM 2097 reactive-streams-1.0.2.jar
4/30/2019 10:27 AM 826 reactive-streams-1.0.2.xed
10/29/2018 8:38 PM 621071 xstream-1.4.11.1.jar
4/30/2019 10:27 AM 11262 xstream-1.4.11.1.xed
4/30/2019 9:06 AM 20378 xwiki-commons-filter-stream-xml-11.3.jar
4/30/2019 10:27 AM 25806 xwiki-commons-filter-stream-xml-11.3.xed
4/30/2019 9:41 AM 42905 xwiki-platform-eventstream-api-11.3.jar
4/30/2019 10:27 AM 36040 xwiki-platform-eventstream-api-11.3.xed
4/30/2019 9:58 AM 33873 xwiki-platform-eventstream-default-11.3.jar
4/30/2019 10:27 AM 35389 xwiki-platform-eventstream-default-11.3.xed
4/30/2019 10:04 AM 59588 xwiki-platform-eventstream-store-11.3.jar
4/30/2019 10:27 AM 36299 xwiki-platform-eventstream-store-11.3.xed
4/30/2019 9:41 AM 73106 xwiki-platform-filter-stream-xar-11.3.jar
4/30/2019 10:27 AM 35478 xwiki-platform-filter-stream-xar-11.3.xed
4/30/2019 10:12 AM 36703 xwiki-platform-messagestream-api-11.3.jar
4/30/2019 10:27 AM 36300 xwiki-platform-messagestream-api-11.3.xed
Any other ideas?
Thanks!
Bill
Can you paste the content of the plugins
property from xwiki.cfg
? You should not have the activitystream
plugin in it.
That’s very weird. The file is xwiki-platform-activitystream-api-<version>.jar
. Could you check if by any chance you’d have it in your xwiki permanent directory?
If not then it’s impossible since the stack trace shows it’s there
Can you paste the content of the plugins
property from xwiki.cfg
? You should not have the activitystream
plugin in it.
The plugins
property matches the same from the stock xwiki.cfg
file:
#-# List of active plugins.
xwiki.plugins=\
com.xpn.xwiki.monitor.api.MonitorPlugin,\
com.xpn.xwiki.plugin.skinx.JsSkinExtensionPlugin,\
com.xpn.xwiki.plugin.skinx.JsSkinFileExtensionPlugin,\
com.xpn.xwiki.plugin.skinx.JsResourceSkinExtensionPlugin,\
com.xpn.xwiki.plugin.skinx.CssSkinExtensionPlugin,\
com.xpn.xwiki.plugin.skinx.CssSkinFileExtensionPlugin,\
com.xpn.xwiki.plugin.skinx.CssResourceSkinExtensionPlugin,\
com.xpn.xwiki.plugin.skinx.LinkExtensionPlugin,\
com.xpn.xwiki.plugin.feed.FeedPlugin,\
com.xpn.xwiki.plugin.mail.MailPlugin,\
com.xpn.xwiki.plugin.packaging.PackagePlugin,\
com.xpn.xwiki.plugin.svg.SVGPlugin,\
com.xpn.xwiki.plugin.fileupload.FileUploadPlugin,\
com.xpn.xwiki.plugin.image.ImagePlugin,\
com.xpn.xwiki.plugin.diff.DiffPlugin,\
com.xpn.xwiki.plugin.rightsmanager.RightsManagerPlugin,\
com.xpn.xwiki.plugin.jodatime.JodaTimePlugin,\
com.xpn.xwiki.plugin.scheduler.SchedulerPlugin,\
com.xpn.xwiki.plugin.mailsender.MailSenderPlugin,\
com.xpn.xwiki.plugin.tag.TagPlugin,\
com.xpn.xwiki.plugin.zipexplorer.ZipExplorerPlugin
The file is xwiki-platform-activitystream-api-<version>.jar
. Could you check if by any chance you’d have it in your xwiki permanent directory?
Ah, yes. Files with names containing the string ‘stream’ do appear in the permanent directory, as follows:
extension/repository/org%2Exwiki%2Eplatform%3Axwiki-platform-activitystream-api
extension/repository/org%2Exwiki%2Eplatform%3Axwiki-platform-activitystream-api/11%2E1/org%2Exwiki%2Eplatform%3Axwiki-platform-activitystream-api-11%2E1.jar
extension/repository/org%2Exwiki%2Eplatform%3Axwiki-platform-activitystream-api/11%2E1/org%2Exwiki%2Eplatform%3Axwiki-platform-activitystream-api-11%2E1.xed
extension/repository/org%2Exwiki%2Eplatform%3Axwiki-platform-activitystream-api/11%2E3/org%2Exwiki%2Eplatform%3Axwiki-platform-activitystream-api-11%2E3.jar
extension/repository/org%2Exwiki%2Eplatform%3Axwiki-platform-activitystream-api/11%2E3/org%2Exwiki%2Eplatform%3Axwiki-platform-activitystream-api-11%2E3.xed
extension/repository/org%2Exwiki%2Eplatform%3Axwiki-platform-activitystream-ui
extension/repository/org%2Exwiki%2Eplatform%3Axwiki-platform-activitystream-ui/10%2E8/org%2Exwiki%2Eplatform%3Axwiki-platform-activitystream-ui-10%2E8.xar
extension/repository/org%2Exwiki%2Eplatform%3Axwiki-platform-activitystream-ui/10%2E8/org%2Exwiki%2Eplatform%3Axwiki-platform-activitystream-ui-10%2E8.xed
extension/repository/org%2Exwiki%2Eplatform%3Axwiki-platform-activitystream-ui/10%2E8%2E1/org%2Exwiki%2Eplatform%3Axwiki-platform-activitystream-ui-10%2E8%2E1.xar
extension/repository/org%2Exwiki%2Eplatform%3Axwiki-platform-activitystream-ui/10%2E8%2E1/org%2Exwiki%2Eplatform%3Axwiki-platform-activitystream-ui-10%2E8%2E1.xed
extension/repository/org%2Exwiki%2Eplatform%3Axwiki-platform-messagestream-ui
extension/repository/org%2Exwiki%2Eplatform%3Axwiki-platform-messagestream-ui/10%2E10/org%2Exwiki%2Eplatform%3Axwiki-platform-messagestream-ui-10%2E10.xar
extension/repository/org%2Exwiki%2Eplatform%3Axwiki-platform-messagestream-ui/10%2E10/org%2Exwiki%2Eplatform%3Axwiki-platform-messagestream-ui-10%2E10.xed
extension/repository/org%2Exwiki%2Eplatform%3Axwiki-platform-messagestream-ui/10%2E11/org%2Exwiki%2Eplatform%3Axwiki-platform-messagestream-ui-10%2E11.xar
extension/repository/org%2Exwiki%2Eplatform%3Axwiki-platform-messagestream-ui/10%2E11/org%2Exwiki%2Eplatform%3Axwiki-platform-messagestream-ui-10%2E11.xed
extension/repository/org%2Exwiki%2Eplatform%3Axwiki-platform-messagestream-ui/10%2E8/org%2Exwiki%2Eplatform%3Axwiki-platform-messagestream-ui-10%2E8.xar
extension/repository/org%2Exwiki%2Eplatform%3Axwiki-platform-messagestream-ui/10%2E8/org%2Exwiki%2Eplatform%3Axwiki-platform-messagestream-ui-10%2E8.xed
extension/repository/org%2Exwiki%2Eplatform%3Axwiki-platform-messagestream-ui/10%2E8%2E1/org%2Exwiki%2Eplatform%3Axwiki-platform-messagestream-ui-10%2E8%2E1.xar
extension/repository/org%2Exwiki%2Eplatform%3Axwiki-platform-messagestream-ui/10%2E8%2E1/org%2Exwiki%2Eplatform%3Axwiki-platform-messagestream-ui-10%2E8%2E1.xed
extension/repository/org%2Exwiki%2Eplatform%3Axwiki-platform-messagestream-ui/10%2E9/org%2Exwiki%2Eplatform%3Axwiki-platform-messagestream-ui-10%2E9.xar
extension/repository/org%2Exwiki%2Eplatform%3Axwiki-platform-messagestream-ui/10%2E9/org%2Exwiki%2Eplatform%3Axwiki-platform-messagestream-ui-10%2E9.xed
extension/repository/org%2Exwiki%2Eplatform%3Axwiki-platform-messagestream-ui/11%2E1/org%2Exwiki%2Eplatform%3Axwiki-platform-messagestream-ui-11%2E1.xar
extension/repository/org%2Exwiki%2Eplatform%3Axwiki-platform-messagestream-ui/11%2E1/org%2Exwiki%2Eplatform%3Axwiki-platform-messagestream-ui-11%2E1.xed
extension/repository/org%2Exwiki%2Eplatform%3Axwiki-platform-messagestream-ui/11%2E3/org%2Exwiki%2Eplatform%3Axwiki-platform-messagestream-ui-11%2E3.xar
extension/repository/org%2Exwiki%2Eplatform%3Axwiki-platform-messagestream-ui/11%2E3/org%2Exwiki%2Eplatform%3Axwiki-platform-messagestream-ui-11%2E3.xed
What is the next step?
Thanks!
Bill
Interestingly, the other server has a different set of files in the permanent directory whose names contain the string activitystream
:
extension/repository/org%2Exwiki%2Eplatform%3Axwiki-platform-activitystream-api
extension/repository/org%2Exwiki%2Eplatform%3Axwiki-platform-activitystream-api/11%2E1/org%2Exwiki%2Eplatform%3Axwiki-platform-activitystream-api-11%2E1.jar
extension/repository/org%2Exwiki%2Eplatform%3Axwiki-platform-activitystream-api/11%2E1/org%2Exwiki%2Eplatform%3Axwiki-platform-activitystream-api-11%2E1.xed
extension/repository/org%2Exwiki%2Eplatform%3Axwiki-platform-activitystream-api/11%2E3/org%2Exwiki%2Eplatform%3Axwiki-platform-activitystream-api-11%2E3.jar
extension/repository/org%2Exwiki%2Eplatform%3Axwiki-platform-activitystream-api/11%2E3/org%2Exwiki%2Eplatform%3Axwiki-platform-activitystream-api-11%2E3.xed
To summarize: On one of the two servers upgraded from 11.1 to 11.3, I have files named activitystream-api
and activitystream-ui
in the permanent directory, but on the other server, I only have files named activitystream-api
in the permanent directory.
Let me know if you need any other information, and also how we can resolve the error.
Thanks!
Bill
Greetings,
Does anyone know how we can resolve this error in our 11.3 instances? Do we remove files from the permanent directory?
Thanks!
Bill
In the 11.1 release notes (https://www.xwiki.org/xwiki/bin/view/ReleaseNotes/Data/XWiki/11.1/) in the section titled Introduction of the Event Stream Store, I read the following:
The Activity Stream and Watchlist features have been replaced by the Notifications feature back in XWiki 10.9. However, for technical reasons, we were still using the old Activity Stream store. We have now removed it in favor of a new Event Stream Store.
I have the Activity Stream Plugin extension installed, but it is listed as required by the Watchlist API extension, which in turn is required by the Watchlist Application extension.
Can I simply uninstall the Activity Stream Plugin extension, or will this break other things?
Thanks!
Bill
Hi @bstewart
I think you should remove the Activity Stream Plugin using the Extension Manager in your wiki. You can also remove the Watchlist Application since both have been superseded by the new Notifications feature.
Nope, it’s fine!
1 Like
Thank you Vincent!
Does this mean I should also delete the jobs in the job scheduler named WatchList?
Thanks!
Bill
Yes you could remove them, they’re not used (unless you want to disable notifications and go back to using the Watchlist).
I think we have a jira for handling this automatically but I can’t find it and it’s not yet implemented anyway.
https://jira.xwiki.org/browse/XWIKI-16204
EDIT: it’s already implemented in 11.3RC1 and since you’re on 11.3 I don’t know why you didn’t get the migration applied…
Could it be that you installed the Watchlist app AFTER you upgraded to 11.3? Installing that app will bring the jobs again in your wiki.
Could it be that you installed the Watchlist app AFTER you upgraded to 11.3?
From my extension history it appears that is in fact what happened, but this seems to have been part of the upgrade process because I didn’t take that action manually.
Thank you Vincent. I removed Watchlist Application and Activity Stream Plugin extensions and deleted the WatchList jobs from the scheduler. This cleared up all of the errors in the log file. Thank you!