install4j Extract JAR file exception - install4j

For the uninstaller of our application, i need to get a version from one of our JAR files. So i created a ExtractZipFileAction with the following options:
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
But the execution cancels immediately with a ClassCastException (stack trace from the error log):
[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)`
Note that we're in the uninstaller, not the installer, but the exception complains about casting an UninstallerHelperContextImpl to an InstallerContext. Could it be a problem with the JAR file?
I also set the action elevation type to Elevate to maximum available privileges since i want to extract the files in the installation directory in the programs-folder.

This is a bug and will be fixed in 6.1.5. Please contact support#ej-technologies.com to get a build where this fixed.

Related

Update plugins in unicode for 3.06

I am updating my script to version 3.06 of NSIS.
So I added "Unicode True" in my script, but I have a problem with plugins.
These plugins not of "x86-unicode" version:
https://nsis.sourceforge.io/FontName_plug-in
https://nsis.sourceforge.io/Marquee_plug-in
If anyone is able to compile and provide dll, thank you in advance.
Stackoverflow is not really the place for these type of questions. Your best bet is to ask the authors of these plug-ins to create a build for you.
Alternatively you can try the CallAnsiPlugin plug-in, it can call these older plug-ins in a Unicode installer.
The modification to add CallAnsiPlugin on the FontName plugin is more difficult.
I moved FontName.dll to the "x86-ansi" folder.
I have converted FontName.nsh, FontReg.nsh and FontRegAdv.nsh ANSI to UTF8.
In FontName.nsh I replaced FontName::Version with
File "/ONAME=$PLUGINSDIR\FontName.dll" "${NSISDIR}\Plugins\x86-ansi\FontName.dll"
CallAnsiPlugin::Call "*$PLUGINSDIR\FontName" Version 0
and FontName::Name with
File "/ONAME=$PLUGINSDIR\FontName.dll" "${NSISDIR}\Plugins\x86-ansi\FontName.dll"
CallAnsiPlugin::Call "*$PLUGINSDIR\FontName" Name 0
But during installation it causes an "CallAnsiPlugin error" and MessageBox "0".
I added this modification :
https://stackoverflow.com/a/56854513/15597989
Now print :
[ERROR] InstallTTFFont
[ERROR] error: 0
[ERROR] FontFile: startest.ttf
[ERROR] FontFileName: startest.ttf
[ERROR] Index: Line183.6
I discovered that the value 0 is none other than CallAnsiPlugin::Call "*$PLUGINSDIR\FontName" Name 0.
So I test to replace (FontReg.nsh line 83) IfErrors 0 "${Index}-Add" by goto "${Index}-Add" always displays "CallAnsiPlugin error" but the file is installed.
I don't know how to remove this false return value !?
I saw that CallAnsiPlugin uses a file, this one is not deleted in the temporary folder created by the installer. I don't think this is normal ?
EDIT :
My solution that works :
https://github.com/22starworld/FontName-plug-in-NSIS

Headless Behavior Space with table extension

I currently have a project that I've completed using the netlogo interface.
My project includes multiple .nls files and one of my .nls files use the table extension. I've created a behavior space experiment and named it experiment for simplicity.
I'm trying to run the experiment headless using the following commands in my Netlogo application's directory where the Netlogo.jar is located.
java -Xmx1024m -Dfile.encoding=UTF-8 -cp ./Netlogo.jar org.nlogo.headless.Main --model /path/to/file/experiment.nlogo --experiment experiment --table /path/to/output/table-output.csv --spreadsheet /path/to/output/spreadsheet-output.csv
I'm getting the following error. It seems that I can't detect my extension from the .nls file. How can this be fixed?
Exception in thread "main" Nothing named TABLE:PUT has been defined at position 895 in
at org.nlogo.compiler.CompilerExceptionThrowers$.exception(CompilerExceptionThrowers.scala:26)
at org.nlogo.compiler.IdentifierParser.org$nlogo$compiler$IdentifierParser$$getAgentVariableReporter(IdentifierParser.scala:107)
at org.nlogo.compiler.IdentifierParser$$anonfun$processToken2$2.apply(IdentifierParser.scala:75)
at org.nlogo.compiler.IdentifierParser$$anonfun$processToken2$2.apply(IdentifierParser.scala:68)
at scala.Option.getOrElse(Option.scala:108)
at org.nlogo.compiler.IdentifierParser.processToken2(IdentifierParser.scala:68)
at org.nlogo.compiler.IdentifierParser.processToken$1(IdentifierParser.scala:31)
at org.nlogo.compiler.IdentifierParser$$anonfun$process$1.apply(IdentifierParser.scala:34)
at org.nlogo.compiler.IdentifierParser$$anonfun$process$1.apply(IdentifierParser.scala:34)
at scala.collection.Iterator$$anon$19.next(Iterator.scala:401)
at scala.collection.Iterator$class.toStream(Iterator.scala:1181)
at scala.collection.Iterator$$anon$19.toStream(Iterator.scala:399)
at scala.collection.Iterator$$anonfun$toStream$1.apply(Iterator.scala:1181)
at scala.collection.Iterator$$anonfun$toStream$1.apply(Iterator.scala:1181)
at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1060)
at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1052)
at scala.collection.immutable.StreamIterator$$anonfun$next$1.apply(Stream.scala:952)
at scala.collection.immutable.StreamIterator$$anonfun$next$1.apply(Stream.scala:952)
at scala.collection.immutable.StreamIterator$LazyCell.v(Stream.scala:941)
at scala.collection.immutable.StreamIterator.hasNext(Stream.scala:946)
at scala.collection.Iterator$class.isEmpty(Iterator.scala:329)
at scala.collection.immutable.StreamIterator.isEmpty(Stream.scala:933)
at scala.collection.immutable.StreamIterator.next(Stream.scala:948)
at scala.collection.Iterator$$anon$2.next(Iterator.scala:898)
at scala.collection.Iterator$$anon$2.head(Iterator.scala:885)
at org.nlogo.compiler.ExpressionParser.recurse$1(ExpressionParser.scala:474)
at org.nlogo.compiler.ExpressionParser.delayBlock(ExpressionParser.scala:479)
at org.nlogo.compiler.ExpressionParser.parseExpressionInternal(ExpressionParser.scala:339)
at org.nlogo.compiler.ExpressionParser.org$nlogo$compiler$ExpressionParser$$parseArgExpression(ExpressionParser.scala:290)
at org.nlogo.compiler.ExpressionParser$$anonfun$parseArguments$1.apply$mcVI$sp(ExpressionParser.scala:96)
at scala.collection.immutable.Range.foreach$mVc$sp(Range.scala:81)
at org.nlogo.compiler.ExpressionParser.parseArguments(ExpressionParser.scala:95)
at org.nlogo.compiler.ExpressionParser.parseStatement(ExpressionParser.scala:80)
at org.nlogo.compiler.ExpressionParser.parse(ExpressionParser.scala:55)
at org.nlogo.compiler.CompilerMain$$anonfun$compile$1.apply(CompilerMain.scala:34)
at org.nlogo.compiler.CompilerMain$$anonfun$compile$1.apply(CompilerMain.scala:29)
at scala.collection.Iterator$class.foreach(Iterator.scala:772)
at scala.collection.JavaConversions$JIteratorWrapper.foreach(JavaConversions.scala:573)
at scala.collection.IterableLike$class.foreach(IterableLike.scala:73)
at scala.collection.JavaConversions$JCollectionWrapper.foreach(JavaConversions.scala:592)
at org.nlogo.compiler.CompilerMain$.compile(CompilerMain.scala:29)
at org.nlogo.compiler.Compiler$.compileProgram(Compiler.scala:28)
at org.nlogo.headless.HeadlessModelOpener.openFromMap(HeadlessModelOpener.scala:53)
at org.nlogo.headless.HeadlessWorkspace.openString(HeadlessWorkspace.scala:531)
at org.nlogo.headless.HeadlessWorkspace.open(HeadlessWorkspace.scala:513)
at org.nlogo.headless.Main$.newWorkspace$1(Main.scala:19)
at org.nlogo.headless.Main$$anonfun$runExperiment$1.apply(Main.scala:24)
at org.nlogo.headless.Main$$anonfun$runExperiment$1.apply(Main.scala:24)
at org.nlogo.lab.Lab$$anonfun$1.apply(Lab.scala:33)
at org.nlogo.lab.Lab$$anonfun$1.apply(Lab.scala:33)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
at scala.collection.immutable.Range.foreach(Range.scala:78)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:233)
at scala.collection.immutable.Range.map(Range.scala:46)
at org.nlogo.lab.Lab.run(Lab.scala:33)
at org.nlogo.headless.Main$.runExperiment(Main.scala:24)
at org.nlogo.headless.Main$$anonfun$main$1.apply(Main.scala:14)
at org.nlogo.headless.Main$$anonfun$main$1.apply(Main.scala:14)
at scala.Option.foreach(Option.scala:197)
at org.nlogo.headless.Main$.main(Main.scala:14)
at org.nlogo.headless.Main.main(Main.scala)
It seems that the .nlogo file must contain the extension declaration rather than the .nls file.

PredictionIO - getting error when build and run Evaluation metrics

I followed this quickstart:
https://docs.prediction.io/templates/classification/quickstart/
and this document for evaluation metrics
https://docs.prediction.io/evaluation/paramtuning/
Everything seems ok until the step build and run evaluation metrics
pio eval org.template.classification.AccuracyEvaluation \
org.template.classification.EngineParamsList
I am getting the exception:
Exception in thread "main" scala.reflect.internal.MissingRequirementError: object org.template.classification.AccuracyEvaluation not found.
at scala.reflect.internal.MissingRequirementError$.signal(MissingRequirementError.scala:16)
at scala.reflect.internal.MissingRequirementError$.notFound(MissingRequirementError.scala:17)
at scala.reflect.internal.Mirrors$RootsBase.ensureModuleSymbol(Mirrors.scala:126)
at scala.reflect.internal.Mirrors$RootsBase.staticModule(Mirrors.scala:161)
at scala.reflect.internal.Mirrors$RootsBase.staticModule(Mirrors.scala:21)
at io.prediction.workflow.WorkflowUtils$.getEvaluation(WorkflowUtils.scala:103)
at io.prediction.workflow.CreateWorkflow$$anonfun$19.apply(CreateWorkflow.scala:146)
at io.prediction.workflow.CreateWorkflow$$anonfun$19.apply(CreateWorkflow.scala:144)
Could anyone help me with this?
Thank you very much.
Had the exact same problem. Fixed it by doing the following:
For each .scala file in engine_dir/src/main/scala/org/template/engine_name/ you need to change the first line from...
package <SomeTemplateName>
To the following (replacing engine_name with the name of the folder in the path mentioned above):
package org.template.<engine_name>
Then, in engine.json you need to change the following line...
"engineFactory": "<template name>.<template engine>",
To the following (once again replacing engine_name with the name of the folder in the path mentioned above):
"engineFactory": "org.template.<engine name>.<template engine>",
Now re-run...
pio build
pio train
pio deploy
Then you should be able to run the model evaluation without errors.
Simply run it like this
$ pio eval org.example.classification.AccuracyEvaluation \
org.example.classification.EngineParamsList
You dont have to change anything. The class package from the sample was org.example.classification not org.template.classification

OMNET++/MIXIM : HOW CAN I CORRECT THE FOLLOWING COMPILER'S ERROR

Description Resource Path Location Type
make: * Config file '' does not exist -- add the OMNeT++ bin directory to the path so that opp_configfilepath can be found, or set the OMNETPP_CONFIGFILE variable to point to Makefile.inc. Stop. Makefile /IWF line 55 C/C++ Problem**
I had the same problem with OMNET++ 4.3.1, it turns out that i extracted the omnet source files to C:\Omnet rather than the default expected location c:/omnetpp-4.3.1 by the make script. So when you try to build the mixim, the build stops by giving two errors one of them being
make: *** Config file 'c:/omnetpp-4.3.1/Makefile.inc' does not exist --
To solve this issue, navigate to mixim(or whatever folder)>out>gcc-debug>.last-copts or you can search your workspace for something like omnetpp-4.3.1, remember the version, to locate the file. Then just change -Ic:/omnetpp-4../include to exact directory path where you have extracted omnet++.

wurfl2 integration in TYPO3

everytime i try to install the wurfl2 extension in TYPO3 i get the following error message:
Fatal error: require_once() [function.require]: Failed opening required '' (include_path='.:/usr/local/php/lib/php:/usr/local/php/lib/php/PEAR') in /html/typo3conf/temp_CACHED_ps9b8e_ext_localconf.php on line 501
is anyone familiar with this error and knows how to fix it?
I get the same error message with TYPO3 4.4.4. I had to remove the extension folder and to delete all ./typo3conf/temp* files to get Typo3 running again afterwards.
(You might not see the error message if you don't have something like $TYPO3_CONF_VARS['SYS']['displayErrors'] = '1' in your localconf.php. You can set this with the installtool.
As already mentioned by the other answer first you have to get your system running again: set $TYPO3_CONF_VARS['SYS']['displayErrors'] = '1' in your localconf.php in order to see all error messages. Afterwards remove the extension folder.
I think the error is caused by a missing config file. The extension constant wurflConfig has to be set with the absolute path to the file /YOUR/PATH/TO/WEB_DIR/typo3conf/ext/wurfl2/res1/li/wurfl_config.php and might have to adjust the settings there.