Sailaja Mada created CLOUDSTACK-1472:
----------------------------------------
Summary: AssignVirtualMachine API with wrong Virtual Instance ID
failed with NPE
Key: CLOUDSTACK-1472
URL: https://issues.apache.org/jira/browse/CLOUDSTACK-1472
Project: CloudStack
Issue Type: Bug
Security Level: Public (Anyone can view this level - this is the default.)
Components: API
Affects Versions: 4.1.0
Reporter: Sailaja Mada
Setup: Advanced Networking zone with KVM 6.3 host
Steps:
1. Create Account1 under CDC domain of root
2. Create Account2 under CDC domain of root
3. Login to MS as Account1 and Deploy Virtual machine with default Source NAT
offering network
4. Try to assignvirtual machine to Account2 by providing wrong VM ID which does
not exist.
http://10.102.192.251:8096/client/api?command=assignVirtualMachine&account=account2&domainid=2&virtualmachineid=cbc41c64-7044-4bb1-b8d2-193b5bf68f2e
Observation : It failed with NPE:
2013-03-01 16:25:51,775 ERROR [cloud.api.ApiServer] (ApiServer-1:null)
unhandled exception executing api command: assignVirtualMachine
java.lang.NullPointerException
at
com.cloud.dao.EntityManagerImpl.findByUuidIncludingRemoved(EntityManagerImpl.java:67)
at sun.reflect.GeneratedMethodAccessor182.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)
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
com.cloud.utils.db.TransactionContextBuilder.AroundAnyMethod(TransactionContextBuilder.java:37)
at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
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 $Proxy132.findByUuidIncludingRemoved(Unknown Source)
at
com.cloud.api.ApiDispatcher.translateUuidToInternalId(ApiDispatcher.java:355)
at com.cloud.api.ApiDispatcher.setFieldValue(ApiDispatcher.java:467)
at com.cloud.api.ApiDispatcher.processParameters(ApiDispatcher.java:209)
at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:133)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at
org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at
org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
at
com.cloud.utils.db.TransactionContextBuilder.AroundAnyMethod(TransactionContextBuilder.java:37)
at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
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.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622)
at com.cloud.api.ApiServer.queueCommand(ApiServer.java:498)
at com.cloud.api.ApiServer.handleRequest(ApiServer.java:347)
at com.cloud.api.ApiServer.handle(ApiServer.java:283)
at org.apache.http.protocol.HttpService.doService(HttpService.java:375)
at
org.apache.http.protocol.HttpService.handleRequest(HttpService.java:290)
at com.cloud.api.ApiServer$WorkerTask.run(ApiServer.java:956)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
2013-03-01 16:25:51,902 ERROR [cloud.api.ApiServer] (ApiServer-2:null) invalid
request, no command sent
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira