Projects tigase _server tigase-muc Issues #144
No signature of method: tigase.muc.cluster.RoomClustered.addAffiliationByJid() (#144)
Closed
wojciech.kapcia@tigase.net opened 3 years ago

When trying to execute script "create-room" on tigase.org I got this exception. I was expecting something similar to #issue #143 but this one mentions RoomClustered (No signature of method: tigase.muc.cluster.RoomClustered.addAffiliationByJid()):

javax.script.ScriptException: javax.script.ScriptException: groovy.lang.MissingMethodException: No signature of method: tigase.muc.cluster.RoomClustered.addAffiliationByJid() is applicable for argument types: (tigase.xmpp.jid.BareJID, tigase.muc.Affiliation) values: [wojtek@tigase.org, owner]
Possible solutions: addAffiliationByJid(tigase.xmpp.jid.BareJID, tigase.muc.RoomAffiliation)
	at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:158)
	at tigase.server.script.Script.runCommand(Script.java:124)
	at tigase.server.BasicComponent.processScriptCommand(BasicComponent.java:903)
	at tigase.component.ComponenScriptCommandProcessor.processScriptCommand(ComponenScriptCommandProcessor.java:45)
	at tigase.component.modules.impl.AdHocCommandModule.processScriptAdHoc(AdHocCommandModule.java:143)
	at tigase.component.modules.impl.AdHocCommandModule.process(AdHocCommandModule.java:132)
	at tigase.component.modules.StanzaProcessor.process(StanzaProcessor.java:173)
	at tigase.component.modules.StanzaProcessor.processPacket(StanzaProcessor.java:94)
	at tigase.component.AbstractKernelBasedComponent.processPacket(AbstractKernelBasedComponent.java:81)
	at tigase.muc.MUCComponent.processPacket(MUCComponent.java:122)
	at tigase.muc.cluster.MUCComponentClustered.processPacket(SourceFile:87)
	at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1397)
Caused by: javax.script.ScriptException: groovy.lang.MissingMethodException: No signature of method: tigase.muc.cluster.RoomClustered.addAffiliationByJid() is applicable for argument types: (tigase.xmpp.jid.BareJID, tigase.muc.Affiliation) values: [wojtek@tigase.org, owner]
Possible solutions: addAffiliationByJid(tigase.xmpp.jid.BareJID, tigase.muc.RoomAffiliation)
	at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:320)
	at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:155)
	... 11 more
Caused by: groovy.lang.MissingMethodException: No signature of method: tigase.muc.cluster.RoomClustered.addAffiliationByJid() is applicable for argument types: (tigase.xmpp.jid.BareJID, tigase.muc.Affiliation) values: [wojtek@tigase.org, owner]
Possible solutions: addAffiliationByJid(tigase.xmpp.jid.BareJID, tigase.muc.RoomAffiliation)
	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:70)
	at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:46)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:148)
	at tigase.admin.Script2.run(Script2.groovy:78)
	at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:317)
	... 12 more
Andrzej Wójcik (Tigase) commented 3 years ago

I've fixed the issue and converted scripts to use block annotated with @CompileStatic. The whole code within this block will be statically compiled during startup of Tigase and will validate if the script will compile properly.

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
Version
tigase-server-8.2.0
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/tigase-muc#144
Please wait...
Page is in error, reload to recover