KonaKart Community Forum

Installation / Configuration => Installation of KonaKart => Topic started by: tsg18cs on March 26, 2008, 02:31:48 pm

Title: Field 'customers_id' doesn't have a default value
Post by: tsg18cs on March 26, 2008, 02:31:48 pm
Hi
   I've just installed KonaKart to evaluate it. The install went O.K., various items changed in the admin component, but when I try to add one of the sample products to my cart I get the following error ( this happens whether I'm signed in as a customer or not ) :-

Exception Name = com.konakart.app.KKException
Exception Message = org.apache.torque.TorqueException: java.sql.SQLException: Field 'customers_id' doesn't have a default value
Exception Stack Trace =
at com.konakart.app.KKEng.addToBasket(Unknown Source)
at com.konakart.al.BasketMgr.addToBasket(Unknown Source)
at com.konakart.actions.AddToCartSubmitAction.execute(Unknown Source)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
at org.apache.catalina.connector.CoyoteAdapter.service(Unknown Source)
at org.apache.coyote.http11.Http11Processor.process(Unknown Source)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Unknown Source)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(Unknown Source)
at java.lang.Thread.run(Thread.java:619)


Thanks
Title: Re: Field 'customers_id' doesn't have a default value
Post by: pete on March 26, 2008, 02:47:14 pm
Hi,

Could you let us know what DB you are using (including version) and whether you encountered any DB errors when creating the KonaKart database tables ?
Title: Re: Field 'customers_id' doesn't have a default value
Post by: tsg18cs on March 26, 2008, 02:53:13 pm
Hi

   I'm using mysql 5.0.54 and there were no errors during install/setup.

Thanks
Title: Re: Field 'customers_id' doesn't have a default value
Post by: pete on March 26, 2008, 03:17:07 pm
Hi,

We're not sure why you could be getting this error. You you confirm whether you get it immediately after a clean install or only after making some modifications in the Admin App ?
Title: Re: Field 'customers_id' doesn't have a default value
Post by: tsg18cs on March 26, 2008, 03:30:46 pm
Hi

  If you're referring to the DB setup, I get the error before and after any Admin changes. The only other change made is to the properties file , to set the dbname, etc.
Title: Re: Field 'customers_id' doesn't have a default value
Post by: kate on March 26, 2008, 03:48:02 pm
Hi,

Not sure what the problem is here but we suspect something to do with the db.

We run our regression suites on 3 versions of MySQL but not 5.0.54.  The closest is 5.0.51a

Whilst it may not be convenient for you, could you reinstall using an earlier MySQL and see if you have any success?  This would help us track down the problem.

Also, do you run the 5.0.54 in any partcular mode - eg. strict mode?

Kate.
Title: Re: Field 'customers_id' doesn't have a default value
Post by: tsg18cs on March 26, 2008, 04:11:09 pm
Hi

  Not possible to use an earlier version of mysql, other things are using it also I'm not running any particular mode.
Title: Re: Field 'customers_id' doesn't have a default value
Post by: kate on March 26, 2008, 05:15:44 pm
Hi,

I didn't mean you would make this a permanent change, I just meant as a quick test if you had older MySQL databases around to help diagnose the problem.

Never mind; we'll add the task of looking at validating against MySQL Enterprise databases to our to-do list.

Kate
Title: Re: Field 'customers_id' doesn't have a default value
Post by: ming on March 26, 2008, 06:16:27 pm
Hello,

I have just installed MySQL 5.0.58 enterprise gpl nt and KonaKart works perfectly with it.

My SQL Mode is the default, which is STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

Note that this was a standard installation of MySQL - the only non-default I selected was to choose utf.

I realise this is not version 5.0.54 but at least I can validate that KonaKart works fine on the 5.0.58 Enterprise version with a standard installation.

I'm also at a loss as to what's wrong with your configuration.   I still suspect database setup/configuration of some kind since the database is the main component that was not installed by our installer (the other being java).

Regards,
Ming
Title: Re: Field 'customers_id' doesn't have a default value
Post by: ecommdev on November 03, 2009, 01:26:23 pm
Hi,

I know this is an old topic, however i had the same problem on MySQL 5.0.81. I resolved it by creating a default customer in the Admin application.

Just thought you would like to know..