I am trying to load a file from a repository I checked out. I am getting this error:
new File( iFilePath )
Err: Build failed with Error: java.io.FileNotFoundException: Y:\Jenkins\workspace\TestBuilds\Matlab\m\Contents.m (The system cannot find the path specified)
This is explained because Jenkins try to look for the file on the master. While the file is actually located on the slave agent.
Any way to get around this ?
Check out this answer: https://stackoverflow.com/a/42018578/3486967
I don't think you can use the File class on anything but the Jenkins master; try using the FilePath class
Related
I'm trying to get to a local file from sybase iq.
My code to connect to my file is like this:
USNIG CLIENT FILE 'C://TEMP/A.TXT'
If i run it on iq workspace it's working perfectly.
If i run this query via a service.cs it's not working and i get error:
ERROR [HY000] "operation failed on file due to file permission FILE: C://TEMP/A.TXT
i tried to find an answer via google but nothing...
the DSN is ok.
Any idea what to do?
Thanks!
I am running Redis on Windows and have not been able to run it using the config file.
I tried running:
redis-server 'filepath'/conf/redis.conf
but I get the error saying
"redis fatal error can't open config file"
How can I resolve this issue and have the Redis server read the config file?
For windows:
redis-server "CONFIG_FILE_PATH"
Please make sure that config and log file have file read and write permission.
You can also specify the config path for Linux in the same way.
"Fatal error, can't open config file"
Redis server might have no read privilege on this config file or config file doesn't exist.
This is an example of how I solved mine
redis-server C:/Users/<name>/Downloads/redis/64bit/redis.conf & --daemonize yes
Don't try any command, Just double click on Redis app.
I'm working on setting up an ArangoDB cluster in an Ubuntu machine based on these instructions :
https://docs.arangodb.com/3.0/Manual/Deployment/Distributed.html
I keep getting the below error when i execute the first command in the above documentation with sudo. I ensured that all the directories
pointing to in the /etc/arangod.conf file has the required permissions. Please can you let me know if i'm missing something here.
Below is the error i get :
2016-08-23T07:29:52Z [26629] FATAL unable to create database directory: Failed to create directory [agency1] Permission denied
The command passes the database directory on the command line (agency1) and arangodb doesn't seem to have rights to create agency1 in your current working directory.
Either provide a proper working directory on the command line or specify one in the config file.
You need to first change the directory to /var/lib/arangodb3 or whatever data directory you have set and then run the command.
So I followed the tutorial on the H2 Documentation page and used the "Connecting to a Database using JDBC" method of connecting to the database. I First added the h2-*.jar file to the Lib Folder (through Netbeans) and used the following to make the connection to my database I previously created.
Class.forName("org.h2.Driver");
connection = DriverManager.getConnection("jdbc:h2:~/" + DatabaseName);
This turned out to work in the IDE environment, however when I attempted to run the application directly from the jar executable I get the following error:
java.lang.ClassNotFoundException: org.h2.Driver ...
this error occurs at the Class.forName() class loader. So I did a little looking around and found that this was a prominent problem. One solution people use was to extract the class Loader from the current Thread as so:
Thread t = Thread.currentThread();
ClassLoader cl = t.getContextClassLoader();
cl.getClass().getClassLoader();
Class toRun = cl.loadClass("org.h2.Driver");
Unfortunately this seems to still result in the same error, so i'm wondering what i'm doing wrong. Should I be doing something to make sure the Driver is in the class path? I have no I idea how if that's the case.
Thanks!
You need to add the h2-*.jar file to the classpath when running the application, for example using
java -cp h2*.jar -jar yourApp.jar
I am trying to connect my Postgres database in MATLAB and it is throwing me an error stating
"'JDBC Driver Error: org.postgresql.Driver. Driver Not Found/Loaded.'"
Here's my connection method that i have used.
conn = database('postgres','username','password','org.postgresql.Driver', 'jdbc:postgresql://localhost:5432/postgres=postgres');
after that it throws me the error.
I have looked at forums and they told me to add the postgres jar files to the MATLAB directory toolkit textfile, such as below.
C:\Program Files\PostgreSQL\pgJDBC\postgresql-8.4.702.jdbc3.jar
C:\Program Files\PostgreSQL\pgJDBC\postgresql-8.4.702.jdbc4.jar
I don't know where else I am going wrong. Please advise.
Thank you.
You should add jar file with JDBC driver to your dynamic java class path before connecting to database. I believe you can add only one file depending on your requirements. Check the versions difference here.
To avoid warning if a jar file already in the path add some check:
%# add class path (if not in the class path)
p = 'C:\Program Files\PostgreSQL\pgJDBC\postgresql-8.4.702.jdbc3.jar';
if ~ismember(p,javaclasspath)
javaaddpath(p)
end