Major
#28675
Opening Excel-Scripts in Script Recorder fails when starting from command line
**Description**
- login with root user and open script recorder
- in Script Recorder select "Select Server Script" and select one of the Excel tests.
**Expected** The excel Test loads into script recorder
**Actual** Internal Error. Caused by: java.lang.NoSuchMethodError: 'org.apache.commons.io.input.BoundedInputStream$Builder org.apache.commons.io.input.BoundedInputStream.builder()'
**Log file**
2025-06-11T14:34:29,879 ERROR [qtp1261842601-95]: com.top_logic.util.error.ErrorHandlingHelper - Command 'dispatchControlCommand' failed. S(seIbD7OoasioyN2klKocPFa0Ysnb47RPa86IE9YZpZY=) com.top_logic.util.error.TopLogicException: Internal error at com.top_logic.mig.html.layout.CommandDispatcher.internalDispatchCommand(CommandDispatcher.java:218) at com.top_logic.mig.html.layout.CommandDispatcher.internalDispatch(CommandDispatcher.java:134) at com.top_logic.mig.html.layout.CommandDispatcher.dispatchCommand(CommandDispatcher.java:127) at com.top_logic.base.services.simpleajax.AJAXServlet.processRequest(AJAXServlet.java:686) at com.top_logic.base.services.simpleajax.AJAXServlet.doPost(AJAXServlet.java:359) at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:547) at com.top_logic.util.TopLogicServlet.doService(TopLogicServlet.java:402) at com.top_logic.util.TopLogicServlet.inContext(TopLogicServlet.java:266) at com.top_logic.util.TopLogicServlet$1.inContext(TopLogicServlet.java:334) at com.top_logic.util.TLContextManager.inInteractionInternal(TLContextManager.java:283) at com.top_logic.util.TLContextManager.inInteraction(TLContextManager.java:259) at com.top_logic.util.TopLogicServlet.enterContext(TopLogicServlet.java:329) at com.top_logic.util.TopLogicServlet.serviceWithLogMark(TopLogicServlet.java:183) at com.top_logic.util.TopLogicServlet.lambda$service$0(TopLogicServlet.java:167) at com.top_logic.util.TopLogicServlet.withSessionIdLogMark(TopLogicServlet.java:209) at com.top_logic.util.TopLogicServlet.service(TopLogicServlet.java:166) at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:614) at org.eclipse.jetty.ee10.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1379) at org.eclipse.jetty.ee10.servlet.ServletHolder.handle(ServletHolder.java:736) at org.eclipse.jetty.ee10.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1614) at com.top_logic.knowledge.gui.layout.HttpSecureHeaderFilter.doFilter(HttpSecureHeaderFilter.java:135) at org.eclipse.jetty.ee10.servlet.FilterHolder.doFilter(FilterHolder.java:208) at org.eclipse.jetty.ee10.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1586) at org.eclipse.jetty.ee10.servlet.ServletHandler$MappedServlet.handle(ServletHandler.java:1547) at org.eclipse.jetty.ee10.servlet.ServletChannel.dispatch(ServletChannel.java:805) at org.eclipse.jetty.ee10.servlet.ServletChannel.handle(ServletChannel.java:431) at org.eclipse.jetty.ee10.servlet.ServletHandler.handle(ServletHandler.java:464) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:571) at org.eclipse.jetty.ee10.servlet.SessionHandler.handle(SessionHandler.java:703) at org.eclipse.jetty.server.handler.ContextHandler.handle(ContextHandler.java:763) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:181) at org.eclipse.jetty.server.Server.handle(Server.java:179) at org.eclipse.jetty.server.internal.HttpChannelState$HandlerInvoker.run(HttpChannelState.java:619) at org.eclipse.jetty.server.internal.HttpConnection.onFillable(HttpConnection.java:410) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:322) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:99) at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53) at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:478) at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:441) at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:293) at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.run(AdaptiveExecutionStrategy.java:201) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:410) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:971) at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1201) at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1156) at java.base/java.lang.Thread.run(Thread.java:1583) Caused by: java.lang.NoSuchMethodError: 'org.apache.commons.io.input.BoundedInputStream$Builder org.apache.commons.io.input.BoundedInputStream.builder()' at org.apache.poi.util.IOUtils.peekFirstNBytes(IOUtils.java:153) at org.apache.poi.poifs.filesystem.FileMagic.valueOf(FileMagic.java:209) at org.apache.poi.openxml4j.opc.internal.ZipHelper.verifyZipHeader(ZipHelper.java:147) at org.apache.poi.openxml4j.opc.internal.ZipHelper.openZipStream(ZipHelper.java:191) at org.apache.poi.openxml4j.opc.ZipPackage.<init>(ZipPackage.java:210) at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:517) at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:490) at org.apache.poi.ooxml.util.PackageHelper.open(PackageHelper.java:67) at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:315) at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:289) at com.top_logic.base.office.POIUtil.newWorkbook(POIUtil.java:1096) at com.top_logic.layout.scripting.template.excel.ExcelChecker.getWorkbook(ExcelChecker.java:451) at com.top_logic.layout.scripting.template.excel.ExcelChecker.getWorkbook(ExcelChecker.java:440) at com.top_logic.layout.scripting.template.excel.ExcelChecker.parse(ExcelChecker.java:200) at com.top_logic.layout.scripting.template.excel.ExcelChecker.createAction(ExcelChecker.java:189) at com.top_logic.layout.scripting.util.LazyActionProvider.get(LazyActionProvider.java:27) at com.top_logic.layout.scripting.template.gui.ScriptingGuiUtil.parseExcel(ScriptingGuiUtil.java:69) at com.top_logic.layout.scripting.template.gui.ScriptingGuiUtil.parse(ScriptingGuiUtil.java:52) at com.top_logic.layout.scripting.template.gui.ScriptingGuiUtil.toScriptContainer(ScriptingGuiUtil.java:32) at com.top_logic.layout.scripting.template.gui.selector.AcceptSelectedScriptListener.createScriptContainer(AcceptSelectedScriptListener.java:54) at com.top_logic.layout.scripting.template.gui.selector.AcceptSelectedScriptListener.handleNewValue(AcceptSelectedScriptListener.java:44) at com.top_logic.layout.channel.AbstractComponentChannel.notifyNewValue(AbstractComponentChannel.java:244) at com.top_logic.layout.channel.DefaultChannel.storeValue(DefaultChannel.java:44) at com.top_logic.layout.channel.AbstractComponentChannel.set(AbstractComponentChannel.java:96) at com.top_logic.layout.component.Selectable.setSelected(Selectable.java:119) at com.top_logic.layout.folder.file.selection.FileSelectionComponent.setSelectedFolderNode(FileSelectionComponent.java:221) at com.top_logic.layout.folder.file.selection.FileSelectionComponent.applySelectionFromTableToChannel(FileSelectionComponent.java:177) at com.top_logic.layout.folder.file.selection.FileSelectionComponent$1.notifySelectionChanged(FileSelectionComponent.java:170) at com.top_logic.layout.component.model.AbstractSelectionModel.sendEvent(AbstractSelectionModel.java:78) at com.top_logic.layout.component.model.AbstractSelectionModel.sendEvent(AbstractSelectionModel.java:22) at com.top_logic.basic.util.AbstractObservable.notifyListeners(AbstractObservable.java:81) at com.top_logic.layout.component.model.AbstractSelectionModel.fireSelectionChanged(AbstractSelectionModel.java:61) at com.top_logic.mig.html.DefaultSingleSelectionModel.internalSetSelected(DefaultSingleSelectionModel.java:149) at com.top_logic.mig.html.DefaultSingleSelectionModel.setSelected(DefaultSingleSelectionModel.java:94) at com.top_logic.layout.form.control.SelectionPartControl$DefaultSelectionPartModel.updateSelection(SelectionPartControl.java:417) at com.top_logic.layout.form.control.SelectionPartControl$DefaultSelectionPartModel.updateSelectionVeto(SelectionPartControl.java:426) at com.top_logic.layout.form.control.SelectionPartControl$ValueChanged.execute(SelectionPartControl.java:244) at com.top_logic.layout.basic.AbstractControlBase.executeCommand(AbstractControlBase.java:981) at com.top_logic.layout.basic.component.ControlSupport.executeCommand(ControlSupport.java:223) at com.top_logic.layout.basic.component.ControlComponent$DispatchAction.handleCommand(ControlComponent.java:233) at com.top_logic.tool.boundsec.CommandHandlerUtil.handleCommand(CommandHandlerUtil.java:31) at com.top_logic.mig.html.layout.LayoutComponent.dispatchCommand(LayoutComponent.java:3034) at com.top_logic.mig.html.layout.CommandDispatcher.internalDispatchCommand(CommandDispatcher.java:196) ... 45 more
Problem introduced with TL 7.9.5.
We also tested with Eclipse and learned, that the script recorder works from Eclipse Launch Configuration. With plain Maven from Command Line Interface the issue persists.
Tested with Christian Canterino.
**Analysis bhu:**
Hi, this is a really interesting problem. TL 7.9.5 has upgraded to Apache POI 5.4.1, which in turn requires Apache commons-io 2.18.0 to work. The Script-Recorder uses some functionality of POI, which fails, if Apache commons-io is included in a lower version.
When starting from Maven command line, the Maven plugin exec:java is used with a special configuration that explicitly includes the IDE runtime tl-ide-jetty to the dependencies. tl-ide-jetty in turn is dependent on h2migrationtool, which in turn is also dependent on commons-io but in version 2.13.0. Due to the explicit plug-in configuration for exec:java in module tl-parent-app, Maven seems to prefers the version 2.13.0 of commons-io over the version 2.18.0 referred to by the dependency management of tl-parent-all. This results in the wrong version of commons-io to be on the app's class path, when booting from the Maven command line resulting in Excel parsing to fail.
You can work around this pitfall, by adding the following plug-in configuration to Aema, which overrides the configuration inherited from tl-parent-app - make sure to create a ticket that reminds you to remove this quirks, after the next upgrade of TL, which hopefully provides a better workaround for the problem:
<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <executions> <execution> <id>start-app</id> <goals> <goal>java</goal> </goals> </execution> </executions> <configuration> <mainClass>com.top_logic.ide.jetty.Bootstrap</mainClass> <arguments> <argument>-port</argument> <argument>${tl.port}</argument> <argument>-contextPath</argument> <argument>${project.artifactId}</argument> </arguments> <includePluginDependencies>true</includePluginDependencies> </configuration> <dependencies> <dependency> <groupId>com.top-logic</groupId> <artifactId>tl-ide-jetty</artifactId> <version>${tl.version}</version> <exclusions> <exclusion> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>com.top-logic</groupId> <artifactId>tl-basic-logging-log4j</artifactId> <version>${tl.version}</version> </dependency> </dependencies> </plugin>