Cannot locate .xml file using WinSW to start windows service - java

I am trying to use Winsw to make my jar file run as a windows service. I rely on the documentation in order to do so.
To install a service, it is specified that the command winsw install myapp.xml should be used. The problem is that when I do that I get the error :
> Winsw.exe install myapp.xml
2022-11-15 12:24:46,791 FATAL - Unhandled exception
System.IO.FileNotFoundException: Unable to locate Winsw.[xml|yml] file within executable directory
at WinSW.Program.LoadConfigAndInitLoggers(Boolean inConsoleMode)
at WinSW.Program.Run(String[] argsArray, IServiceConfig config)
at WinSW.Program.Main(String[] args)
it expects the XML/YML to have the same name, when I rename the XML file it works fine, but I do not want to rename it as I want to use the same .exe file in order to start multiple services.
I tried to launch the different commands of install/uninstall, they all react the same.
Any Ideas ?

Related

Could not find ApacheJmeter_core.jar

Getting the below response while running jmeter.server Batch file:
Could not find ApacheJmeter_core.jar ...
what to do now? I am using Java version-14
Could not find ApacheJmeter_core.jar ... meaning you haven't started Jmeter master.
But above error is different, in this case Jmeter slave cannot find rmi keystore file at bin folder thus throwing file not found exception for rmi_keystore.jks.
You have to generate rmi_keystore.jks by running create-rmi-keystore.bat for windows (for mac you have to run create-rmi-keystore.sh) then once .jks file is generated then copy it in bin folder of each Jmeter slave.
For more details, you can refer link: https://jmeter.apache.org/usermanual/remote-test.html#setup_ssl

File not found exception :access is denied running on apache tomcat 7.0

I run a Java Application by using Apache Tomcat 7.0. I want to write files to another ftp server. The ftp file path is saving in a text file (//192.168.100.3/ftp/Testing).
When I start tomcat from bin>>tomcat.exe, the file is really written to the Ftp server.
When I start tomcat from services.msc, the following error occurs: File not found exception : access is denied
Execute services.msc as an administrator.
I assume one of the invoked files is in a subdirectory of Program Files and thus needs special permissions to be run.

websphere - CWWKE0054E error unable to open file

i am trying run the websphere liberty profile server from the command line. I am following the steps told here : https://developer.ibm.com/wasdev/downloads/liberty-profile-using-non-eclipse-environments/
I have created the server with the name server1.
But when the extraction completes and I try to start the server using the command : server start server1
the server throws an error : CWWKE0054E: Unable to open file C:\wlp\wlp\usr\servers\server1\logs\C:\Users\Furquan\AppData\Local\Temp\\ihp_custom_batches.log.. Now I know this cant be a valid path, but I dont know where and how to change it. Please help !!
This error is related to the LOG_FILE environment variable that you have defined in your environment by some other program. To solve that, you have the following opions:
Remove LOG_FILE env variable, if it is no longer needed by your system
If you cant do that, override it via server.env file, that you can create in the wlp\usr\servers\serverName directory with the following content:
LOG_FILE=console.log
As last resort (this is not recommended, will make your installation NOT SUPPORTED and in certain installations might get overwritten by updates) - modify the server.bat command line script - in the script find the following section:
if not defined LOG_FILE (
set X_LOG_FILE=console.log
) else (
set X_LOG_FILE=!LOG_FILE!
)
And after the line set X_LOG_FILE=!LOG_FILE! just add another line that will override it with the default like this set X_LOG_FILE=console.log
In general, I'd recommend second solution (with the server.env file), as it is the most portable and will work in any environment.
I have the similar problem for IBM Support Assistant V5. After I deleted %LOG_FILE% from Environment Variables, it worked.

Executing a java application (.jar) in Django

While trying to run the following code from django application's views
Code: views.py
def tika(fileName):
os.popen('java -jar tika-app.jar -t %s > textOutput.txt' % fileName)
return 0
....
# filepath == path to a file
# call java applications
tika(filepath)
....
I get the following error messages:
Error: Unable to access jarfile tika-app.jar
I feel that it has something to do with file permissions for django application, but this is just my guess.
If it might help to know - the java application is in the same directory as the django app.
Found the part that was causing the problem:
The java application should be in the Django's project directory level and not at the Django's application directory level.
Lesson from this: Even though the running code (views.py) is in the Django's application level, it is run from one level up - the project level.

Ghost4J. java.lang.UnsatisfiedLinkError: Unable to load library 'gsdll64'

I included Ghost4J 0.45 into my project using Maven and installed Ghostscript into C:\Program Files\gs\gs9.06.
But I still get an error java.lang.UnsatisfiedLinkError: Unable to load library 'gsdll64'.
I added into PATH env variable directory where located 'gsdll64.dll' (i.e. C:\Program Files\gs\gs9.06). Also tried launch application using -Djava.library.path=/path/to/dir.
But I alwways get UnsatisfiedLinkError (but when I launch using JVM argument -Djava.library.path I get ClassNotFound exception (Eclipse can't find Main class, but I manually point Eclipse to Main class when I laucnh my app))/
Does it work if you copy gsdll64 to your working directory? :-)
if u want to use a system property
-Djna.library.path=/path/to/dir should be used instead of -Djava.library.path=/path/to/dir

Categories

Resources