You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by sx chen <cl...@gmail.com> on 2012/10/09 17:13:36 UTC
anyway to debug after changing part of code?
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:1560)
at
com.cloud.utils.db.DatabaseCallback.intercept(DatabaseCallback.java:30)
at
com.cloud.user.AccountManagerImpl.createUserAccount(AccountManagerImpl.java:724)
at
com.cloud.utils.component.ComponentLocator$InterceptorDispatcher.intercept(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(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:555)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at
org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:889)
at
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:721)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2260)
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)
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:1761)
at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2046)
at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1964)
at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1949)
at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:106)
at
com.cloud.utils.db.GenericDaoBase.persist(GenericDaoBase.java:1267)
I really appreciate your help
Re: anyway to debug after changing part of code?
Posted by Chiradeep Vittal <Ch...@citrix.com>.
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
>
Re: anyway to debug after changing part of code?
Posted by Chiradeep Vittal <Ch...@citrix.com>.
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
>
Re: anyway to debug after changing part of code?
Posted by Nitin Mehta <Ni...@citrix.com>.
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:1560)
>
> at
> com.cloud.utils.db.DatabaseCallback.intercept(DatabaseCallback.java:30)
>
> at
> com.cloud.user.AccountManagerImpl.createUserAccount(AccountManagerImpl.java:724)
>
> at
> com.cloud.utils.component.ComponentLocator$InterceptorDispatcher.intercept(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(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:555)
>
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
>
> at
> org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:889)
>
> at
> org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:721)
>
> at
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2260)
>
> 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)
>
> 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:1761)
>
> at
> com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2046)
>
> at
> com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1964)
>
> at
> com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1949)
>
> at
> org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:106)
>
> at
> com.cloud.utils.db.GenericDaoBase.persist(GenericDaoBase.java:1267)
>
> I really appreciate your help
Re: anyway to debug after changing part of code?
Posted by sx chen <cl...@gmail.com>.
Hi,I've read the wiki Chiradeep given,This wiki is based on Maven project.
I have to use a stable CloudStack version 3.0.2,Is there a guide based on
3.0.2?
2012/10/10 sx chen <cl...@gmail.com>
> Thanks,Nitin,I've found the problem.It's so simple,what I should do is
> just delete the "not null" tag in the table.
> Thanks,Chiradeep,This is what I needed.
>
>
>
Re: anyway to debug after changing part of code?
Posted by sx chen <cl...@gmail.com>.
Thanks,Nitin,I've found the problem.It's so simple,what I should do is just
delete the "not null" tag in the table.
Thanks,Chiradeep,This is what I needed.
Re: anyway to debug after changing part of code?
Posted by Alena Prokharchyk <Al...@citrix.com>.
Hello,
What columns did you add to the cloudStack DB as a part of "I have change
the source code list here to add
a colomn to table account"? And what exact changes were made to
create-schema and VO objects (AccountVO/UserAccountVO)? From the error it
looks like you are calling the VO object constructor w/o the value for the
field you've introduced, and the DB schema expects this field to have not
null value.
-Alena.
On 10/9/12 8:13 AM, "sx chen" <cl...@gmail.com> 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:15
>60)
>
> at
>com.cloud.utils.db.DatabaseCallback.intercept(DatabaseCallback.java:30)
>
> at
>com.cloud.user.AccountManagerImpl.createUserAccount(AccountManagerImpl.jav
>a:724)
>
> at
>com.cloud.utils.component.ComponentLocator$InterceptorDispatcher.intercept
>(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(Applicati
>onFilterChain.java:290)
>
> at
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilter
>Chain.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:1
>27)
>
> at
>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:1
>02)
>
> at
>org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
>
> at
>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.ja
>va:109)
>
> at
>org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298
>)
>
> at
>org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.jav
>a:889)
>
> at
>org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process
>(Http11NioProtocol.java:721)
>
> at
>org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.jav
>a:2260)
>
> 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)
>
>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:17
>61)
>
> at
>com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2046
>)
>
> at
>com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1964
>)
>
> at
>com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1949
>)
>
> at
>org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(Delegati
>ngPreparedStatement.java:106)
>
> at
>com.cloud.utils.db.GenericDaoBase.persist(GenericDaoBase.java:1267)
>
>I really appreciate your help
>