Projects tigase _server tigase-pubsub Issues #142
Compilation of PublishItem.groovy fails (#142)
Andrzej Wójcik (Tigase) opened 1 month ago
[2024-12-11 18:55:57:790] [WARNING ] [                  main ] BasicComponent.loadScripts()     : Can''t load the admin script file: scripts/admin/PublishItem.groovy
javax.script.ScriptException: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script142.groovy: 155: [Static type checking] - Cannot call tigase.pubsub.modules.PublishItemModule$ItemPublishedEvent#<init>(java.lang.String, tigase.xmpp.jid.BareJID, java.lang.String, java.lang.String, java.lang.String, java.util.List <tigase.xml.Element>) with arguments [java.lang.String, tigase.xmpp.jid.BareJID, java.lang.String, java.lang.String, <unknown parameter type>, java.util.List <java.lang.Object>]
 @ line 155, column 7.
   						new PublishItemModule.ItemPublishedEvent(component.getName(), p.getStanzaTo().getBareJID(), node, p.getAttributeStaticStr("from"), null, itemsToSend));
         ^

1 error

	at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.compile(GroovyScriptEngineImpl.java:183)
	at tigase.server.script.Script.init(Script.java:83)
	at tigase.server.script.AddScriptCommand.addAdminScript(AddScriptCommand.java:48)
	at tigase.server.BasicComponent.loadScripts(BasicComponent.java:1113)
	at tigase.server.BasicComponent.reloadScripts(BasicComponent.java:983)
	at tigase.server.BasicComponent.initialize(BasicComponent.java:932)
	at tigase.pubsub.cluster.PubSubComponentClustered.initialize(SourceFile:277)
	at tigase.kernel.core.Kernel.initBean(Kernel.java:136)
	at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:1259)
	at tigase.kernel.core.Kernel.injectIfRequired(Kernel.java:1033)
	at tigase.kernel.core.Kernel.getInstance(Kernel.java:308)
	at tigase.server.Bootstrap.start(Bootstrap.java:327)
	at tigase.server.XMPPServer.start(XMPPServer.java:202)
	at tigase.server.XMPPServer.main(XMPPServer.java:155)
Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script142.groovy: 155: [Static type checking] - Cannot call tigase.pubsub.modules.PublishItemModule$ItemPublishedEvent#<init>(java.lang.String, tigase.xmpp.jid.BareJID, java.lang.String, java.lang.String, java.lang.String, java.util.List <tigase.xml.Element>) with arguments [java.lang.String, tigase.xmpp.jid.BareJID, java.lang.String, java.lang.String, <unknown parameter type>, java.util.List <java.lang.Object>]
 @ line 155, column 7.
   						new PublishItemModule.ItemPublishedEvent(component.getName(), p.getStanzaTo().getBareJID(), node, p.getAttributeStaticStr("from"), null, itemsToSend));
         ^

1 error

	at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:292)
	at org.codehaus.groovy.control.CompilationUnit$IPrimaryClassNodeOperation.doPhaseOperation(CompilationUnit.java:985)
	at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:672)
	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:636)
	at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:389)
	at groovy.lang.GroovyClassLoader.lambda$parseClass$3(GroovyClassLoader.java:332)
	at org.codehaus.groovy.runtime.memoize.StampedCommonCache.compute(StampedCommonCache.java:163)
	at org.codehaus.groovy.runtime.memoize.StampedCommonCache.getAndPut(StampedCommonCache.java:154)
	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:330)
	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:314)
	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:257)
	at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.getScriptClass(GroovyScriptEngineImpl.java:336)
	at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.compile(GroovyScriptEngineImpl.java:181)
	... 13 more
Andrzej Wójcik (Tigase) changed state to 'In Progress' 1 month ago
Previous Value Current Value
Open
In Progress
Andrzej Wójcik (Tigase) added "Related" tigase/_server/server-core#1547 1 month ago
Referenced from commit 1 month ago
Referenced from commit 1 month ago
Andrzej Wójcik (Tigase) changed state to 'In QA' 1 month ago
Previous Value Current Value
In Progress
In QA
Andrzej Wójcik (Tigase) commented 1 month ago

As this issue persisted, I've recreated issue on the local installation and fixed it by adjusting source code. As it turned out, missing parameter type of the list was causing the issue.

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
Version
none
Sprints
n/a
Customer
n/a
Iterations
Issue Votes (0)
Watchers (3)
Reference
tigase/_server/tigase-pubsub#142
Please wait...
Page is in error, reload to recover