In order to see the content of my parquet file, I tried running some parquet-tools commands using version 1.9.1 and version
1.6.1 and was quite surprised to see that the newer parquet-tools doesn't
work for me at all:
I want to run the parquet-tool using java -jar command. Bellow the commands I tried and the result obtained
java -jar parquet-tools-1.9.1-SNAPSHOT.jar meta /tmp/test.parquet
java -jar parquet-tools-1.9.1-SNAPSHOT.jar cat /tmp/test.paruet
The obtained result for both commands:
org/apache/hadoop/conf/Configuration
org/apache/hadoop/fs/Path
Can someOne guides me with sample example to resolve this.
Thansk in advance
Related
I have a Java Code where I am able to run it on Intellij using custom configuration. The configuration has following attributes :-
module : java 8 (Oracle OpenJDK 1.8.0_321)
classpath : -cp XYZ.main()
main : com.ABC.XYZ.ManageTraffic
CLI arguements : server XYZ.yml
But when I try to run the jar that was build using gradle from terminal , it gives me Error , could not find or load main class com.ABC.XYZ.ManageTraffic
So far I have tried the following things looking at other solutions at Stackoverflow , still getting the same error
java -jar ques.jar
java -jar ques.jar com.ABC.XYZ.ManageTraffic
java -cp /build/libs/ques.jar com.ABC.XYZ.ManageTraffic
Just to cross check , I unzipped the creataed jar and found that com.ABC.XYZ.ManageTraffic class file is available there , still getting error. What could be the issue?
Run it from the IDE, and while it is running, try to get the command used by the IDE from the process list.
not sure what OS you are using but something like this should work on linux/mac:
ps -ef | grep java
After you have the command you can try to understand why its not working for you, or just use that command
Just want to add how I managed to run it. I created a new shaded jar file of the same application. refreshed its dependencies and now it works. I am yet to find out how creating a shaded jar instead of normal jar helped. Right now the only reason I could figure out is there may be version clashes with some dependencies but I wonder how it could throw could not found main class error.
Anyways , then I ran the file with the following command from terminal:
java -jar ./build/libs/ques-shaded.jar server XYZ.yml
I need to encrypt a pdf document and decided to use itext Version 5.4.0 for this, and everything went well for my local test on my machine(with JAVA 1.8.0), but now I need to move the work to an oracle database 11gR2, and when I load the jar files (iText and bouncycastle) I keep getting the same error: ORA-29534:referenced object could not be resolved. I'm using the loadjava command for this:
loadjava -u SYSTEM/SYS_PWD#SID -o -r -v -f -noverify -synonym -g public itextpdf-5.1.0.jar
I've tried using SYS as well, but still getting the same error code.
I don't know if this has something to do with the JVM, the database uses JAVA 1.5.0.
I've searched about iText java requirements but couldn't found anything
useful, I'll be grateful with any help I can get.
I was able to upload, compile and use the libraries in the .jar files using the same command but with other parameter, and it compiled; the command I used is :
loadjava -u SYS/[pwd]#[SID] -r -v -f -genmissing -s -grant public [file].jar
Hope this can help someone in need out there!
I was able to compile and run my java code from CMD, however when I try to run the same commands in PS, I am getting error messages. I have read and been told that CMD commands will work in PS, but the CMD commands are not working in PS
Here is the line that I am using to execute my program:
java -classpath .;stanford-corenlp-3.8.0.jar;stanford-corenlp-3.8.0-
javadoc.jar;stanford-corenlp-3.8.0-models.jar;stanford-corenlp-3.8.0-
models.jar Test.TestCoreNLP
I am running the command from the directory where my needed JAR files are located. The error message says...
The command stanford-corenlp-3.8.0-models.jar was not found, but does exist
in the current location. Windows PowerShell does not load commands from the
current If you trust this command, instead type: ".\stanford-corenlp-3.8.0-
models.jar".
Made the change and the code looks like this now.
java -classpath .\;stanford-corenlp-3.8.0.jar;stanford-corenlp-3.8.0-
javadoc.jar;stanford-corenlp-3.8.0-models.jar;stanford-corenlp-3.8.0-
models.jar Test.TestCoreNLP
Still getting the exact same error message. I have also tried going up a directory and no luck. I have looked all over StackOverflow and I have done my research.
Any help would be much appreciated.
Thanks.
Using .\ would work for one file, but since you have a number of files, you should reference the current directory in each one of those files.
java -classpath .\stanford-corenlp-3.8.0.jar;.\stanford-corenlp-3.8.0-javadoc.jar;.\stanford-corenlp-3.8.0-models.jar;.\stanford-corenlp-3.8.0-models.jar .\Test.TestCoreNLP
Java 6 also supports wildcards, as this answer indicates, so you might try simply this.
java -cp ".\*" .\Test.TestCoreNLP
I came here with similar trouble, and what I found is that when running like this:
java -cp .\target\somelib.jar;.\target\myapp-1.0-SNAPSHOT.jar com.ethoca.app.myapp
I would get help info. My discovery is that I need to double-quote my list of classpath, like:
java -cp ".\target\somelib.jar;.\target\myapp-1.0-SNAPSHOT.jar" com.ethoca.app.myapp
So, I am not new to Java and compiling in cmd but I am pretty new to using windows powershell. I have 'javac' and 'java' commands running fine in CMD and all java programs compile using netbeans and eclipse. I can also use javac inside windows powershell with no problems, but when attempting to run a java program, i.e. java MyProgram, after compiling it I get the following error...
Error: could not open 'C:\Program Files (x86)\Java\jre7\lib\jvm.cfg
Now I am running Java 8, so I have no idea why it would be looking for a file like this since CMD confirms that both 'java' and 'javac' are running version 8 and have the correct path set, or they would not run there. And please do not just tell me more about setting the paths because I have checked and checked and checked again. Also, I have made sure that anything that is related to java version 7 that I could find has been uninstalled / deleted.
Well, any advice would be appreciated. Thanks a bunch.
Try to start you application using a small cmd oder bat-File. Powershell does a lot of parsing and destroys your call. I usualy use something like this:
$Result = Invoke-Expression "cmd /c $Tempbat"
One alternative is to use the stop-parsing character: --%
icacls c:\scripts --% /grant ***\ScriptAdmin:(CI)(OI)F
So from reading the documentation, the way I'm attempting to invoke rspec is:
java -jar jruby-complete-1.6.7.jar -S spec -b -f d rspec_sanity_check.rb
I've also tried rspec instead of spec. In each case, I get the error:
jruby: No such file or directory -- spec (LoadError)
I'm not sure what to do here. Although the documentation says jruby-complete has rspec, I can't seem to run it.
I'm attempting to use jruby-complete to bootstrap our java based buildsystem so I don't have to install gems on each new vm.
Any thoughts on how to get jruby-complete rspec to work?
seems to work just fine with 1.6.7 :
$ java -jar org.jruby/jruby-complete.jar -S rspec
Run filtered using {:full_description=>/(?-mix:Handler)/}
No examples were matched. Perhaps {:if=>#<Proc:0x8d00c6#/opt/local/rvm/gems/ree-1.8.7-2011.12/gems/rspec-core-2.5.1/lib/rspec/core/configuration.rb:50>, :unless=>#<Proc:0x12dcb8c#/opt/local/rvm/gems/ree-1.8.7-2011.12/gems/rspec-core-2.5.1/lib/rspec/core/configuration.rb:51>} is excluding everything?
Finished in 0.002 seconds
0 examples, 0 failures