Ah - I know what happened - need to flush the DB.

KC

On Dec 3, 2014, at 1:17 PM, Kuang-Ching Wang <kuangching.w...@gmail.com> wrote:

> I noticed the latest commit that reverts this.  After pulling the change, Add 
> Host works correctly.
> 
> However, when creating a VM, the Instances page will throw the following 
> ERROR and show nothing.
> 
> 2014-12-03 13:15:22,720 ERROR [c.c.a.ApiServer] (catalina-exec-3:ctx-23e1ec5b 
> ctx-baa51695) unhandled exception executing api command: 
> [Ljava.lang.String;@2bf86dad
> com.cloud.utils.exception.CloudRuntimeException: DB Exception on: 
> com.mysql.jdbc.JDBC4PreparedStatement@29a37b5e: SELECT user_vm_view.id, 
> user_vm_view.name, user_vm_view.display_name, user_vm_view.account_id, 
> user_vm_view.account_uuid, user_vm_view.account_name, 
> user_vm_view.account_type, user_vm_view.domain_id, user_vm_view.domain_uuid, 
> user_vm_view.domain_name, user_vm_view.domain_path, 
> user_vm_view.instance_group_id, user_vm_view.instance_group_uuid, 
> user_vm_view.instance_group_name, user_vm_view.vm_type, user_vm_view.state, 
> user_vm_view.created, user_vm_view.removed, user_vm_view.instance_name, 
> user_vm_view.guest_os_id, user_vm_view.guest_os_uuid, 
> user_vm_view.hypervisor_type, user_vm_view.ha_enabled, 
> user_vm_view.limit_cpu_use, user_vm_view.display_vm, 
> user_vm_view.last_host_id, user_vm_view.private_ip_address, 
> user_vm_view.private_mac_address, user_vm_view.pod_id, user_vm_view.pod_uuid, 
> user_vm_view.data_center_id, user_vm_view.data_center_uuid, 
> user_vm_view.data_center_name, user_vm_view.security_group_enabled, 
> user_vm_view.host_id, user_vm_view.host_uuid, user_vm_view.host_name, 
> user_vm_view.template_id, user_vm_view.template_uuid, 
> user_vm_view.template_name, user_vm_view.template_display_text, 
> user_vm_view.password_enabled, user_vm_view.iso_id, user_vm_view.iso_uuid, 
> user_vm_view.iso_name, user_vm_view.iso_display_text, 
> user_vm_view.disk_offering_id, user_vm_view.disk_offering_uuid, 
> user_vm_view.disk_offering_name, user_vm_view.service_offering_id, 
> user_vm_view.service_offering_uuid, user_vm_view.service_offering_name, 
> user_vm_view.cpu, user_vm_view.speed, user_vm_view.ram_size, 
> user_vm_view.pool_id, user_vm_view.pool_uuid, user_vm_view.pool_type, 
> user_vm_view.volume_id, user_vm_view.volume_uuid, 
> user_vm_view.volume_device_id, user_vm_view.volume_type, 
> user_vm_view.security_group_id, user_vm_view.security_group_uuid, 
> user_vm_view.security_group_name, user_vm_view.security_group_description, 
> user_vm_view.vpc_id, user_vm_view.vpc_uuid, user_vm_view.nic_id, 
> user_vm_view.nic_uuid, user_vm_view.is_default_nic, user_vm_view.ip_address, 
> user_vm_view.gateway, user_vm_view.netmask, user_vm_view.ip6_address, 
> user_vm_view.ip6_gateway, user_vm_view.ip6_cidr, user_vm_view.mac_address, 
> user_vm_view.broadcast_uri, user_vm_view.isolation_uri, 
> user_vm_view.network_id, user_vm_view.network_uuid, 
> user_vm_view.network_name, user_vm_view.traffic_type, 
> user_vm_view.guest_type, user_vm_view.public_ip_id, 
> user_vm_view.public_ip_uuid, user_vm_view.public_ip_address, 
> user_vm_view.user_data, user_vm_view.project_id, user_vm_view.project_uuid, 
> user_vm_view.project_name, user_vm_view.keypair_name, user_vm_view.job_id, 
> user_vm_view.job_uuid, user_vm_view.job_status, user_vm_view.tag_id, 
> user_vm_view.tag_uuid, user_vm_view.tag_key, user_vm_view.tag_value, 
> user_vm_view.tag_domain_id, user_vm_view.tag_account_id, 
> user_vm_view.tag_resource_id, user_vm_view.tag_resource_uuid, 
> user_vm_view.tag_resource_type, user_vm_view.tag_customer, 
> user_vm_view.affinity_group_id, user_vm_view.affinity_group_uuid, 
> user_vm_view.affinity_group_name, user_vm_view.affinity_group_description, 
> user_vm_view.uuid, user_vm_view.dynamically_scalable FROM user_vm_view WHERE 
> user_vm_view.id=3
>       at 
> com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:425)
>       at 
> com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:361)
>       at 
> com.cloud.api.query.dao.UserVmJoinDaoImpl.searchByIds(UserVmJoinDaoImpl.java:410)
>       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:606)
>       at 
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>       at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
>       at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
>       at 
> com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
>       at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
>       at 
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
>       at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
>       at 
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
>       at com.sun.proxy.$Proxy177.searchByIds(Unknown Source)
>       at 
> com.cloud.api.query.QueryManagerImpl.searchForUserVMsInternal(QueryManagerImpl.java:1016)
>       at 
> com.cloud.api.query.QueryManagerImpl.searchForUserVMs(QueryManagerImpl.java:764)
>       at 
> org.apache.cloudstack.api.command.user.vm.ListVMsCmd.execute(ListVMsCmd.java:227)
>       at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:141)
>       at com.cloud.api.ApiServer.queueCommand(ApiServer.java:698)
>       at com.cloud.api.ApiServer.handleRequest(ApiServer.java:523)
>       at com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:283)
>       at com.cloud.api.ApiServlet$1.run(ApiServlet.java:127)
>       at 
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
>       at 
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
>       at 
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
>       at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:124)
>       at com.cloud.api.ApiServlet.doGet(ApiServlet.java:86)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>       at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>       at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>       at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>       at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>       at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>       at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>       at 
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:615)
>       at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>       at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
>       at 
> org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:889)
>       at 
> org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:744)
>       at 
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2282)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>       at java.lang.Thread.run(Thread.java:745)
> Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown 
> column 'user_vm_view.tag_uuid' in 'field list'
>       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>       at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>       at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>       at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
>       at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
>       at com.mysql.jdbc.Util.getInstance(Util.java:386)
>       at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
>       at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3597)
>       at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3529)
>       at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1990)
>       at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2151)
>       at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2625)
>       at 
> com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2119)
>       at 
> com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2281)
>       at 
> org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
>       at 
> org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
>       at 
> com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:419)
>       ... 45 more
> 
> 
> On Dec 3, 2014, at 3:38 AM, Wei ZHOU <ustcweiz...@gmail.com> wrote:
> 
>> It looks related to commit 31db58f7204ac8bb434599ff51d794640718845c
>> 
>> 2014-12-03 9:47 GMT+01:00 Kuang-Ching Wang <kuangching.w...@gmail.com>:
>> 
>>> Hi, with the latest master, while adding the first host I saw the
>>> following NPE in ApiDBUtils.java.  Any insight what might I have missed?
>>> 
>>> 2014-12-03 00:32:41,694 DEBUG [c.c.a.ApiServlet]
>>> (catalina-exec-4:ctx-8caaed15) ===START===  10.1.13.69 -- GET
>>> command=listHosts&response=json&sessionkey=S6b4kjRLRd6vYcUU4uR8xqH%2F0lo%3D&type=routing&page=1&pagesize=1&_=1417595569129
>>> 2014-12-03 00:32:41,696 DEBUG [c.c.a.q.QueryManagerImpl]
>>> (catalina-exec-4:ctx-8caaed15 ctx-a7bc81da) >>>Searching for hosts>>>
>>> 2014-12-03 00:32:41,701 DEBUG [c.c.a.q.QueryManagerImpl]
>>> (catalina-exec-4:ctx-8caaed15 ctx-a7bc81da) >>>Generating Response>>>
>>> 2014-12-03 00:32:41,702 ERROR [c.c.a.ApiServer]
>>> (catalina-exec-4:ctx-8caaed15 ctx-a7bc81da) unhandled exception executing
>>> api command: [Ljava.lang.String;@7bb3621
>>> java.lang.NullPointerException
>>>       at com.cloud.api.ApiDBUtils.getHostStatistics(ApiDBUtils.java:892)
>>>       at
>>> com.cloud.api.query.dao.HostJoinDaoImpl.newHostResponse(HostJoinDaoImpl.java:179)
>>>       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:606)
>>>       at
>>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>>>       at
>>> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
>>>       at
>>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
>>>       at
>>> com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
>>>       at
>>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
>>>       at
>>> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
>>>       at
>>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
>>>       at
>>> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
>>>       at com.sun.proxy.$Proxy274.newHostResponse(Unknown Source)
>>>       at com.cloud.api.ApiDBUtils.newHostResponse(ApiDBUtils.java:1738)
>>>       at
>>> com.cloud.api.query.ViewResponseHelper.createHostResponse(ViewResponseHelper.java:236)
>>>       at
>>> com.cloud.api.query.QueryManagerImpl.searchForServers(QueryManagerImpl.java:1551)
>>>       at
>>> org.apache.cloudstack.api.command.admin.host.ListHostsCmd.execute(ListHostsCmd.java:186)
>>>       at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:141)
>>>       at com.cloud.api.ApiServer.queueCommand(ApiServer.java:698)
>>>       at com.cloud.api.ApiServer.handleRequest(ApiServer.java:523)
>>>       at
>>> com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:283)
>>>       at com.cloud.api.ApiServlet$1.run(ApiServlet.java:127)
>>>       at
>>> org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
>>>       at
>>> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
>>>       at
>>> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
>>>       at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:124)
>>>       at com.cloud.api.ApiServlet.doGet(ApiServlet.java:86)
>>>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>>>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>>>       at
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>>>       at
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>>>       at
>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>>>       at
>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>>>       at
>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>>>       at
>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>>>       at
>>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:615)
>>>       at
>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>>>       at
>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
>>>       at
>>> org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:889)
>>>       at
>>> org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:744)
>>>       at
>>> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2282)
>>>       at
>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>>>       at
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>>>       at java.lang.Thread.run(Thread.java:745)
>>> 
>>> 
> 
> 

Reply via email to