首页 > 解决方案 > 惠普 ALM | REST API 错误 ALM-E10004:加载项目失败?

问题描述

我正在使用 HP ALM 版本 11.52.809。

身份验证后,我尝试使用以下 REST-API 获取域列表:

http://19.17.16.69:7424/qcbin/rest/domains

我收到以下错误:

HTTP ERROR 500
Problem accessing /qcbin/rest/domains. Reason:

    ALM-E10004: Failed to load project 'null' from domain 'null'.
Caused by:
java.lang.NullPointerException
at com.hp.alm.platform.directory.CProjectsDirectory.getItem(CProjectsDirectory.java:79)
    wrapped in com.hp.alm.platform.siteadmin.session.ProjectDoesNotExisatException: ALM-E10004: Failed to load project 'null' from domain 'null'.
at com.hp.alm.platform.directory.CProjectsDirectory.getItem(CProjectsDirectory.java:125)
at org.hp.qc.impl.customization.CustomizationServiceImpl.getCustomization(CustomizationServiceImpl.java:73)
at org.hp.qc.impl.customization.CustomizationServiceImpl.getDefaultCustomization(CustomizationServiceImpl.java:55)
at sun.reflect.GeneratedMethodAccessor173.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
at org.hp.qc.impl.aspects.cache.ReturnValueCachingAspect$CacheResult.get(ReturnValueCachingAspect.java:228)
at org.hp.qc.impl.aspects.cache.ReturnValueCachingAspect.invoke(ReturnValueCachingAspect.java:107)
at sun.reflect.GeneratedMethodAccessor155.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy63.getDefaultCustomization(Unknown Source)
at org.hp.qc.impl.customization.CustomizationServiceImpl.find(CustomizationServiceImpl.java:44)
at sun.reflect.GeneratedMethodAccessor154.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy63.find(Unknown Source)
at org.hp.qc.impl.services.sessionmanagement.AuthenticationImpl.getPrincipal(AuthenticationImpl.java:73)
at com.hp.sw.bto.ast.security.lwsso.authenticator.springSecurity.SpringSecurity2LWSSOIntegrationFilter.createSecurityContext(SpringSecurity2LWSSOIntegrationFilter.java:263)
at com.hp.sw.bto.ast.security.lwsso.authenticator.springSecurity.SpringSecurity2LWSSOIntegrationFilter.creatSecurityContextForNonExistingUser(SpringSecurity2LWSSOIntegrationFilter.java:239)
at com.hp.sw.bto.ast.security.lwsso.authenticator.springSecurity.SpringSecurity2LWSSOIntegrationFilter.doFilter(SpringSecurity2LWSSOIntegrationFilter.java:172)
at org.hp.qc.web.restapi.authentication.QCSpringSecurity2lwssoIntegrationFilter.doFilter(QCSpringSecurity2lwssoIntegrationFilter.java:29)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.hp.qc.web.restapi.sessionmanagement.ImplicitSessionFilter.doFilter(ImplicitSessionFilter.java:76)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.hp.qc.web.restapi.authentication.QC2SpringIntegrationFilter.LWSSO2SpringSecurityIntegrationFilterDoFilter(QC2SpringIntegrationFilter.java:350)
at org.hp.qc.web.restapi.authentication.QC2SpringIntegrationFilter.doFilter(QC2SpringIntegrationFilter.java:71)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)

是什么导致了这个错误?是否需要在 ALM 端进行任何设置或特权?

提前致谢 :)

标签: apirestalmhp-alm

解决方案


没有看到实际代码,只能猜测做了什么。话虽如此,这里是来自 Microfocus 的文档,它会很有帮助。

域: https ://admhelp.microfocus.com/alm/api_refs/REST_TECH_PREVIEW/Content/REST_API_Tech_Preview/REST/domains.html?Highlight=domain

项目: https ://admhelp.microfocus.com/alm/api_refs/REST_TECH_PREVIEW/Content/REST_API_Tech_Preview/REST/projects.html

提问时请提供您尝试过的代码,即使是 API 请求,也很重要您如何进行身份验证,contentType 和其他标头信息是否已正确传递。所以,用一些真实的代码更新你的问题。


推荐阅读