Projects tigase _server server-core Issues #783
Too many beans implemented class class tigase.monitor.MonitorComponent (#783)
wojciech.kapcia@tigase.net opened 8 years ago
Due Date
2017-03-19

When running tests in #4348 with the default config there is a following exception @Too many beans implemented class class tigase.monitor.MonitorComponent@:

2017-03-15 17:47:57.487 [in_0-monitor]     StanzaProcessor.processPacket()    SEVERE:   Too many beans implemented class class tigase.monitor.MonitorComponent when processing from=http@localhost.local/ba05176a-d0b3-4d61-86ba-8324ae133e02, to=null, DATA=<iq to="monitor@localhost" xmlns="jabber:client" from="admin@localhost" type="get" id="747f82ee-11b9-4d5e-906c-03b3b1210a7b"><query xmlns="http://jabber.org/protocol/disco#items" node="http://jabber.org/protocol/commands"/></iq>, SIZE=228, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=ADMIN, TYPE=get
tigase.kernel.KernelException: Too many beans implemented class class tigase.monitor.MonitorComponent
        at tigase.kernel.core.Kernel.getInstance(Kernel.java:332)
        at tigase.kernel.core.Kernel.getInstance(Kernel.java:323)
        at tigase.monitor.modules.InfoTaskCommand.isAllowedFor(InfoTaskCommand.java:60)
        at tigase.component.modules.impl.AdHocCommandModule.getScriptItems(AdHocCommandModule.java:103)
        at tigase.component.modules.impl.DiscoveryModule.processAdHocCommandItems(DiscoveryModule.java:128)
        at tigase.monitor.modules.DiscoveryMonitorModule.processAdHocCommandItems(DiscoveryMonitorModule.java:63)
        at tigase.component.modules.impl.DiscoveryModule.process(DiscoveryModule.java:107)
        at tigase.component.modules.StanzaProcessor.process(StanzaProcessor.java:56)
        at tigase.component.modules.StanzaProcessor.processPacket(StanzaProcessor.java:77)
        at tigase.component.AbstractKernelBasedComponent.processPacket(AbstractKernelBasedComponent.java:102)
        at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1513)
Andrzej Wójcik (Tigase) commented 8 years ago

I've found that there is a single instance implementing MonitorComponent but referenced by multiple delegated bean configs. This was result of old declaration in AbstractKernelBasedComponent which created delegated bean config for component to make sure it is available under name component@. It is pointless as component is almost always available as @service@, so I removed code responsible for creation of duplicated bean config and updated code referencing to component bean as @component to use service instead.

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
RedmineID
5085
Version
tigase-server-8.0.0
Spent time
7h 30m
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#783
Please wait...
Page is in error, reload to recover