Error upgrading community server from 7.2 to 7.5

I always updated server the same way following instructions on the upgrade manual.

This time, I believe due to the changes in keystore in 7.5 I get this: (See the last error)

Error creating bean with name 'themeSource' defined in ServletContext resource [/WEB-INF/applicationContext-themes.xml]: Cannot resolve reference to bean 'themeCache' while setting bean property 'themeCache'
Error creating bean with name 'themeCache' defined in ServletContext resource [/WEB-INF/applicationContext-themes.xml]: Cannot resolve reference to bean 'unsecureRepositoryService' while setting bean property 'repositoryService'; 
Error creating bean with name 'hibernateRepositoryService' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'hibernateRepositoryListeners' while setting bean property 'repositoryListeners';
Error creating bean with name 'hibernateRepositoryListeners' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'schedulingReportDeleteListener' while setting constructor argument with key [0];
Error creating bean with name 'schedulingReportDeleteListener' defined in ServletContext resource [/WEB-INF/applicationContext-report-scheduling.xml]: Cannot resolve reference to bean 'reportSchedulingService' while setting bean property 'schedulingService';
Error creating bean with name 'reportSchedulingService' defined in ServletContext resource [/WEB-INF/applicationContext-report-scheduling.xml]: Cannot resolve reference to bean 'securedReportJobsPersistenceService' while setting bean property 'persistenceService'
Error creating bean with name 'securedReportJobsPersistenceService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'reportJobSecurity' defined in ServletContext resource [/WEB-INF/applicationContext-report-scheduling.xml]: Cannot resolve reference to bean 'authenticationManager' while setting bean property 'authenticationManager';
Error creating bean with name 'authenticationManager' defined in ServletContext resource [/WEB-INF/applicationContext-security.xml]: Cannot resolve reference to bean 'daoAuthenticationProvider' while setting constructor argument with key [0];  
Error creating bean with name 'daoAuthenticationProvider' defined in ServletContext resource [/WEB-INF/applicationContext-security.xml]: Cannot resolve reference to bean 'passwordEncoder' while setting bean property 'passwordEncoder'; 
Error creating bean with name 'passwordEncoder': Unsatisfied dependency expressed through field 'keystoreManager'; 
Error creating bean with name 'keystoreManager': Invocation of init method failed; 
Failed to instantiate [com.jaspersoft.jasperserver.crypto.KeystoreManager]: Please make sure that `create-keystore` was executed; 

KeystoreManager was never initialized or there are errors while instantiating the instance.

gustavofarias's picture
Joined: May 22 2012 - 7:10am
Last seen: 3 weeks 2 days ago

Can you please provide exact steps on how did you perform your upgrade? Can you clarify the next points?:

  1. what OS type
  2. what App Server was used
  3. what steps did you take
  4. which user was used to perform install/upgrade and under which user your app server starts
  5. did you check the latest Upgrade Guide with updated information?
Yuri Savochenko - 3 years 4 months ago

1. Ubuntu 18.04.3 kernel 4.15

2. Tomcat 8.5.39

3. -Downloaded the .bin installer (jasperreports-server-cp-7.5.0-bin)

-unziped, gave permnissions

-copied buildomatic/sample_conf/postgresql_master.properties to /buildomatic

-renamed to default_master.properties

-edited appServerTypeCATALINA_HOMECATALINA_BASEdbHostdbUsernamedbPassword and webAppNameCE

-ran js-upgrade-samedb-ce.sh test

- stopped Tomcat

- ran js-upgrade-samedb-ce.sh

- started Tomcat, which started OK but was unable to start the specific Jasperreports server app.

4. Used root as always to run js-upgrade-samedb-ce.sh, but later I tryed with tomcat8 user. Same result. I run Tomcat with sudo service Tomcat8 start, but I believe it uses tomcat8 user to operate.

5. I checked the manuals that come with the package.

I payed special attention to JasperReports-Server-CP-Upgrade-Guide.pdf A.1.3 Encyption Keys. But it doen't apply to me as I never configured custom keys (in fact I don't even know which keys are those).

Also, the same doc on chapter "2.8 Additional Tasks to Complete the Upgrade" says to refer JasperReports Server Security Guide

On the JasperReports-Server-Security-Guide.pdf, I refered to 3.1.1 Keys During Upgrade, but it just says to refer to the upgade guide!

The chapter 3.1 Managing Keys During Installation says that .jrsks, .jrsksp, and keystore.init.properties are created during installation. I checked that all 3 files were created and are in the correct location (pointed by keystore.init.properties).

gustavofarias - 3 years 4 months ago

Just got this in my inbox:

Managing Encryption & Keystore Files in Jaspersoft Reports Server 7.5+
https://marketo.tibco.com/index.php/email/emailWebview

The need for an event like this means something.

gustavofarias - 2 years 9 months ago

3 Answers:

That exception comes from the web app not being able to access the keystore files.

What directory did the keystore files end up in?

Did the user running the web app process have access to those files?

The encryption change in 7.5 has a major impact on deployment and operations. We are working to give folks the easiest path to adjust to this change. See https://community.jaspersoft.com/wiki/encryption-jasperreports-server-75 

swood_1's picture
9338
Joined: Nov 15 2012 - 10:47am
Last seen: 3 years 1 month ago

What directory did the keystore files end up in?

ks=/root
ksp=/root
As I run the buildomatic upgrade script as root, this is expected.

Did the user running the web app process have access to those files?

Probably not. The user tomcat8 is the one running the java that runs the container.
I tried to run buildomatic as tomcat8 but it failed.
Maybe I should give permissions to tomcat 8 on /root/.jrks/ and .jrksp. Which is not exactly beaultiful.

gustavofarias's picture
Joined: May 22 2012 - 7:10am
Last seen: 3 weeks 2 days ago

You should move the .jrsks and .jrsksp files to a directory that tomcat can access.

I updated the https://community.jaspersoft.com/wiki/encryption-jasperreports-server-75 page with instructions on how to do this.

 

swood_1's picture
9338
Joined: Nov 15 2012 - 10:47am
Last seen: 3 years 1 month ago
Feedback
randomness