Java System Level deployment Malformed deployment.config file - java

I am trying to install Java jre 1.8u31 from the command line. I am using system level install configuration by using the deployment.config file and deployment.properties.
I have tried the following:
deployment.system.config=file\:C\:/WINDOWS/Sun/Java/Deployment/deployment.properties
deployment.system.config.mandatory=true
I have also tried the following
deployment.system.config=file:///C:/Windows/Sun/Java/Deployment/deployment.properties
deployment.system.config.mandatory=true
I have swapped the entries around in hopes of getting a better error describing what I am doing wrong. I have also made the first line blank in the deployment.config file. I have googled and tried all examples I could find online. In all the cases, I am being presented a dialog box with an error that states the deployment.config file's line 1 is malformed.
Any suggestions would be greatly appreciated.
Russ
I have tried all of these formats:

The path you have given should be in below format
deployment.system.config=file:/C:/Windows/Sun/Java/Deployment/deployment.proper‌​ties

I got the install to work correctly. What I did was put the deployment.config file in the C:\Windows\Sun\Java\Deployment directory. The property in the file was setup as so:
deployment.system.config=file\:C\:\\Sup\\Java\\UPGRADE\\Deployment\\deployment.properties
The exceptionlist file was in the same directory as the deployment.properties file.

Related

Ant/Make Compilation Error with File Path Having Spaces

Unable to produce some MVC to reproduce the issue. So trying to be clear & concise.
We utilize ant/make
The include path to building the C++ portion utilizes a header (jni.h) from the java installed directory
Example Error (During Build Process)
3)
*File.h(2): fatal error C1083: Cannot open include file: 'jni.h': No such file or directory
make: *** [File.obj] Error 2*
Another error also shown is:
cl : Command line warning D9024 : unrecognized source file type 'Files\Java\jdk1.8.0_281\include', object file assumed
cl : Command line warning D9027 : source file 'Files\Java\jdk1.8.0_281\include' ignored
cl : Command line warning D9024 : unrecognized source file type 'Files\Java\jdk1.8.0_281\include\win32', object file assumed
cl : Command line warning D9027 : source file 'Files\Java\jdk1.8.0_281\include\win32' ignored
This is the include path as part of the compilation step (Yes this path exists) -IC:\Program Files\Java\jdk1.8.0_281\include
Now when I copy the files necessary to a path that's called ProgramFiles\Java... (No spaces in ProgramFiles) it works fine.
I have a variable retrieved from a .platform file which is utilized for the build, which defines JDK_HOME. I believe this file is utilized for ant/make builds and uses these defined variables in this file.
Any ideas/paths as to ant or make not liking spaces in the include paths, or anything along those lines? I've looked at many resources online, but very hard to describe the issue.
Problem clearly is the space in Program Files. Not sure what is so significant about this.
Hoping the bullet points help in any information needed with anyone who could be familiar with this issue or might have leads. Thank you.
I'm not sure what ant has to do with this. But make recipes are just shell scripts (or, if you use Windows cmd.exe instead of a POSIX shell, batch files). Just like commands you'd write in a batch file or on the command line directly, you have to add quoting to paths that contain whitespace.
You don't actually show us either the make recipe or even the complete compile (cl) command line that make invokes so we can't give you precise advice, but basically if you cut and paste the command line make invoked into your terminal prompt you'd get exactly the same errors about whitespace. Make is not magic: it only runs the commands you tell it to run.
Just like you have to add quotes around paths containing whitespace when you run them from the terminal prompt, so too you need to add quotes to these paths when you run them from a makefile recipe.

Given property file not found

so I'm trying to run my program and I keep getting the error when I run my main class it says that given property file isn't found, below are two images of the file location and the arguments I've putten in and the error that appears, I'm struggling to realize why the file isn't being located, any help?
Because Windows in its wisdom thinks that hiding extensions of known file types is a good ting. You files is called input_parameters.prp and inputs.in, I guess.
If you give those names it would probably find this files.
To be sure you can open a cmd or powershell windows and run the dir command in that folder to see the complete names.

logstash cannot find log4j2.properties file

I have been trying to setup a proof of concept elasticsearch/kibana/logstash environment, but it is not working at the moment.
The LOGSTASH_HOME is:
c:\_work\issues\log4j_socketappender\logstash-5.0.1\
In the console log of logstash I found the following line:
Could not find log4j2 configuration at path /_work/issues/log4j_socketappender/logstash-5.0.1/config/log4j2.properties. Using default config which logs to console
You can see logstash is trying to look for log4j2.properties in the right location but it does not contain the "c:" part
I tried adding the path to the config\jvm.options
-Dlog4j.configurationFile=c:\_work\issues\log4j_socketappender\logstash-5.0.1\log4j2.properties
but it did not work.
Eventually I fixed it by adding the following line into bin\setup.bat
42. SET JAVA_OPTS=%JAVA_OPTS% -Dlog4j.configurationFile=%LS_HOME%\config\log4j2.properties
Two things come to mind:
Try specifying the full path with -Dlog4j.configurationFile=c:\_work\issues\log4j_socketappender\logstash-5.0.1\log4j2.properties
Also, is the properties file using the new Log4j2 properties syntax? An old log4j 1.2-style properties file will not work. (Although I would expect a different error message in that case.)
as you can see here
create an Environment Variable in Windows LS_SETTINGS_DIR and set it to:
/c:/logstash-5.0.1/config
(notice - leading forward slash and all slashes are unix style not Windows style backslashes)
or to invoke logstash with
--path.settings=/c:/logstash-5.0.1/config/
(again note position and direction of slashes)
I hope that this helps someone avoid the Googling and testing I have just done!

Toxgene can not read XML file

I encluntered a prblem in the execution of TOXGENE tool to generate XML file,
when I execute the command with the template file
C:\toxgene3.2\samples\catalog>toxgene catalog.tsl
template parsing Done!
Generating 200 elements in author_list: Done!
Reading List genre_lists from ./input/genres.xml"
****Error can not parse files ./input/genres.xml
org.apache.xerces.parsers.SAXParser
any suggestions to fix this error
I suffered this problem and it was caused by the jar files in the last release of Xerces-J not being what ToXgene expects. Try changing the bin/toxgene script such that $XERCES_HOME/xerces.jar on the CLASSPATH.
That's it, which was said by Sudantha, but I found a bug too.
If you is using Windows, it is necessary to edit the line 21 (set TG_CP= ...)
of the bin/toxgene.bat file. You need to remove "$" before "%" characters.
By the way, someone knows where I can to download XBench [1] generator or a ToXgene older version?
[1] https://cs.uwaterloo.ca/~tozsu/ddbms/projects/xbench/index.html
Good luck!

Path resolution in eclipse package structure

This is a very simple question for many of you reading this, but it's quite new for me.
Here is a screenshot for my eclipse
When i run this program i get java.io.FileNotFoundException: queries.xml (The system cannot find the file specified) i tried ../../../queries.xml but that is also not working. I really don't understand when to use ../ because it means go 1 step back in dir, and in some cases it works, can anyone explain this? Also how can I refer to queries.xml here. Thanks
Note: I might even use this code on a linux box
I assume it is compiling your code into a build or classes folder, and running it from there...
Have you tried the traditional Java way for doing this:
def query = new XmlSlurper().parse( GroovySlurping.class.getResourceAsStream( '/queries.xml' ) )
Assuming the build step is copying the xml into the build folder, I believe that should work
I don't use Eclipse though, so can't be 100% sure...
Try
file = new File("src/org/ars/groovy/queries.xml");
To check the actual working directory of eclipse you can use
File f = new File(".");
System.out.println(f.getAbsolutePath());
You could try using a property file to store the path of the xml files.
This way you can place the xml files in any location, and simply change the property file.
This will not require a change/recompilation of code.
This would mean you will only need to hardcode the path of the property file.
If you prefer not hardcoding the path of the property file, then you could pass it as an argument during startup in your server setup file. (in tomcat web.xml). Every server will have an equivalent setup file where you could specify the path of the property file.
Alternatively you could specify the path of the xml in this same file, if you don't want to use property files.
This link will show you an example of reading from property files.
http://www.zparacha.com/how-to-read-properties-file-in-java/

Categories

Resources