Upgrade CA API Developer portal 3.5 from CR2 to CR7, there is no errors during the install, but unable to authenticate any user to login to the API portal.
The catalina.out shows following errors,
### when starting the tomcat,
ERROR (localhost-startStop-1:) - [general] -- org.hibernate.InvalidMappingException: Could not parse mapping document from unknown
Caused by: org.hibernate.PropertyNotFoundException: field [hmacKey] not found on com.thelevel.cms.users.User
INFO (localhost-startStop-1:) - [ExternalResourceManager general] -- Could not add mapping: useradmin-mapping.hbm.xml
ERROR (localhost-startStop-1:) - [APIServices general] -- org.hibernate.MappingException: Unknown entity: com.thelevel.cms.users.Role
### when login,
INFO: getExtension: Gateway Authentication Plugin not started. Returning null for GatewayUserManagementHandler: authenticationHandler
ERROR (http-nio-37080-exec-3:) - [ProfileManagerXMLSource general] -- User doesn't exist
ERROR (http-nio-37080-exec-3:) - [JForumFilter general] -- javax.servlet.ServletException: Servlet execution threw an exception
The root cause is due to an old lib file,
The "org.hibernate.PropertyNotFoundException" indicates the object "com.thelevel.cms.users.User" in the old lib has no property "hmacKey" which defined in useradmin-mapping.hbm.xml, therefore the portal cannot load the User object properly, so it causes failure on authentication.
If we want to backup the old jar file, we should move it in a folder other than the tomcat lib folder /opt/Deployments/lrs/server/webapps/ROOT/WEB-INF/lib, otherwise the tomcat will still try to load the old jar file.
Remove the /opt/Deployments/lrs/server/webapps/ROOT/WEB-INF/lib/com.thelevel.cms_v6.4_old.jar resolve the problem.