未触发Openfire CallbackOnOffline插件[plugin.callback_on_offline.url]离线用户的URL

时间:2018-10-30 09:41:00

标签: xmpp openfire smack

Openfire服务器版本4.2.3,并且我使用了从GitHub下载的CallbackOnOffline 1.2.1-SNAPSHOT并生成了jar文件[mvn package命令],并通过Openfire管理控制台上传了该文件[我已经安装了1.2.0版本管理控制台,并得到相同的错误]。 这是来自服务器的错误日志。

2018.10.30 09:09:11 org.jivesoftware.openfire.interceptor.InterceptorManager - Error in interceptor: com.fotsum.CallbackOnOffline@7ceec048 while intercepting: 
<message id="v12r3-44" to="user_55@18.215.249.194" from="user_70@18.215.249.194/Spark 2.6.3" type="chat">
  <body>this is log test</body>
  <thread>55H5xR</thread>
  <x xmlns="jabber:x:event">
    <offline/>
    <composing/>
  </x>
</message>
java.lang.IllegalStateException: InjectionManagerFactory not found.
    at org.glassfish.jersey.internal.inject.Injections.lambda$lookupInjectionManagerFactory$0(Injections.java:98)
    at java.util.Optional.orElseThrow(Optional.java:290)
    at org.glassfish.jersey.internal.inject.Injections.lookupInjectionManagerFactory(Injections.java:98)
    at org.glassfish.jersey.internal.inject.Injections.createInjectionManager(Injections.java:68)
    at org.glassfish.jersey.client.ClientConfig$State.initRuntime(ClientConfig.java:432)
    at org.glassfish.jersey.internal.util.collection.Values$LazyValueImpl.get(Values.java:341)
    at org.glassfish.jersey.client.ClientConfig.getRuntime(ClientConfig.java:826)
    at org.glassfish.jersey.client.ClientRequest.getConfiguration(ClientRequest.java:285)
    at org.glassfish.jersey.client.JerseyInvocation.validateHttpMethodAndEntity(JerseyInvocation.java:143)
    at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:112)
    at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:108)
    at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:99)
    at org.glassfish.jersey.client.JerseyInvocation$AsyncInvoker.method(JerseyInvocation.java:713)
    at org.glassfish.jersey.client.JerseyInvocation$AsyncInvoker.post(JerseyInvocation.java:591)
    at com.fotsum.CallbackOnOffline.interceptPacket(CallbackOnOffline.java:130)
    at org.jivesoftware.openfire.interceptor.InterceptorManager.invokeInterceptors(InterceptorManager.java:268)
    at org.jivesoftware.openfire.interceptor.InterceptorManager.invokeInterceptors(InterceptorManager.java:230)
    at org.jivesoftware.openfire.MessageRouter.route(MessageRouter.java:172)
    at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:79)
    at org.jivesoftware.openfire.net.StanzaHandler.processMessage(StanzaHandler.java:384)
    at org.jivesoftware.openfire.net.ClientStanzaHandler.processMessage(ClientStanzaHandler.java:109)
    at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:238)
    at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:201)
    at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandler.java:177)
    at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:690)
    at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417)
    at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
    at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765)
    at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:109)
    at org.jivesoftware.openfire.plugin.RawPrintFilter.messageReceived(RawPrintFilter.java:107)
    at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417)
    at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
    at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765)
    at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:109)
    at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417)
    at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
    at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765)
    at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:407)
    at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:236)
    at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417)
    at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
    at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765)
    at org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java:74)
    at org.apache.mina.core.session.IoEvent.run(IoEvent.java:63)
    at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTask(OrderedThreadPoolExecutor.java:769)
    at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTasks(OrderedThreadPoolExecutor.java:761)
    at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.run(OrderedThreadPoolExecutor.java:703)
    at java.lang.Thread.run(Thread.java:748)

还调试日志网址:https://files.fm/u/z8x4rmsm

任何帮助都将受到高度赞赏。

2 个答案:

答案 0 :(得分:0)

我这个问题持续了1个月。.jar文件中有问题。这是棘手的部分: 您应该下载源文件并使用ants进行自我编译,然后导出.jar插件并将其上传到openfire服务器。之后,CallBackOnOffline就可以使用了。 这是编译openfire插件的链接: compile openfire plugins

答案 1 :(得分:0)

最后得到了解决方案。我们必须完全从头开始构建插件。您可以从以下链接获取最新的调试插件jar:https://github.com/swaponsust/CallbackOnOffline