Applies To: 

Upgrades of HP ALM and HP QC of all versions


Issue:  

When trying to login to a project, the error "Failed to load properties of project" error displays.  The customer was doing an upgrade in a sandbox environment from QC 10 to ALM 11.52 and suddenly users were not able to access the QC 10 environment as expected.  We also noticed doing a "verify" returned the error, java.lang.NullPointerException. 



Solution: 

During the staging upgrade to 11.52 the DBID.xml file database parameter was still pointing the old QC 10.0 production database server.  This caused the QC 10 prod database to be upgraded to the 11.50 database schema.  When users tried to connect to the database using the QC 10.0 client, the schema was not the same and could not connect. The person doing the upgrade FAILED to remove the project from site admin and restore the correct DBID.xml file with the correct sandbox environment, therefore causing the production database to be upgraded to 11.50.  The Verify Report confirmed the project was in version 11.50 and not QC 10. 


Our 3 main options are as follows: 

  • Roll back the App server and Database VMs entirely
    • Pros: 
      • We start fresh and are 100% sure no data is corrupted
    • Cons:
      • If users began using the Staging environment, any new data is lost since we have to re-upgrade the projects
      • If users were working in the old QC environment, any data since the snapshot will be lost
      • We need to start the migration process over from the square one. 
  • Copy only the upgraded affected databases to the new environment.  Will need to move the databases, remove the project from Site Admin, fix the DBID.xml files accordingly, and restore the project
    • Pros:
      • Any projects upgraded properly wont need to be upgraded again
    • Cons: 
      • This might affect the repository migration process, which is where the old repository gets indexed in the database
      • Potentially lose QC 10 databases which were probably going to be deleted anyways after successful upgrade.  
      • We lose the ability to compare environments to ensure all data was migrated successfully.  Unless if we restore from backups after we copy to the new environment. 
  • Restore database and repository for individual projects from backups taken before upgrade (if possible)
    • Pros: Least risky in terms of maintaining data integrity
    • Cons: This will labor intensive


Appendix: 

com.mercury.optane.core.CTdException

Messages:
Failed to Get Users In Project; Failed to get users of project id = 189; Failed to find project Test1_2013 in domain DEFAULT; Failed to load properties of project 'default::test1_2013'; Constant 'db_directory' does not exist in project default::test1_2013;

Stack Trace:
com.mercury.optane.core.CTdException: Constant 'db_directory' does not exist in project default::test1_2013
at com.mercury.td.tdserver.directory.CDataConstDirectory.getDataConstValue(CDataConstDirectory.java:96)
at com.mercury.td.tdserver.directory.CTdProject.loadDBDirectory(CTdProject.java:1731)
at com.mercury.td.tdserver.directory.CTdProject.loadAllProjectProperties(CTdProject.java:1811)
wrapped in com.mercury.optane.core.CTdException: Failed to load properties of project 'default::test1_2013'
at com.mercury.td.tdserver.directory.CTdProject.loadAllProjectProperties(CTdProject.java:1830)
at com.mercury.td.tdserver.directory.CTdProject.<init>(CTdProject.java:345)
at com.mercury.td.tdserver.directory.CProjectsDirectory.getProjectInfoFromDomSrv(CProjectsDirectory.java:187)
at com.mercury.td.tdserver.directory.CProjectsDirectory.getItem(CProjectsDirectory.java:99)
wrapped in com.mercury.optane.core.CTdException: Failed to find project Test1_2013 in domain DEFAULT
at com.mercury.td.tdserver.directory.CProjectsDirectory.getItem(CProjectsDirectory.java:115)
at com.mercury.td.tdserver.directory.CProjectsDirectory.getItem(CProjectsDirectory.java:130)
at com.mercury.td.tdserver.tdutil.CTdDbContext.determineDbSchemaProperties(CTdDbContext.java:57)
at com.mercury.optane.core.db.CAbsDBContext.getDbSchemaProperties(CAbsDBContext.java:56)
at com.mercury.td.tdserver.tdutil.CTdDbContext.<init>(CTdDbContext.java:36)
at com.mercury.td.tdserver.authentication.CTdSessionContext.<init>(CTdSessionContext.java:132)
at com.mercury.td.tdserver.authentication.CTdSessionContext.dBContext2SessionContext(CTdSessionContext.java:235)
at com.mercury.td.tdserver.tdutil.CTdServerGeneralFunctions.createSessionContext(CTdServerGeneralFunctions.java:2978)
at com.mercury.td.tdserver.tdutil.CTdServerGeneralFunctions.createSessionContext(CTdServerGeneralFunctions.java:2949)
at com.mercury.td.tdserver.customization.CProjectMetaDataLogic.getAdminsOfProject(CProjectMetaDataLogic.java:1490)
at com.mercury.td.saserver.api.logics.CUsersProjectsLogic.getProjectAdministrators(CUsersProjectsLogic.java:1270)
at com.mercury.td.saserver.api.logics.CUsersProjectsLogic.getUsersInProject(CUsersProjectsLogic.java:1301)
wrapped in com.mercury.optane.core.CTdException: Failed to get users of project id = 189
at com.mercury.td.saserver.api.logics.CUsersProjectsLogic.getUsersInProject(CUsersProjectsLogic.java:1362)
at com.mercury.td.saserver.api.logics.CUsersProjectsLogic.getUsersInProjectByProjectId(CUsersProjectsLogic.java:1050)
at com.mercury.td.saserver.api.logics.CUsersProjectsLogic.getUsersInProject(CUsersProjectsLogic.java:1073)
at com.mercury.td.saserver.requests.GetUsersInProject.execute(GetUsersInProject.java:30)
at com.mercury.optane.core.web.RequestsDispatcher.execute(RequestsDispatcher.java:91)
wrapped in com.mercury.optane.core.CTdException: Failed to Get Users In Project
at com.mercury.optane.core.web.RequestsDispatcher.execute(RequestsDispatcher.java:98)
at com.mercury.td.web.CAbsServlet.executeFunction(CAbsServlet.java:449)
at com.mercury.td.web.CAbsServlet.processRequest(CAbsServlet.java:441)
at com.mercury.td.web.CAbsServlet.doPost(CAbsServlet.java:337)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.hp.qc.core.utils.gzipfilter.GZIPFilter.doFilter(GZIPFilter.java:30)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:481)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)