Defect #4632

Error when adding/creating groups

Added by Joe Chin about 13 years ago. Updated about 13 years ago.

Status:ClosedStart date:2010-01-22
Priority:NormalDue date:
Assignee:-% Done:


Target version:0.9.1
Resolution:Fixed Affected version:


I've updated redmine to the latest trunk. When I try to create a new group I get an error 500. 

Here is the trace from the event
Processing GroupsController#create (for at 2010-01-21 12:36:30) [POST]
  Parameters: {"commit"=>"Create", "action"=>"create", "authenticity_token"=>"MN1CPMMOikf/8G32WFAo+fpkEVLzc+Cpi6V9APP2SZA=", "controller"=>"groups", "group"=>{"lastname"=>"a"}}

ActiveRecord::StatementInvalid (Mysql::Error: Column 'login' cannot be null: INSERT INTO `users` (`status`, `created_on`, `last_login_on`, `hashed_password`, `language`, `updated_on`, `admin`, `type`, `firstname`, `lastname`, `mail`, `identity_url`, `mail_notification`, `auth_source_id`, `login`) VALUES(1, '2010-01-21 12:36:30', NULL, '', '', '2010-01-21 12:36:30', 0, 'Group', '', 'a', '', NULL, 1, NULL, NULL)):
  app/controllers/groups_controller.rb:69:in `create'
  app/controllers/groups_controller.rb:68:in `create'
  passenger (2.2.8) lib/phusion_passenger/rack/request_handler.rb:92:in `process_request'
  passenger (2.2.8) lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
  passenger (2.2.8) lib/phusion_passenger/railz/application_spawner.rb:385:in `start_request_handler'
  passenger (2.2.8) lib/phusion_passenger/railz/application_spawner.rb:343:in `handle_spawn_application'
  passenger (2.2.8) lib/phusion_passenger/utils.rb:184:in `safe_fork'
  passenger (2.2.8) lib/phusion_passenger/railz/application_spawner.rb:341:in `handle_spawn_application'
  passenger (2.2.8) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
  passenger (2.2.8) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
  passenger (2.2.8) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  passenger (2.2.8) lib/phusion_passenger/abstract_server.rb:163:in `start'
  passenger (2.2.8) lib/phusion_passenger/railz/application_spawner.rb:209:in `start'
  passenger (2.2.8) lib/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
  passenger (2.2.8) lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
  passenger (2.2.8) lib/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
  passenger (2.2.8) lib/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
  passenger (2.2.8) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  passenger (2.2.8) lib/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
  passenger (2.2.8) lib/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
  passenger (2.2.8) lib/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
  passenger (2.2.8) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
  passenger (2.2.8) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
  passenger (2.2.8) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'

Rendering /var/lib/redmine-0.7-dev/public/500.html (500 Internal Server Error)

And here is my redmine environment

About your application's environment
Ruby version              1.8.6 (i486-linux)
RubyGems version          1.3.5
Rack version              1.0
Rails version             2.3.5
Active Record version     2.3.5
Active Resource version   2.3.5
Action Mailer version     2.3.5
Active Support version    2.3.5
Application root          /var/lib/redmine-0.7-dev
Environment               production
Database adapter          mysql
Database schema version   20091227112908

About your Redmine plugins
Google Analytics plugin              0.2.0
Redmine System Notification plugin   0.2.0
Bots filter                          1.02

Picture_3.png (84 KB) Joe Chin, 2010-01-25 10:30

Related issues

Duplicated by Redmine - Defect #4693: Add Group: 'hashed_password' cannot be null Closed 2010-01-30

Associated revisions

Revision 3343
Added by Jean-Philippe Lang about 13 years ago

Fixed: NOT NULL constraint error when adding a group (#4632).


#1 Updated by Holger Just about 13 years ago

Well, this should not happen. The login column of the users table is defined to have an empty string by default which should be inserted automatically during that insert. At least, that's what my Postgres databases do :)

Could you possibly provide the actual database-schema of your current users table?
Also, which version of MySQL are you using?

#2 Updated by Joe Chin about 13 years ago

MySql Server version: 5.0.51a-3ubuntu5.4

Here is the screenshot of my schema. If you want the text tell me the sql command because I'm not that familiar with MySql system queries.

#3 Updated by Jean-Philippe Lang about 13 years ago

  • Status changed from New to Closed
  • Target version set to 0.9.1
  • Resolution set to Fixed

I'm not able to reproduce with the same exact Mysql version (5.0.51a-3ubuntu5.4) but r3343 should fix it.

Also available in: Atom PDF