[ https://issues.apache.org/jira/browse/CLOUDSTACK-2947?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Srikanteswararao Talluri updated CLOUDSTACK-2947: ------------------------------------------------- Description: NPE while creating template ===START=== 10.252.192.7 -- GET command=createTemplate&response=json&sessionkey=78yZ9E1cc1DcOk9TqRoqnU2ycyU%3D&snapshotid=3528aa5d-ddfe-4527-8887-2b1047c61e53&name=td&displayText=td&osTypeId=d59bb3b2-cdf8-11e2-8fc8-06f1ac000077&isPublic=true&passwordEnabled=false&_=1371028371311 2013-06-12 10:37:02,111 DEBUG [cloud.api.ApiDispatcher] (catalina-exec-5:null) Object entity uuid = undefined does not exist in the database. 2013-06-12 10:37:02,111 INFO [cloud.api.ApiServer] (catalina-exec-5:null) Unable to execute API command queryasyncjobresult due to invalid value. Invalid parameter jobid value=undefined due to incorrect long value format, or entity does not exist or due to incorrect parameter annotation for the field in api cmd class. 2013-06-12 10:37:02,114 DEBUG [cloud.api.ApiServlet] (catalina-exec-5:null) ===END=== 10.252.192.33 -- GET command=queryAsyncJobResult&jobId=undefined&response=json&sessionkey=%2BuRMVVnN2JBVe6oDv%2B0ZAqV8gso%3D&_=1371028371208 2013-06-12 10:37:02,283 DEBUG [cloud.async.AsyncJobManagerImpl] (catalina-exec-16:null) submit async job-140, details: AsyncJobVO {id:140, userId: 2, accountId: 2, sessionKey: null, instanceType: Template, instanceId: 206, cmd: org.apache.cloudstack.api.command.user.template.CreateTemplateCmd, cmdOriginator: null, cmdInfo: {"sessionkey":"78yZ9E1cc1DcOk9TqRoqnU2ycyU\u003d","ctxUserId":"2","httpmethod":"GET","osTypeId":"d59bb3b2-cdf8-11e2-8fc8-06f1ac000077","isPublic":"true","response":"json","id":"206","displayText":"td","snapshotid":"3528aa5d-ddfe-4527-8887-2b1047c61e53","passwordEnabled":"false","name":"td","_":"1371028371311","ctxAccountId":"2","ctxStartEventId":"579"}, cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, processStatus: 0, resultCode: 0, result: null, initMsid: 7635042566263, completeMsid: null, lastUpdated: null, lastPolled: null, created: null} 2013-06-12 10:37:02,286 DEBUG [cloud.api.ApiServlet] (catalina-exec-16:null) ===END=== 10.252.192.7 -- GET command=createTemplate&response=json&sessionkey=78yZ9E1cc1DcOk9TqRoqnU2ycyU%3D&snapshotid=3528aa5d-ddfe-4527-8887-2b1047c61e53&name=td&displayText=td&osTypeId=d59bb3b2-cdf8-11e2-8fc8-06f1ac000077&isPublic=true&passwordEnabled=false&_=1371028371311 2013-06-12 10:37:02,289 DEBUG [cloud.async.AsyncJobManagerImpl] (Job-Executor-27:job-140) Executing org.apache.cloudstack.api.command.user.template.CreateTemplateCmd for job-140 2013-06-12 10:37:02,403 DEBUG [cloud.template.TemplateManagerImpl] (Job-Executor-27:job-140) Failed to create templatejava.lang.NullPointerException 2013-06-12 10:37:02,426 ERROR [cloud.async.AsyncJobManagerImpl] (Job-Executor-27:job-140) Unexpected exception while executing org.apache.cloudstack.api.command.user.template.CreateTemplateCmd com.cloud.utils.exception.CloudRuntimeException: Failed to create templatejava.lang.NullPointerException at com.cloud.template.TemplateManagerImpl.createPrivateTemplate(TemplateManagerImpl.java:1770) at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125) at org.apache.cloudstack.api.command.user.template.CreateTemplateCmd.execute(CreateTemplateCmd.java:256) at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:155) at com.cloud.async.AsyncJobManagerImpl$1.run(AsyncJobManagerImpl.java:437) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) 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-06-12 10:37:02,433 DEBUG [cloud.async.AsyncJobManagerImpl] (Job-Executor-27:job-140) Complete async job-140, jobStatus: 2, resultCode: 530, result: Error Code: 530 Error text: Failed to create templatejava.lang.NullPointerException was: NPE while creating template Unexpected exception while executing org.apache.cloudstack.api.command.user.template.CreateTemplateCmd java.lang.NullPointerException at org.apache.cloudstack.storage.image.manager.ImageDataStoreManagerImpl.getImageDataStore(ImageDataStoreManagerImpl.java:60) 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:43) at sun.reflect.GeneratedMethodAccessor36.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 org.apache.cloudstack.storage.datastore.DataStoreManagerImpl.getDataStore(DataStoreManagerImpl.java:47) 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:43) at sun.reflect.GeneratedMethodAccessor36.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 sun.reflect.GeneratedMethodAccessor36.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.template.TemplateManagerImpl.createPrivateTemplate(TemplateManagerImpl.java:1716) 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.event.ActionEventInterceptor.AroundAnyMethod(ActionEventInterceptor.java:41) at sun.reflect.GeneratedMethodAccessor93.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:161) at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80) at com.cloud.utils.db.TransactionContextBuilder.AroundAnyMethod(TransactionContextBuilder.java:37) at sun.reflect.GeneratedMethodAccessor36.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 org.apache.cloudstack.api.command.user.template.CreateTemplateCmd.execute(CreateTemplateCmd.java:258) 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 com.cloud.utils.db.TransactionContextBuilder.invoke(TransactionContextBuilder.java:60) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) > NPE while creating template > --------------------------- > > Key: CLOUDSTACK-2947 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-2947 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Template > Affects Versions: 4.2.0 > Environment: advanced zone > Reporter: Srikanteswararao Talluri > Assignee: edison su > Priority: Blocker > Fix For: 4.2.0 > > > NPE while creating template > ===START=== 10.252.192.7 -- GET > command=createTemplate&response=json&sessionkey=78yZ9E1cc1DcOk9TqRoqnU2ycyU%3D&snapshotid=3528aa5d-ddfe-4527-8887-2b1047c61e53&name=td&displayText=td&osTypeId=d59bb3b2-cdf8-11e2-8fc8-06f1ac000077&isPublic=true&passwordEnabled=false&_=1371028371311 > 2013-06-12 10:37:02,111 DEBUG [cloud.api.ApiDispatcher] > (catalina-exec-5:null) Object entity uuid = undefined does not exist in the > database. > 2013-06-12 10:37:02,111 INFO [cloud.api.ApiServer] (catalina-exec-5:null) > Unable to execute API command queryasyncjobresult due to invalid value. > Invalid parameter jobid value=undefined due to incorrect long value format, > or entity does not exist or due to incorrect parameter annotation for the > field in api cmd class. > 2013-06-12 10:37:02,114 DEBUG [cloud.api.ApiServlet] (catalina-exec-5:null) > ===END=== 10.252.192.33 -- GET > command=queryAsyncJobResult&jobId=undefined&response=json&sessionkey=%2BuRMVVnN2JBVe6oDv%2B0ZAqV8gso%3D&_=1371028371208 > 2013-06-12 10:37:02,283 DEBUG [cloud.async.AsyncJobManagerImpl] > (catalina-exec-16:null) submit async job-140, details: AsyncJobVO {id:140, > userId: 2, accountId: 2, sessionKey: null, instanceType: Template, > instanceId: 206, cmd: > org.apache.cloudstack.api.command.user.template.CreateTemplateCmd, > cmdOriginator: null, cmdInfo: > {"sessionkey":"78yZ9E1cc1DcOk9TqRoqnU2ycyU\u003d","ctxUserId":"2","httpmethod":"GET","osTypeId":"d59bb3b2-cdf8-11e2-8fc8-06f1ac000077","isPublic":"true","response":"json","id":"206","displayText":"td","snapshotid":"3528aa5d-ddfe-4527-8887-2b1047c61e53","passwordEnabled":"false","name":"td","_":"1371028371311","ctxAccountId":"2","ctxStartEventId":"579"}, > cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, > processStatus: 0, resultCode: 0, result: null, initMsid: 7635042566263, > completeMsid: null, lastUpdated: null, lastPolled: null, created: null} > 2013-06-12 10:37:02,286 DEBUG [cloud.api.ApiServlet] (catalina-exec-16:null) > ===END=== 10.252.192.7 -- GET > command=createTemplate&response=json&sessionkey=78yZ9E1cc1DcOk9TqRoqnU2ycyU%3D&snapshotid=3528aa5d-ddfe-4527-8887-2b1047c61e53&name=td&displayText=td&osTypeId=d59bb3b2-cdf8-11e2-8fc8-06f1ac000077&isPublic=true&passwordEnabled=false&_=1371028371311 > 2013-06-12 10:37:02,289 DEBUG [cloud.async.AsyncJobManagerImpl] > (Job-Executor-27:job-140) Executing > org.apache.cloudstack.api.command.user.template.CreateTemplateCmd for job-140 > 2013-06-12 10:37:02,403 DEBUG [cloud.template.TemplateManagerImpl] > (Job-Executor-27:job-140) Failed to create > templatejava.lang.NullPointerException > 2013-06-12 10:37:02,426 ERROR [cloud.async.AsyncJobManagerImpl] > (Job-Executor-27:job-140) Unexpected exception while executing > org.apache.cloudstack.api.command.user.template.CreateTemplateCmd > com.cloud.utils.exception.CloudRuntimeException: Failed to create > templatejava.lang.NullPointerException > at > com.cloud.template.TemplateManagerImpl.createPrivateTemplate(TemplateManagerImpl.java:1770) > at > com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125) > at > org.apache.cloudstack.api.command.user.template.CreateTemplateCmd.execute(CreateTemplateCmd.java:256) > at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:155) > at > com.cloud.async.AsyncJobManagerImpl$1.run(AsyncJobManagerImpl.java:437) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) > at java.util.concurrent.FutureTask.run(FutureTask.java:166) > 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-06-12 10:37:02,433 DEBUG [cloud.async.AsyncJobManagerImpl] > (Job-Executor-27:job-140) Complete async job-140, jobStatus: 2, resultCode: > 530, result: Error Code: 530 Error text: Failed to create > templatejava.lang.NullPointerException -- 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