On Windows, we can verify which Java CABI Jasper uses by checking Windows registry hive: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache Software Foundation\Procrun 2.0\cabusinessintelligencetomcat\Parameters\Java
It shows something like: C:/Program Files/CA/SharedComponents/CA Business Intelligence/java\bin\server\jvm.dll
So, we need to import the mail server SSL certificates to C:\Program Files\CA\SharedComponents\CA Business Intelligence\java\lib\security\cacerts keystore
Release : 17.2, 17.1
Component : JASPERSOFT REPORTS FOR SERVICE MANAGEMENT
Follow below steps to import:
1) Work with your mail server admin and obtain the SSL certificate (in Base 64 format) and all the certificates in the certificate chain that the server certificate has.
Example: mailserver_cert.cer, intermediate.cer, root.cer
2) backup the C:\Program Files\CA\SharedComponents\CA Business Intelligence\java\lib\security\cacerts file first.
Note: default password for this keystore is: changeit
3) Import all the certificates into this keystore using Java's keytool command
C:\Program Files\CA\SharedComponents\CA Business Intelligence\java\bin\keytool -import -trustcacerts -alias server1 -file "c:\foo\bar\mailserver_cert.cer" -keystore "C:\Program Files\CA\SharedComponents\CA Business Intelligence\java\lib\security\cacerts" -storepass changeit
C:\Program Files\CA\SharedComponents\CA Business Intelligence\java\bin\keytool -import -trustcacerts -alias intermediate -file "c:\foo\bar\intermediate.cer" -keystore "C:\Program Files\CA\SharedComponents\CA Business Intelligence\java\lib\security\cacerts" -storepass changeit
C:\Program Files\CA\SharedComponents\CA Business Intelligence\java\bin\keytool -import -trustcacerts -alias root -file "c:\foo\bar\root.cer" -keystore "C:\Program Files\CA\SharedComponents\CA Business Intelligence\java\lib\security\cacerts" -storepass changeit
4) restart Jasper and retest
NOTE: If need be, we can also try to import the same certs here too: C:\Program Files\CA\SharedComponents\CA Business Intelligence\jre\lib\security (It's another Java that CABI Jasper might use).
Next Step is to setup the mail server information for scheduling:
1) To Schedule a Report and send the output of report to email with attachment & also send success or failure notification email.
2) Backup and update the file: C:\Program Files\CA\SharedComponents\CA Business Intelligence\apache-tomcat\webapps\jasperserver-pro\WEB-INF\js.quartz.properties
(below example is for gmail.com account
report.scheduler.web.deployment.uri=http://127.0.0.1:8080/jasperserver-pro/
report.scheduler.mail.sender.host=smtp.gmail.com
[email protected]
report.scheduler.mail.sender.password=foobartestjasper
[email protected]
report.scheduler.mail.sender.protocol=smtp
report.scheduler.mail.sender.port=587
3) Save the file
4) Further, if your mail server requires authentication, change below property from false to true as shown in below.
C:\Program Files\CA\SharedComponents\CA Business Intelligence\apache-tomcat\webapps\jasperserver-pro\WEB-INF\applicationContext-report-scheduling
<bean id="reportSchedulerMailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
<property name="host" value="${report.scheduler.mail.sender.host}"/>
<property name="username" value="${report.scheduler.mail.sender.username}"/>
<property name="password" value="${report.scheduler.mail.sender.password}"/>
<property name="protocol" value="${report.scheduler.mail.sender.protocol}"/>
<property name="port" value="${report.scheduler.mail.sender.port}"/>
<property name="javaMailProperties">
<props>
<prop key="mail.smtp.auth">true</prop>
<prop key="mail.smtp.starttls.enable">true</prop>
</props>
</property>
</bean>
5) Save the file
Restart CABI Jasper Server service.
Test scheduling a report to be sent on email.