Sonar-run client path error - java

SONAR newbie roadblock:
I just installed SONAR on windows XP. Was able to configure it as a service and get the server running.
Then I installed sonar-runner (in a directory named sonar-run), created a sonar-project.properties in root, and configured it to point to my Java src project at C:\sonar-run\src.
Tried running from my Java project src directory - C:\sonar-run\src>..\bin\sonar-runner
First it failed with the message
Unable to resolve path '"C:sonar-runsrc"'
so I escaped the path with extra backslashes "C:\\sonar-run\\src", then I am stuck at this error:
C:\sonar-run\src>..\bin\sonar-runner
C:\sonar-run
Runner configuration file: C:\sonar-run\conf\sonar-runner.properties
Project configuration file: C:\sonar-run\src\sonar-project.properties
Runner version: 1.3
...
...
Exception in thread "main" org.sonar.batch.bootstrapper.BootstrapException: org.sonar.api.utils.SonarException: Unable to resolve path '"C:\sonar-run\src"'
at org.sonar.runner.Runner.delegateExecution(Runner.java:189)
Caused by: org.sonar.api.utils.SonarException:
Unable to resolve path **'"C:\sonar-run\src"'**
What I think is the error : something to do with Unix/Windows/path/escape sequence.
Observation : earlier I was using C:\runsonar as the folder name and it was escaping \r as a special character.
CONCLUSION: Though this is a localized error I faced, these are the learnings for SONAR newbies:
When you are sonar-runner as the client program , you need to understand SONAR was designed for *nix, so how it behaves in Windows is different and not clearly documented
In the properties file> windows path for src > you need to escape the \
If you path contains a folder starting with r. e.g \src\red then even after escaping like src\\red it will become src \r ed which means a return character, so on for \n etc.

You have to remove the double quotes in the properties file
The error message says
Unable to resolve path '"*C:\sonar-run\src"*'
Your entry should look like
C:\sonar-run\src

Related

Not able to Start Hybris server

I am using JDK 11.0.6 version and hybris 1905, I am able to build setup successfully but when I start server I am getting below error
FATAL | wrapper | The argument
'1905\hybris\bin\platform\tomcat/conf/wrapper.conf' is not a valid
property name-value pair.
What is the reason for this?
In the path, there must be a folder specified with space in the name like: "hybris 1905" so try removing this space. rename it to something like: "hybris_1905" then run ant clean all command and then start the server.
When developers received above error message, they should check complete path. Even folder name should not have any space, else you will get this error message.
For example,
C:\projects\abc xyz\hybris\ will give this error.(Wrong approach)
C:\projects\abcxyz\hybris\ will resolve the issue.(Correct approach)
Note: While working on Hybris project, we should not give any space for folder/directive name and we should avoid giving long folder/directive name.

stanford nlp coreference resolution error: Exception in thread "main" java.lang.IllegalArgumentException: File doesn't exist: example_file.txt

I downloaded stanfordCoreNLP module version stanford-corenlp-full-2018-02-27 from the download page and unzipped the file. created a example_file.txt file in the directory where it was extracted. I added the text My name is Sam. I want to be an astronaut. I had snacks a while ago.. I navigated to the folder it was extracted to and tried to run the example code given for co-reference resolution in the command line
stanfordNLP page
java -Xmx5g -cp stanford-corenlp-3.9.1.jar:stanford-corenlp-3.9.1-sources.jar:* edu.stanford.nlp.pipeline.StanfordCoreNLP -annotators tokenize,ssplit,pos,lemma,ner,parse,mention,coref -coref.algorithm neural -file example_file.txt
I am getting below error message
Exception in thread "main" java.lang.IllegalArgumentException: File doesn't exist: example_file.txt
at edu.stanford.nlp.io.FileSequentialCollection$FileSequentialCollectionIterator.primeNextFile(FileSequentialCollection.java:364)
at edu.stanford.nlp.io.FileSequentialCollection$FileSequentialCollectionIterator.<init>(FileSequentialCollection.java:269)
at edu.stanford.nlp.io.FileSequentialCollection.iterator(FileSequentialCollection.java:238)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.processFiles(StanfordCoreNLP.java:1166)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.processFiles(StanfordCoreNLP.java:1010)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.run(StanfordCoreNLP.java:1365)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.main(StanfordCoreNLP.java:1427)
Any help on this?
Java lookup resources within the classpath that you defined with -cp option. The directory that contains example_file.txt should probably be included in it
-cp ".:stanford-corenlp-3.9.1.jar:stanford-corenlp-3.9.1-sources.jar:*"
The dot added to the class path means this directory which apparently contains your file. Also, double quotes prevent the shell to expand the wildcard at the end that it should not be there in my opinion unless it contains jars relevant to the app. At most, it could be *.jar.

Running Tomcat server with SSL certificate triggers could not find or load main class cert.pkcs12

I've been following this guide to setup SSL certificate on my Tomcat server.
https://docs.oracle.com/cd/E29585_01/PlatformServices.61x/security/src/tsec_ssl_jsp_pkcs12.html
When I try to run the .bat file with there mentioned parameters (with my pwd):
-Djavax.net.ssl.keyStoreType=PKCS12
-Djavax.net.ssl.keyStore=%CLIENT_CERT%
-Djavax.net.ssl.keyStorePassword=endeca
-Djavax.net.ssl.trustStore=%CLIENT_CERT%
-Djavax.net.ssl.trustStorePassword=endeca
I get this error at the startup:
Error: Could not find or load main class Files\Java\jre7\lib\security\cert.pkcs12
Any idea what am I doing wrong?
The issue is caused by the space in java installation path C:\Program Files\Java. Install java into a path without spaces will resolve the issue.
Update
Add quotes around the path solve also the issue. Thanks #Ondrej

Java error while running maxent in biomod2

I am running maxent from R, in the package biomod2 and the following error appeared. I do not come from a technical background and wasn't sure why is this error happening. Is it a memory problem or someone said the java path is not set. But I followed the instructions to set maxent to run in R and also downloaded Java Platform, Standard Edition Development Kit and set a path for it as explained in this pdf: http://modata.ceoe.udel.edu/dev/dhaulsee/class_rcode/r_pkgmanuals/MAXENT4R_directions.pdf
I would be really grateful if you could help me understand this problem and any solution to it.
Thanks a lot
Error in file(file, "rt") : cannot open the connection
In addition: Warning messages:
1: running command 'java' had status 1
2: running command 'java -mx512m -jar E:\bioclim_2.5min\model/maxent.jar environmentallayers
="rainfed/models/1432733200/m_47203134/Back_swd.csv"
samplesfile="rainfed/models/1432733200/m_47203134/Sp_swd.csv"
projectionlayers="rainfed/models/1432733200/m_47203134/Predictions/Pred_swd.csv"
outputdirectory="rainfed/models/1432733200/rainfed_PA1_Full_MAXENT_outputs"
outputformat=logistic redoifexists visible=FALSE linear=TRUE quadratic=TRUE
product=TRUE threshold=TRUE hinge=TRUE lq2lqptthreshold=80 l2lqthreshold=10
hingethreshold=15 beta_threshold=-1 beta_categorical=-1 beta_lqp=-1
beta_hinge=-1 defaultprevalence=0.5 autorun nowarnings notooltips
noaddsamplestobackground' had status 1
3: In file(file, "rt") :
cannot open file 'rainfed/models/1432733200/rainfed_PA1_Full_MAXENT_outputs/rainfed_PA1_
Full_Pred_swd.csv': No such file or directory
I've just manage to solve this problem - it is a problem with the file path specified. For me, I had a space in one of the folder names which was not accepted in the path to the maxent.jar file. From looking at your error, it looks like it might be the two backslashes.
E:\bioclim_2.5min\model/maxent.jar
should probably read
E:/bioclim_2.5min/model/maxent.jar

cannot find org.neo4j.batchimport

I am continuing to have trouble with the import.bat file for the Neo4j batch importer. I started a new thread as the original problem was resolved.
from the command prompt I run
import.bat test.db sample\nodes.csv sample\rels.csv
With some variations on the path listing for the files, including absolute paths. I continue to get the following error message
The system cannot find the path specified.
Error: Could not find or load main class org.neo4j.batchimport.Importer
I also tried running import.sh from Cygwin and in my Debian VM but keep getting the error
Error: Could not find or load main class org.neo4j.batchimport.Importer
What am I doing wrong?
Please download the zip-file, not the github clone.
This is a pre-build binary as outlined in the readme, that doesn't require that you have to have maven installed to build it.

Categories

Resources