Closed barrney closed 5 years ago
Hi @barrney
Hello, after I've transfer the jar files from the link you provided I got this when I run start.cmd
Exception in thread "XfsStartUpTask" java.lang.UnsatisfiedLinkError: no at.o2xfs.win32 in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at at.o2xfs.xfs.XfsAPI.(Unknown Source) at at.o2xfs.xfs.XfsAPI.getInstance(Unknown Source) at at.o2xfs.xfs.service.XfsServiceManager.(Unknown Source) at at.o2xfs.xfs.service.XfsServiceManager.getInstance(Unknown Source) at at.o2xfs.operator.task.xfs.XfsStartUpTask.doExecute(Unknown Source) at at.o2xfs.operator.task.Task.execute(Unknown Source) at at.o2xfs.operator.task.TaskManager.executeTask(Unknown Source) at at.o2xfs.operator.task.TaskManager.access$100(Unknown Source) at at.o2xfs.operator.task.TaskManager$1.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
Which version of O²XFS are you testing? The old release ZIP or did you compile the source code on your own?
In the release ZIP the DLLs are in the folder bin
, so this folder must be in the java.library.path
, see start.cmd
for example:
java -Dlog4j.configuration=file:/%workingDirectory%\config\log4j.xml -Djava.library.path=%workingDirectory%\bin -jar %workingDirectory%\lib\at.o2xfs.operator.jar
In newer version of O²Xfs the libraries are loaded from your user directory:
%USERPROFILE%\.o2xfs\lib\x86
%USERPROFILE%\.o2xfs\lib\x86_64
There are JARs which contain the necessary DLLs and are dependencies as any other JAR, e.g.
https://repo.fagschlunger.co.at/webapp/#/artifacts/browse/tree/General/libs-snapshot-local/at/o2xfs/o2xfs-xfs-binaries https://repo.fagschlunger.co.at/webapp/#/artifacts/browse/tree/General/libs-snapshot-local/at/o2xfs/o2xfs-win32-binaries
If these dependencies are in your classpath, the Library
class should find them and copy them automatically to your user directory and load them from there.
Hello I was able to get the GUI started up
However, encounter an exception
java.lang.ClassNotFoundException: at.o2xfs.operator.task.xfs.cdm.DispenseTask
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at at.o2xfs.operator.menu.XMLMenuFactory.createTask(Unknown Source)
at at.o2xfs.operator.menu.XMLMenuFactory.processTaskCommand(Unknown Source)
at at.o2xfs.operator.menu.XMLMenuFactory.processMenuCommand(Unknown Source)
at at.o2xfs.operator.menu.XMLMenuFactory.processMenuCommand(Unknown Source)
at at.o2xfs.operator.menu.XMLMenuFactory.processMenuCommand(Unknown Source)
at at.o2xfs.operator.menu.XMLMenuFactory.loadMenu(Unknown Source)
at at.o2xfs.operator.menu.MenuTask.loadCommands(Unknown Source)
at at.o2xfs.operator.menu.MenuTask.doExecute(Unknown Source)
at at.o2xfs.operator.task.Task.execute(Unknown Source)
at at.o2xfs.operator.task.TaskManager.executeTask(Unknown Source)
at at.o2xfs.operator.task.TaskManager.access$100(Unknown Source)
at at.o2xfs.operator.task.TaskManager$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
java.lang.IllegalArgumentException
at at.o2xfs.common.Assert.notNull(Unknown Source)
at at.o2xfs.operator.task.ExecuteTaskCommand.
Looks like you are using an old operator.jar? Try this build from yesterday: https://repo.fagschlunger.co.at/libs-snapshot-local/o2xfs/at.o2xfs.operator/1.0.0.BUILD-SNAPSHOT/at.o2xfs.operator-1.0.0.BUILD-20190612.214019-35.zip
Using your jar build you provided works!
However, what are the possible issues having; "The process cannot access the file because it is being used by another process"?
This may be caused by the redirection of STDERR and STDOUT in start.cmd. You could try and remove the redirection:
java -Dlog4j.configuration=file:/%workingDirectory%\config\log4j.xml -jar %workingDirectory%\lib\at.o2xfs.operator-1.0.0.BUILD-SNAPSHOT.jar
And update log4j.xml to use files instead of console for logging.
Another guess, you are using and old start.cmd
and this line at the end causes the message:
MOVE /Y *.log* %workingDirectory%\%COMPUTERNAME%
I got Error: Could not find or load main class and This is my current start.cmd
You path contains spaces choose a directory path without spaces or escape the paths:
@ECHO OFF
CLS
SET workingDirectory=%~dp0
SET workingDirectory=%workingDirectory:~0,-1%
IF NOT EXIST "%workingDirectory%\%COMPUTERNAME%" MD "%workingDirectory%\%COMPUTERNAME%"
java "-Dlog4j.configuration=file:/%workingDirectory%\config\log4j.xml" -jar "%workingDirectory%\lib\at.o2xfs.operator-1.0.0.BUILD-SNAPSHOT.jar" > "%workingDirectory%\%COMPUTERNAME%\out.log" 2> "%workingDirectory%\%COMPUTERNAME%\err.log"
@AndreasFagschlunger
It works.!
Are all folder interconnected with each other?
Currently I have all the folder moved and only using at.o2xfs.operator, is it still completely functional?
O²XFS Operator needs some sort of configuration to work, beside the various JAR Archives. And therefore it expects a file operator.properties
in a sub folder config
within its current working directory.
Is it safe to run without folderat.o2xfs.xfs.service
or at.o2xfs.common
?
The O²XFS Operator ZIP archive contains the necessary minimum to run. This is a lib
folder containing the JARs and the config
folder for configuration.
There is no folder at.o2xfs.xfs.service
or at.o2xfs.common
. These folders exist in this git repository and contain the source code which then compiles to the JAR files in the lib
folder. And yes, they are dependent.
Hello,
Currently testing on a ATM. However during dispense task, there was an error at the end
You should see the XFS error in the log files but I also changed the behavior, so next time you should see at least the error name and not only the class name.
How do I start the GUI from at.o2xfs.operator?
I was getting this error: Error: Unable to access jarfile ...\O2Xfs-develop\at.o2xfs.operator\lib\at.o2xfs.operator-${version}.jar
Is it possible to run it on Windows XP environment?
Thanks!