UPDATE.
The programm added five new columns to my "page" table and eight more tables to my DB, and everything seemed fine, because after restarting the program the errors I've described above were gone. However, then seven new problems appeared, all of them like this:
ERROR hbm2ddl.SchemaUpdate: HHH000388: Unsuccessful: alter table category_inlinks add index FK3F4337732A72A718 (id), add constraint FK3F4337732A72A718 foreign key (id) references Category (id)
ERROR hbm2ddl.SchemaUpdate: Can't create table `new_wiki`.`#sql-2c34_7` (errno: 150 "Foreign key constraint is incorrectly formed")
After this I got a message:
INFO hbm2ddl.SchemaUpdate: HHH000232: Schema update complete,
and then - Java NullPointerException: "attempted to lock null".
And so I don't know what I should do, I guess these errors are connected with the fact that something is wrong in my database, but I don't know where to look and what I might have done wrong.