sxssf-workbook-createsheet-fails-on-linux-environment (OEL 8.5), Solaris 11.4 - apache-poi

SXSSFWorkbook workbook.createSheet() method fails on a linux-environment(OEL 8.5) without throwing any kind of meaningful error (it's just hanging).
Strangely, the same method on the XSSFWorkbook createSheet class works fine. Below are the snippets of code. Has anyone experienced a similar issue before?
final SXSSFWorkbook workbook = new SXSSFWorkbook(new XSSFWorkbook(), 100, true, true);
workbook.setCompressTempFiles(true);
Sheet sheet = workbook.createSheet("Sheet 1"); //this method fails
final XSSFWorkbook workbook = new XSSFWorkbook();
Sheet sheet = workbook.createSheet("Sheet 1"); // this works fine
we are using the apache POI 4.1.2 version. This same code is working fine in windows environment. verified the fonts below, they are already installed. Any idea what is missing in Linux environment please let me know. Any pointers (OR) any logs in the Linux where we can get more details, please share.
sudo apt-get update
sudo apt-get install fontconfig

Setting the -Djava.io.tmpdir=/u01/tmp -Djava.awt.headless=true to the weblogic start params fixed this issue.
Please make sure to give full permissions to the /u01/tmp dir.

Related

KeeWeb fails: the name org,freedesktop.secrets was not provided by any .service files on nixos

I am trying to get KeeWeb working in Nixos.
It is not in the 20.09 channel, and so I tried writing a derivation for it... and failed. Luckily after some more searching I found out someone else had already done it ! Wonderful!
So I copied the code from : https://github.com/sikmir/nixpkgs/blob/master/pkgs/applications/misc/keeweb/default.nix . And imported it into my home manager setup. It builds fine but when I run it it only opens an error dialog:
"Error loading app. Error: the name org,freedesktop.secrets was not provided by any .service files"
A bit of seaerching points me into the direction of gnome-keyring and libsecret. Even a PR that addresses this issue, so you would think its fixed... but alas.
I changed the src to point to the latest version, but still no luck.
So probably something I am missing on my setup.
Can you help me ?
Try to enable gnome-keyring daemon in your NixOS configuration:
services.gnome3.gnome-keyring.enable = true;

Anaconda Navigator does not open (Windows 10)

I just downloaded and installed Anaconda3 on windows 10 platform.
Apparently, the installation process finished successfully however I can't open Anaconda Navigator.
What I'm doing is just clicking on "Anaconda Navigator" icon from start menu.
After a while an empty console window pops up twice, then it desappears immediately without showing an error message and nothing seems to happen after that.
I've been reading about similar errors and found out that running this command, conda update --all might solve the problem.
I tried it out, but ended up getting a network connection problem for a particular URL.
But my internet connection is working fine since I'm actually able to access that URL from the browser and get a response.
It's worth mentioning that I've already uninstall Anaconda3 and set up the following user environment variables.
Any help would be appreciated, thanks in advance!
Finally found a solution to this problem, I recommend you to read the official documentation and follow the steps described there in order to make sure everything was installed correctly.
Check out this article:
https://docs.anaconda.com/anaconda/install/verify-install/
After trying to starting up Anaconda Navigator from the console I got this specific error that helped me to get a final solution.
Basically I just had to move some files within anaconda3 installation folder from one path to another.
Navigate to %ANACONDA_HOME%\Library\bin, there you will find the files listed below
libcrypto-1_1-x64.dll
libcrypto-1_1-x64.pdb
libssl-1_1-x64.dll
libssl-1_1-x64.pdb
So, just move them to this path: %ANACONDA_HOME%\DLLs
Give it a try one more time and you will be able to run it.
Note:
%ANACONDA_HOME% refers to Anaconda3 installation folder in your computer.
This answer is based on this link: Anaconda navigator not launching windows 10 (Spyder as well)

getting error : Server terminated early with status 127 in selenium chrome driver

When I try to do unit test with chrome driver, I am getting error : Server terminated early with status 127, I have installed chrome driver still getting error. Can anyone please help me why I am getting this issue. Here is my code ,
let webdriver = require("selenium-webdriver");
let chromeOptions = new chrome.Options();
chromeOptions.addArguments("test-type");
chromeOptions.addArguments("start-maximized");
chromeOptions.addArguments("--js-flags=--expose-gc");
chromeOptions.addArguments("--enable-precise-memory-info");
chromeOptions.addArguments("--disable-popup-blocking");
chromeOptions.addArguments("--disable-default-apps");
chromeOptions.addArguments("--disable-infobars");
driver = new webdriver.Builder()
.forBrowser("chrome")
.setChromeOptions(chromeOptions)
.build();
In my case I was missing a Java Runtime environment (JRE). I’m running e2e tests with Selenium in a Debian-based docker image, hence sudo apt-get install default-jre did the trick for me. It’s a pity selenium doesn’t give a more useful error message in this case.
Follow the steps :-
apt-get install default-jre
apt-get -f install for a fix install
apt-get install chromium-browser Make sure to install the correct version of chrome related to your chromedriver, e.g. chrome 60-62 for chromedriver 2.33
Config webdriver to start chrome in ‘headless’ mode, as to avoid other unnecessary dependencies. In node it looks like:
const options = new chromeDriver.Options();
options.addArguments(
'headless',
'disable-gpu',
);
new webdriver.Builder()
.forBrowser('chrome')
.setChromeOptions(options)
.build();
In case anybody here is trying to run a headless chromium instance on an Azure vm, you'll need:
Java JRE (apt: java-common)
Chromium -- even if the dependencies in your code include it (apt: chromium-chromedriver)
Alternatively (for the virtual environment), you can set up xvfb as described here. But, you'll save yourself a lot of time if you just install the apt.
I spent a few hours here figuring this out until it worked, hope it helps somebody in the future.
My specific use case was a Node.js server running on an Azure instance (I think a b2ms? machine size .. it's $15/mo) running Ubuntu 18.04 which queries websites of interest for certain keywords every minute or so

QSqlDatabase: QMYSQL driver not loaded

I have a problem with Qt connecting with MySql, when i run this code
QSqlDatabase DBObject = QSqlDatabase::addDatabase("QMYSQL");
DBObject.setHostName("localhost");
DBObject.setDatabaseName("SingleDB");
DBObject.setUserName("root");
DBObject.setPassword("abc123");
bool ok = DBObject.open();
I got this...
QSqlDatabase: QMYSQL driver not loaded
I Have already done this also:
sudo apt-get install libmysqlclient
and
/home/wrm/Qt/5.12.3/gcc_64/bin/qmake "INCLUDEPATH+=/usr/local/include" "LIBS+=-L/usr/local/lib -lmysqlclient_r" mysql.pro
and here i have this error:
Project ERROR: Library 'mysql' is not defined
Any idea?
Usually, when you get a "driver not loaded" error, the problem is the path where the libqsqlmysql.so is.
That library is contained in the plugins/sqldrivers folder of your Qt installation and that (sqldrivers) folder should be available to your executable.
You have to make sure that the sqldrivers folder is in the same folder of your executable (that is one of the default lookup paths) or change those paths within your code using QCoreApplication::addLibraryPath
So, to sum it up:
be sure of the path of the sqldrivers folder (or change the plugin lookup path)
be sure to link against libmysqlclient as well (on my system libmysqlclient_r is just a link to libmysqlclient)
Try posting some small piece of code that does not work for you.

HowTo: Run "SUDO" code in App

I'm working on a Mac App which aims to install several software easilly.
To do so, I'm for instance installing Homebrew (https://brew.sh).
The problem is simple: to run scripts / installers code I found 2 ways:
1) Process.Start("thing to execute")
2) Security.Authorization.Create()... ExecuteWithPrivileges.
Actually, I'm, for instance installing HomeBrew with this code.
var defaults = Security.AuthorizationFlags.Defaults;
using (var auth = Security.Authorization.Create(defaults))
{
var args = new[] { "BrewInstall.sh" };
var ret = auth.ExecuteWithPrivileges("/bin/sh", defaults, args);
}
The problem I'm facing is quite simple: when I try (later on) to use HomeBrew I find out that everything has been executed with a strange user and that I cannot access to the App itself.
Is there any way to execute a portion of code as SUDO? When I try to put it into the external commands I get an error like "sudo: you must have a tty to run sudo"
I checked on the Apple docs but I can't find anything to solve this problem. If I try to change the Security.AuthorizationFlags, the system don't prompt me anymore for credentials and it's simply not working any more.
Thanks

Resources