对于我们应用程序的卸载程序,我需要从我们的一个JAR文件中获取一个版本。所以我使用以下选项创建了ExtractZipFileAction
:
Property mode: 644
Property destinationDirectory: .
Property destinationRoot: Installation directory
Property dirMode: 755
Property fileFilter:
Property showProgress: false
Property zipFile: OurJarFile-1.0-SNAPSHOT-plugin.jar
Property zipRoot: Installation directory
Property rollbackSupported: true
但执行会立即取消ClassCastException
(错误日志中的堆栈跟踪):
[ERROR] com.install4j.runtime.beans.actions.files.ExtractZipFileAction [ID 541]: java.lang.ClassCastException: com.install4j.runtime.installer.helper.comm.impl.UninstallerHelperContextImpl cannot be cast to com.install4j.api.context.InstallerContext
java.lang.ClassCastException: com.install4j.runtime.installer.helper.comm.impl.UninstallerHelperContextImpl cannot be cast to com.install4j.api.context.InstallerContext
at com.install4j.runtime.beans.actions.files.AbstractZipFileAction.zipActions(AbstractZipFileAction.java:89)
at com.install4j.runtime.beans.actions.files.AbstractZipFileAction.execute(AbstractZipFileAction.java:79)
at com.install4j.runtime.beans.actions.SystemInstallOrUninstallAction.uninstall(SystemInstallOrUninstallAction.java:35)
at com.install4j.runtime.installer.ContextImpl$7.executeAction(ContextImpl.java:1670)
at com.install4j.runtime.installer.ContextImpl$7.fetchValue(ContextImpl.java:1659)
at com.install4j.runtime.installer.ContextImpl$7.fetchValue(ContextImpl.java:1656)
at com.install4j.runtime.installer.helper.comm.actions.FetchObjectAction.execute(FetchObjectAction.java:14)
at com.install4j.runtime.installer.helper.comm.HelperCommunication.executeActionWrapper(HelperCommunication.java:367)
at com.install4j.runtime.installer.helper.comm.HelperCommunication.access$200(HelperCommunication.java:33)
at com.install4j.runtime.installer.helper.comm.HelperCommunication$1.run(HelperCommunication.java:98)`
请注意,我们在卸载程序中,而不是安装程序,但异常抱怨将UninstallerHelperContextImpl
转换为InstallerContext
。这可能是JAR文件的问题吗?
我还将动作提升类型设置为Elevate to maximum available privileges
,因为我想提取程序文件夹中安装目录中的文件。
答案 0 :(得分:1)
这是一个错误,将在6.1.5中修复。请联系support@ej-technologies.com获取此修复版本。