what is it wrong? about jar file in linux running - linux

0
I am using Java 11
when I running the source code in intelligence it was working very well but when I packed jar flie after that I running the jar file it show the error
like
"Java.lang.classnamefoundexception: org.apache.hive.jdbc.HiveDriver"
when I running the jar I use this command
"Java-jar test.jar"
the part of source code is "Class.forName("org.apache.hive.jdbc.HiveDriver")
I don't understand I run in local(intellij) is good work
but I used in Linux env it show above the error
if know the why is wrong please give me a hand
I want to add up image I can't do it because of my company policy... thanks
I searched all the site

Related

How to make webDriver testsuite created in windows machine to run in a linux box

I have got selenium WebDriver testsuite done using TestNg framework. I have used selenium webDriver 2.44.0 & FF32.
Now my build team wants my test to run in their demo box which is linux machine. 10..*.248 box
What i have done till now. I am not using any other tools like jenkis, maven etc.
Created java project 'myproject' testsuite in ecplise luna using
TestNg frame in my windows machine
Created a runnable Jar for myproject( myproject-version-1.0.1.jar)
Placed the runnable jar in 248 box using winSCP in a folder /home/project/
In 248 machine FF37 is available. So i upgraded my script with selenium 2.45.0 . It runs fine in my windows machine with FF32 version also.
Now using putty i logged into 248 machine and reached the folder /home/project/ where my runnable jar is placed.
I executed the shell command java -jar myproject-version-1.0.1.jar
Console shows the following exception:
[TestNG] Running:
Command line suite
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
Error: no display specified
Error: no display specified
I know i have not done correctly. I read few links posted here about about setting display in linux machine , using Xvfb – the X Virtual FrameBuffer.
Webdriver Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms
I think the person who posted the question in above link had done the similar settings. !
Can somebody please help me with this as i am not able to understand :( Step by step process so that i can run my script in build team's machine.
I am very new to this field and doing all this for the first time. I read someting about headless GUI etc. I am not able to understand.
Would really appreciate if you could help me understand the steps involved.
You have done pretty much the right things as specified in the question
One thing that I came to observer that you have not specified complete URL in the get method. This might cause you some trouble. So first edit
driver.get("docs.seleniumhq.org/");
to
driver.get("http://docs.seleniumhq.org/");
If the code still doesn't works. Then try bundling latest selenium-java.jar and selenium-standalone.jar
But from the error it also seems that may be port 7055 is not free. (but I think you already checked that.)
So the problem gets a little bit confined to the selenium jars which are often incompatible if they are of different versions.

RFT testscripts not executing

I have just installed RFT version 8.3.0 for testing a mainframe application. I imported the appropriate rftjdtr files to the project. But i am unable to execute any of the testcases. When i press the run ( or debug) button, nothing happens. There are no error messages popping up. I suspect it is a java configuration issue on my machine. I have tried comparing the settings with another machine where it is working fine. It is the first time that i am using RFT, so i do not know what to do. Can somebody please help me with this?
I have encountered the same issue. This may be because of workspace error. Create a new workspace and run the script.

Installing JavaComm API on Ubuntu

I know this question has been asked several times around the internet, but I have spent about a week trying to solve this problem with little luck.
I am trying to install JavaCommAPI (an archived Java package to allow communication with rs232) on a remote linux Ubuntu 11.0, 32-bit server in order to deploy a web project which I have developed on a local apache server on my windows PC.
The thing that puzzles me is, I am able to get the .war web project to deploy on a local apache server on a separate 32-bit LinuxMint16 PC by correctly placing the javax.comm.properties, comm.jar, and libSerialParallel.so files in their respective places.
I use System.getProperty("java.library.path"); in order to find the correct library path in order to install correct files.
On my LinuxMint16:
javax.comm.properties -- /usr/lib/jvm/java-7-openjdk-i386/jre/lib
comm.jar -- /usr/lib/jvm/java-7-openjdk-i386/jre/lib/ext
libSerialParallel.so -- /usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386
....works!
On my remote Ubuntu server I did the exact same for its reported library path
(for example: /usr/local/jdk/jdk1.7.0_45/jre/lib/javax.comm.properties ;
/usr/local/jdk/jdk1.7.0_45/jre/lib/ext/comm.jar ;
/usr/local/jdk/jdk1.7.0_45/jre/lib/i386/libSerialParallel.so)
...fails =(
Things of note: I added the needed apache jars and comm.jar to my libraries in Eclipse using the BuildPath wizard (right click on project --> Build Path-->add external jars) which points to local files on my PC which I obviously cannot use for a remote server which I am only accessing through command line. May this is affecting it somehow?
I tried to get error output (System.err) from the Java Console printed to a separate file for my remote server as that feedback was very helpful in getting all the files sorted on my LinuxMint PC.
PrintStream ps = new PrintStream(pathName);
System.setOut(ps);
System.setErr(ps);
Which again, is oddly working beautifully to print the stream to a local .txt file on my LinuxMintPC but not to the one I designate on my remote ubuntu server.
I am really at a wits end here!! Am I mixing and matching appropriate versions of Systems prohibiting things to run smoothly? I am not sure how to proceed from here, if anyone has any insights I would die of happiness. Thanks
I needed to install OPEN JDK7 on my ubuntu, put files in appropriate library paths (as described above) and now it works.

Configure Eclipse to run perl on linux

i'm kinda all-eclipse so i'm trying to use Eclipse to execute perl scripts. On Windows i was able to configure everyting fine within a minute, so i had hole perl in one tool (Eclipse).
How to configure External tool within Eclipse to run perl scripts on linux? It seem's i've got problems with 'Location' and 'Arguments' within definition of a new configuration for external tool.
It works only if i put '/something/test.pl' in Location with empty Arguments field. But this works only for 1 file. Kinda now what i'm going for...
Does some1 manage to configure Eclipse to run perl on linux? If so, i'm humble asking you to share the solution :)
Here's how it looks and what i'm getting:
http://s21.postimg.org/g2rnzvqs7/eclipse1.png
http://s11.postimg.org/y4klufjo3/eclipse2.png
Thx in advance to all of you :)

Build Process failed with maven package

I am working on a maven project to build a simple utility api. The same source code when build on my office win XP machine, was successful. Now i am at home and working with same source code on CentOS machine. Here the build process failed strangely. The error it reports is ideally in my points should we warning message. As shown below.
[ERROR] com.vsd.Provider:[12,240] The import java.util.Set is never used
Can you please give me some idea, where can I look into?
It's hard to say without seeing your POM but the error reported looks like a violation of the Checkstyle rule UnusedImports (or something equivalent). Maybe this verification is triggered because of a setting defined in a profile that is not activated on your CentOS machine (as I said, hard to say). Anyway, to fix it, remove the unused import.
The problem was with the plug in being used to compile, It was a bug a shown below.
http://jira.codehaus.org/browse/MCOMPILER-118

Resources