I am trying to run the following command:
/opt/jasperstarter/bin/jasperstarter pr --db-url jdbc:mysql://apps:@192.168.0.232:3306/zinc?useSSL=false
-f pdf
-p Y5Ni%234MAC5nosAyEv6B7dEQE%21iMoC%40
-o /vagrant/ASB5ff7844ac8ae7 /vagrant/project/templates/pdf/jasper/erp-invoice-workorders.jasper
-P ID_ORGANIZATION=632 ID_INVOICE=92214 JASPER_DIR='/vagrant/project/templates/pdf/jasper'
It's not erroring - it's producing a PDF but the values are all NULL so it's clearly not connecting to the database.
Here are the original switches (sans the --db-url
) which produce an error:
-t mysql
-u apps
-H 192.168.0.232
--db-port 3306
-n zinc
The error is pretty obvious:
WARN: Establishing SSL connection without server's identity
verification is not recommended. According to MySQL 5.5.45+, 5.6.26+
and 5.7.6+ requirements SSL connection must be established by default
if explicit option isn't set. For compliance with existing
applications not using SSL the verifyServerCertificate property is set
to 'false'. You need either to explicitly disable SSL by setting
useSSL=false, or set useSSL=true and provide truststore for server
certificate verification. Unable to connect to database: Access denied
for user 'apps'@'192.168.1.241' (using password: YES)
I'm at a loss on what I am doing wrong. JasperStarter doesn't have a "disable SSL" switch, so they recommend specifying that option in the DB URL ?useSSL=false
which I've done but nothing is happening?!?
I've tried placing the passwords, etc inside the DB URI in all various combos with the same results.
I'm not sure if this is a JasperStarter issue or something trivial in the connection string I'm missing, any thoughts or suggestions?
EDIT | I am curious as to whether I have to install JDBC drivers, now that I am using the DB-URI instead of explicit command switches? Internally, wouldn't the binary use that anyway, so how has this worked for all these years, but now because I am using --db-uri
its required?
The commands I have in the vagrant file to install jasperstarter:
# JasperStarter start
sed -i "s/stretch main/stretch main non-free contrib/g" /etc/apt/sources.list && apt-get update && apt-get -y install msttcorefonts
cd /tmp
cp /vagrant/.java/jasperstarter-3.0.0.zip jasperstarter-3.0.0.zip
unzip jasperstarter-3.0.0.zip
mv jasperstarter /opt;
cd /opt/jasperstarter/bin
chmod 777 *
ln -s /usr/share/java/mysql.jar /opt/jasperstarter/jdbc/mysql.jar
apt-get install -y default-jre
# JasperStarter end
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…