Return-Path: X-Original-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B85CBE6B6 for ; Wed, 13 Feb 2013 05:12:13 +0000 (UTC) Received: (qmail 80257 invoked by uid 500); 13 Feb 2013 05:12:13 -0000 Delivered-To: apmail-incubator-cloudstack-dev-archive@incubator.apache.org Received: (qmail 80216 invoked by uid 500); 13 Feb 2013 05:12:13 -0000 Mailing-List: contact cloudstack-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-dev@incubator.apache.org Received: (qmail 80198 invoked by uid 99); 13 Feb 2013 05:12:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Feb 2013 05:12:12 +0000 Date: Wed, 13 Feb 2013 05:12:12 +0000 (UTC) From: "Hongtu Zang (JIRA)" To: cloudstack-dev@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-1237) Register Template fails with "Cannot find template adapter for XenServer" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CLOUDSTACK-1237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13577338#comment-13577338 ] Hongtu Zang commented on CLOUDSTACK-1237: ----------------------------------------- I fixed this bug. In TemplateManagerImpl.java, function getAdapter(), "TemplateAdapterType.Hypervisor.getName()" returns "HyervisorAdapter", while it should returns "HyervisorTemplateAdapter". So, in AdapterBase.java function getAdapterByName() returns null. https://reviews.apache.org/r/9420/ > Register Template fails with "Cannot find template adapter for XenServer" > ------------------------------------------------------------------------- > > Key: CLOUDSTACK-1237 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-1237 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the default.) > Components: Management Server > Affects Versions: 4.1.0 > Environment: RHEL 6.3, XenServer 5.6 > Reporter: Sowmya Krishnan > Assignee: Anthony Xu > Priority: Blocker > Fix For: 4.1.0 > > Attachments: mslog_1237 > > > I am trying to Register a custom rhel template. It's unable to find the template adapter. > This is with latest off 4.1 branch. I am using a private build that uses CentOS packaging. > I am trying to run this on Rhel 6.3 with Xenserver 5.6. > Although this looks related to https://issues.apache.org/jira/browse/CLOUDSTACK-1070 I am not very sure. > Exception: > 2013-02-12 12:30:26,465 DEBUG [cloud.api.ApiServlet] (catalina-exec-15:null) ===START=== 10.144.7.15 -- GET command=registerTemplate&response=json&sessionkey=GwJQ8fFTEJsC%2BXurGG3sRXalpMs > %3D&name=Rhel.vhd&displayText=RHEl+ws+template&url=http%3A%2F%2F10.144.7.15%2FRef_106.vhd&zoneid=3785b828-93d7-45cc-84df-9f4ec53ef3af&format=VHD&isextractable=false&passwordEnabled=false&os > TypeId=0a5a3e9e-7439-11e2-8735-ca9c098803af&hypervisor=XenServer&ispublic=true&isfeatured=true&_=1360652434419 > 2013-02-12 12:30:26,521 ERROR [cloud.api.ApiServer] (catalina-exec-15:null) unhandled exception executing api command: registerTemplate > com.cloud.utils.exception.CloudRuntimeException: Cannot find template adapter for XenServer > at com.cloud.template.TemplateManagerImpl.getAdapter(TemplateManagerImpl.java:192) > at com.cloud.template.TemplateManagerImpl.registerTemplate(TemplateManagerImpl.java:221) > 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.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > 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:43) > at sun.reflect.GeneratedMethodAccessor35.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.RegisterTemplateCmd.execute(RegisterTemplateCmd.java:229) > 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) > at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622) > at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:159) > 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.GeneratedMethodAccessor35.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:616) -- 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