mysql error:ERROR hbm2ddl.SchemaUpdate - Row size too large when pushing Grails app to Cloud Foundry -


i able deploy cloud foundry last time , new domain classes getting introduced, need update it. updated successfully, 1 table not created, why tried delete app , push again see error in detail , got:

error hbm2ddl.schemaupdate  - unsuccessful: create table case_file (id bigint not null auto_increment, version bigint not null, case_type varchar(255) not null, category varchar(255) not null, client_id bigint not null, date_created datetime not null, class varchar(255) not null, has_criminal_record bit, house_size decimal(19,2), number_of_children integer, agreement varchar(255), brief_evaluation varchar(4000), comments varchar(4000), court_order varchar(255), date_from datetime, date_of_birth datetime, date_of_report datetime, date_signed_authorized_person datetime, date_signed_revisor datetime, date_to datetime, demand_number varchar(255), first_name varchar(255), has_court_order bit, has_intervention_plan bit, has_voluntary_measures bit, interventions_measure_and_resources varchar(4000), last_name varchar(255), other_documents varchar(255), permanent_code varchar(255), proposed_orientation varchar(4000), results_obtained varchar(4000), signature_of_authorized_person longblob, signature_of_director_of_social_services longblob, signature_of_revisor longblob, situation_of_child varchar(4000), voluntary varchar(255), primary key (id)) engine=innodb 2012-06-10 15:17:02,466 [main] error hbm2ddl.schemaupdate  - row size large. maximum row size used table type, not counting blobs, 65535. have change columns text or blobs 2012-06-10 15:17:02,501 [main] error hbm2ddl.schemaupdate  - unsuccessful: alter table case_file add index fk27f9b12b94d36a39 (client_id), add constraint fk27f9b12b94d36a39 foreign key (client_id) references client (id) 2012-06-10 15:17:02,501 [main] error hbm2ddl.schemaupdate  - table 'd838abcc25b974c87a204aa924e607694.case_file' doesn't exist 2012-06-10 15:17:13,997 [main] error util.jdbcexceptionreporter  - table 'd838abcc25b974c87a204aa924e607694.case_file' doesn't exist stopping tomcat because context stopped. 

just give little background domain, contain 3 longblobs (for pictures) , i'm thinking that might cause "row size large" problem. way, i'm using grails 2.0.0. how resolve this?

the app works fine locally, did not throw error, that's why shocked when saw it.

you can read hard limit in mysql on their website. basically, have many 256 , 4000 character columns have gone on 65,535 limit. best course of action switch varchar(4000) columns text:

class mydomain {     string description      static mapping = {         description type: "text"     } } 

be aware though hibernate may not able migrate existing data new column type. test first! , sure cf database before updating it.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -