You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Chiradeep Vittal <Ch...@citrix.com> on 2012/10/09 20:39:38 UTC

Re: anyway to debug after changing part of code?

https://cwiki.apache.org/confluence/display/CLOUDSTACK/Using+Eclipse+With+C
loudStack

On 10/9/12 11:36 AM, "Nitin Mehta" <Ni...@citrix.com> wrote:

>You can use the eclipse debugger and set breakpoints.
>
>> Caused by: java.sql.SQLException: Field 'kddihosttags' doesn't have a
>> default value
>
>seems to be the root cause. Can you shed light how you have introduced
>the new column ?
>
>On 09-Oct-2012, at 8:43 PM, sx chen wrote:
>
>> Hi,all
>>    I have a problem with developing with CloudStack,This is my problem:
>>    even  I change a single line of source code,I have to run "run
>> clean-all build-all" again to get updated environment,It's awesome.
>> a more important thing is I can't debug. every time I have to rubuild
>>and
>> view management log and mysql general log to get the
>> useful information.anyone here can give me some suggestion about develop
>> with CloudStack.
>> 
>>   also,there is a log here,I have change the source code list here to
>>add
>> a colomn to table account
>> 
>> package api:
>> 
>> com.cloud.api.commands.CreateAccountCmd
>> 
>> com.cloud.user.Account
>> 
>> com.cloud.user.AccountService
>> 
>> com.cloud.user.UserAccount
>> 
>> 
>> 
>> package core:
>> 
>> com.cloud.user.AccountVO
>> 
>> com.cloud.user.UserAccountVO
>> 
>> 
>> 
>> package server:
>> 
>> com.cloud.user.AccountManager
>> 
>> com.cloud.user.AccountManagerImpl
>> 
>> com.cloud.user.MockAccountManagerImpl
>> 
>> 
>> ui:
>> 
>> account.js
>> 
>> the log is here:
>> 
>> Exception while executing CreateAccountCmd:
>> 
>> com.cloud.utils.exception.CloudRuntimeException: DB Exception on:
>> org.apache.commons.dbcp.DelegatingPreparedStatement@78c7370b
>> 
>>        at
>> com.cloud.utils.db.GenericDaoBase.persist(GenericDaoBase.java:1304)
>> 
>>        at
>> com.cloud.utils.db.DatabaseCallback.intercept(DatabaseCallback.java:30)
>> 
>>        at
>> 
>>com.cloud.user.AccountManagerImpl.createAccount(AccountManagerImpl.java:1
>>560)
>> 
>>        at
>> com.cloud.utils.db.DatabaseCallback.intercept(DatabaseCallback.java:30)
>> 
>>        at
>> 
>>com.cloud.user.AccountManagerImpl.createUserAccount(AccountManagerImpl.ja
>>va:724)
>> 
>>        at
>> 
>>com.cloud.utils.component.ComponentLocator$InterceptorDispatcher.intercep
>>t(ComponentLocator.java:1185)
>> 
>>        at
>> 
>>com.cloud.api.commands.CreateAccountCmd.execute(CreateAccountCmd.java:153
>>)
>> 
>>        at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:132)
>> 
>>        at com.cloud.api.ApiServer.queueCommand(ApiServer.java:509)
>> 
>>        at com.cloud.api.ApiServer.handleRequest(ApiServer.java:416)
>> 
>>        at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:300)
>> 
>>        at com.cloud.api.ApiServlet.doGet(ApiServlet.java:59)
>> 
>>        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(Applicat
>>ionFilterChain.java:290)
>> 
>>        at
>> 
>>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilte
>>rChain.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:555)
>> 
>>        at
>> 
>>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.j
>>ava:109)
>> 
>>        at
>> 
>>org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:29
>>8)
>> 
>>        at
>> 
>>org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.ja
>>va:889)
>> 
>>        at
>> 
>>org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.proces
>>s(Http11NioProtocol.java:721)
>> 
>>        at
>> 
>>org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.ja
>>va:2260)
>> 
>>        at
>> 
>>java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java
>>:1110)
>> 
>>        at
>> 
>>java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.jav
>>a:603)
>> 
>>        at java.lang.Thread.run(Thread.java:679)
>> 
>> Caused by: java.sql.SQLException: Field 'kddihosttags' doesn't have a
>> default value
>> 
>>        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
>> 
>>        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
>> 
>>        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3515)
>> 
>>        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3447)
>> 
>>        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951)
>> 
>>        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101)
>> 
>>        at 
>>com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2554)
>> 
>>        at
>> 
>>com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1
>>761)
>> 
>>        at
>> 
>>com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:204
>>6)
>> 
>>        at
>> 
>>com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:196
>>4)
>> 
>>        at
>> 
>>com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:194
>>9)
>> 
>>        at
>> 
>>org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(Delegat
>>ingPreparedStatement.java:106)
>> 
>>        at
>> com.cloud.utils.db.GenericDaoBase.persist(GenericDaoBase.java:1267)
>> 
>> I really appreciate your help
>