CMDBuild Forum

Problem with applying patches

Hello,

 

I have a fresh install of cmdbuild on a debian machine.

After lots of issues with tomcat and Java (config page hangs on forever and then 505 because of class issue solved) it passes the config page.

I have a postgressql server configured properly,

The db is cmdbuild, with a superuser dbadmin connection succeeded without issue, the db is created with the proper user (verified the db structure in phppgadmin everything seems ok)

Then a jump to the patches page. I have sql patches from version 1 to v 2.04.

I have downloaded the v 2.0.4 on the website but the web app contains every single patch. Off course since I didn't upgrade cmdbuil from 1 to 2.0.4 applying patches fails all the time.

Can i delete old patches from the webinf /var/lib/tomcat6/webapps/cmdbuild/WEB-INF/patches without risking my install ? There is no graphical way to choose witch patch to apply.

The user cmdbuild as all privileges on the database the user shark as well.

Thanks for your help

 

JL

Hello Juliette,
 
did you create the database manually (executing in order all SQL files) or did you create it from CMDBuild's user interface? Please check if the "Patch" table is available and if not, it's probably because you create it manually. You can create it executing this SQL code:
 

SELECT cm_create_class('Patch', 'Class', 'DESCR: |MODE: reserved|STATUS: active|SUPERCLASS: false|TYPE: class');

INSERT INTO "Patch" ("Code") VALUES ("1.2.3");

 
where you must replace "1.2.3" with the last available patch number. If the "Patch" table is available but it's empty, then use only the last row.
 
Let me know if this solves your problem.
 
Best regards.
 
-- Davide Pavan
 
Previously Juliette wrote:

Hello,

 

I have a fresh install of cmdbuild on a debian machine.

After lots of issues with tomcat and Java (config page hangs on forever and then 505 because of class issue solved) it passes the config page.

I have a postgressql server configured properly,

The db is cmdbuild, with a superuser dbadmin connection succeeded without issue, the db is created with the proper user (verified the db structure in phppgadmin everything seems ok)

Then a jump to the patches page. I have sql patches from version 1 to v 2.04.

I have downloaded the v 2.0.4 on the website but the web app contains every single patch. Off course since I didn't upgrade cmdbuil from 1 to 2.0.4 applying patches fails all the time.

Can i delete old patches from the webinf /var/lib/tomcat6/webapps/cmdbuild/WEB-INF/patches without risking my install ? There is no graphical way to choose witch patch to apply.

The user cmdbuild as all privileges on the database the user shark as well.

Thanks for your help

 

JL

 

Thank you for your answer

I created the database on the first attempt of configuration using dbadmin/password as superuser and the config failed.

I solved the java issue and removed all the irrelevant patches in the webapp INF and the patch 2.0.4 applied successfully. Now I have the login page but I cannot log in !

On my final attempt to finalize the config I selected existing database, I entered a Admin user but the login password I had set doesnt work

 

                                   

INFO  2013-05-06 14:41:19 [jsonrpc ] Calling url /login/login                                                                                                                                             

ERROR 2013-05-06 14:41:19 [jsonrpc ] A org.cmdbuild.exception.AuthException occurred calling method class org.cmdbuild.servlets.json.Login.login: AUTH_LOGIN_WRONG                                        

INFO  2013-05-06 14:42:15 [jsonrpc ] Calling url /login/login                                                                                                                                             

ERROR 2013-05-06 14:42:15 [jsonrpc ] A org.cmdbuild.exception.AuthException occurred calling method class org.cmdbuild.servlets.json.Login.login: AUTH_LOGIN_WRONG 

 

I tried the dba login, the admin login I entered on my firts try when I ended up with a 505 but none seem to work.

Is there a way to reset password and username auth in the admin module ?

 

Thx in advance

 

JL

 

Previously Tecnoteca wrote:
Hello Juliette,
 
did you create the database manually (executing in order all SQL files) or did you create it from CMDBuild's user interface? Please check if the "Patch" table is available and if not, it's probably because you create it manually. You can create it executing this SQL code:
 

SELECT cm_create_class('Patch', 'Class', 'DESCR: |MODE: reserved|STATUS: active|SUPERCLASS: false|TYPE: class');

INSERT INTO "Patch" ("Code") VALUES ("1.2.3");

 
where you must replace "1.2.3" with the last available patch number. If the "Patch" table is available but it's empty, then use only the last row.
 
Let me know if this solves your problem.
 
Best regards.
 
-- Davide Pavan

JL

 

 

Use this:

UPDATE "User" SET "Password" = 'DQdKW32Mlms=' WHERE "Username" = 'admin' AND "Status" = 'A';
 
(the insert is documented in the Technical manual).
 
Best regards.
 
-- Davide Pavan
 
Previously Juliette wrote:

Thank you for your answer

I created the database on the first attempt of configuration using dbadmin/password as superuser and the config failed.

I solved the java issue and removed all the irrelevant patches in the webapp INF and the patch 2.0.4 applied successfully. Now I have the login page but I cannot log in !

On my final attempt to finalize the config I selected existing database, I entered a Admin user but the login password I had set doesnt work

 

                                   

INFO  2013-05-06 14:41:19 [jsonrpc ] Calling url /login/login                                                                                                                                             

ERROR 2013-05-06 14:41:19 [jsonrpc ] A org.cmdbuild.exception.AuthException occurred calling method class org.cmdbuild.servlets.json.Login.login: AUTH_LOGIN_WRONG                                        

INFO  2013-05-06 14:42:15 [jsonrpc ] Calling url /login/login                                                                                                                                             

ERROR 2013-05-06 14:42:15 [jsonrpc ] A org.cmdbuild.exception.AuthException occurred calling method class org.cmdbuild.servlets.json.Login.login: AUTH_LOGIN_WRONG 

 

I tried the dba login, the admin login I entered on my firts try when I ended up with a 505 but none seem to work.

Is there a way to reset password and username auth in the admin module ?

 

Thx in advance

 

JL

 

Previously Tecnoteca wrote:
Hello Juliette,
 
did you create the database manually (executing in order all SQL files) or did you create it from CMDBuild's user interface? Please check if the "Patch" table is available and if not, it's probably because you create it manually. You can create it executing this SQL code:
 

SELECT cm_create_class('Patch', 'Class', 'DESCR: |MODE: reserved|STATUS: active|SUPERCLASS: false|TYPE: class');

INSERT INTO "Patch" ("Code") VALUES ("1.2.3");

 
where you must replace "1.2.3" with the last available patch number. If the "Patch" table is available but it's empty, then use only the last row.
 
Let me know if this solves your problem.
 
Best regards.
 
-- Davide Pavan

JL

 

 

 

Thank you again. I type the 3 commands in postgres cmdbuild database as described in the manual

Now it asks me to choose a group and I havent seen this in the documentation. There is a scrolling menu for choose a group but there is nothing to choose in that menu.

What are we supposed to do then ?

 

Sorry i'm a bit of a noob with that kind of apps

 

JL

 

 

Previously Tecnoteca wrote:
Use this:

UPDATE "User" SET "Password" = 'DQdKW32Mlms=' WHERE "Username" = 'admin' AND "Status" = 'A';
 
(the insert is documented in the Technical manual).
 
Best regards.
 
-- Davide Pavan
 
Previously Juliette wrote:

Thank you for your answer

I created the database on the first attempt of configuration using dbadmin/password as superuser and the config failed.

I solved the java issue and removed all the irrelevant patches in the webapp INF and the patch 2.0.4 applied successfully. Now I have the login page but I cannot log in !

On my final attempt to finalize the config I selected existing database, I entered a Admin user but the login password I had set doesnt work


 

 

 

 

The user has no associated groups and this means, in CMDBuild terminology, that the user you are using miss at least one relation with a "Role". Could you refer to the technical manual for the creation of the role and its association with the already created user (see the manual installation section).
 
Best regards.
 
-- Davide Pavan
 
Previously Juliette wrote:

Thank you again. I type the 3 commands in postgres cmdbuild database as described in the manual

Now it asks me to choose a group and I havent seen this in the documentation. There is a scrolling menu for choose a group but there is nothing to choose in that menu.

What are we supposed to do then ?

 

Sorry i'm a bit of a noob with that kind of apps

 

JL

 

 

Previously Tecnoteca wrote:
Use this:

UPDATE "User" SET "Password" = 'DQdKW32Mlms=' WHERE "Username" = 'admin' AND "Status" = 'A';
 
(the insert is documented in the Technical manual).
 
Best regards.
 
-- Davide Pavan
 
Previously Juliette wrote:

Thank you for your answer

I created the database on the first attempt of configuration using dbadmin/password as superuser and the config failed.

I solved the java issue and removed all the irrelevant patches in the webapp INF and the patch 2.0.4 applied successfully. Now I have the login page but I cannot log in !

On my final attempt to finalize the config I selected existing database, I entered a Admin user but the login password I had set doesnt work


 

 

 

 

 

Thanks again.

I already tried what's in the technical manual.

I typed

INSERT INTO "User" ("Status", "Username", "IdClass", "Password", "Description") VALUES ('A',

'admin', '"User"', 'DqdKW32Mlms=', 'Administrator');

 

Command succeded

 

Then I typed the second one

INSERT INTO "Role" ("Status", "IdClass", "Administrator", "Description") VALUES ('A', '"Role"', true,

'SuperUser');

 

Command fails because of this :

2013-05-06 16:37:05 CEST ERREUR:  une valeur NULL viole la contrainte NOT NULL de la colonne « Code »

I went in my phppgadmin to look at the tables and I saw that the Code column is set not to be null so the command written in the tech manual has to fail.

 

The third command works but since there is no Role inserted the mapping is useless.

I tried to cheat with the second command with this trick just to see if it worked

(in bold is what I added)

INSERT INTO "Role" ("Status", "IdClass", "Code", "Administrator", "Description") VALUES ('A', '"Role"', ‘"test"’, true,'SuperUser');

Command succeeds but I dont really know what Code stands for in the cmdbuild terminology.

The I retype the third command it succeeds as well I have 1 record in the User table, in the Role Table and in the Map_UserRole table but there is still the group issue. So I guess the mapping was not accurate. What I dont understand is why the Code value in Role has to be not null when it is not an obligation in every other table. It seems not to be normal since I guess people who wrote the doc would'nt have typed wrong commands with a fail result in the documentation.

I have a snapshot of my vm before all the SQL commands, i can revert to it but the role table has the same issue in that snapshot.

 

Thx for your help

JL

 

 

 

 

Previously Tecnoteca wrote:
The user has no associated groups and this means, in CMDBuild terminology, that the user you are using miss at least one relation with a "Role". Could you refer to the technical manual for the creation of the role and its association with the already created user (see the manual installation section).
 
Best regards.
 
-- Davide Pavan
 

I reverted to the snaphot I had before typing all the commands,

Command one works but command Two still fails with the same error.

I am stuck

 

 

 

 

Previously Juliette wrote:

Thanks again.

I already tried what's in the technical manual.

I typed

INSERT INTO "User" ("Status", "Username", "IdClass", "Password", "Description") VALUES ('A',

'admin', '"User"', 'DqdKW32Mlms=', 'Administrator');

 

Command succeded

 

Then I typed the second one

INSERT INTO "Role" ("Status", "IdClass", "Administrator", "Description") VALUES ('A', '"Role"', true,

'SuperUser');

 

Command fails because of this :

2013-05-06 16:37:05 CEST ERREUR:  une valeur NULL viole la contrainte NOT NULL de la colonne « Code »

I went in my phppgadmin to look at the tables and I saw that the Code column is set not to be null so the command written in the tech manual has to fail.

 

The third command works but since there is no Role inserted the mapping is useless.

I tried to cheat with the second command with this trick just to see if it worked

(in bold is what I added)

INSERT INTO "Role" ("Status", "IdClass", "Code", "Administrator", "Description") VALUES ('A', '"Role"', ‘"test"’, true,'SuperUser');

Command succeeds but I dont really know what Code stands for in the cmdbuild terminology.

The I retype the third command it succeeds as well I have 1 record in the User table, in the Role Table and in the Map_UserRole table but there is still the group issue. So I guess the mapping was not accurate. What I dont understand is why the Code value in Role has to be not null when it is not an obligation in every other table. It seems not to be normal since I guess people who wrote the doc would'nt have typed wrong commands with a fail result in the documentation.

I have a snapshot of my vm before all the SQL commands, i can revert to it but the role table has the same issue in that snapshot.

 

Thx for your help

JL

 

 

 

 

Previously Tecnoteca wrote:
The user has no associated groups and this means, in CMDBuild terminology, that the user you are using miss at least one relation with a "Role". Could you refer to the technical manual for the creation of the role and its association with the already created user (see the manual installation section).
 
Best regards.
 
-- Davide Pavan
 

 

Hi Juliette,
 
I'll verify all the commands specified in the Technical Manual, but in the meantime did you already tried to configure the database using the automatic procedure from the user interface?
 
Best regards.
 
-- Davide Pavan
 
Previously Juliette wrote:

I reverted to the snaphot I had before typing all the commands,

Command one works but command Two still fails with the same error.

I am stuck

 

 

 

 

Previously Juliette wrote:

Thanks again.

I already tried what's in the technical manual.

I typed

INSERT INTO "User" ("Status", "Username", "IdClass", "Password", "Description") VALUES ('A',

'admin', '"User"', 'DqdKW32Mlms=', 'Administrator');

 

Command succeded

 

Then I typed the second one

INSERT INTO "Role" ("Status", "IdClass", "Administrator", "Description") VALUES ('A', '"Role"', true,

'SuperUser');

 

Command fails because of this :

2013-05-06 16:37:05 CEST ERREUR:  une valeur NULL viole la contrainte NOT NULL de la colonne « Code »

I went in my phppgadmin to look at the tables and I saw that the Code column is set not to be null so the command written in the tech manual has to fail.

 

The third command works but since there is no Role inserted the mapping is useless.

I tried to cheat with the second command with this trick just to see if it worked

(in bold is what I added)

INSERT INTO "Role" ("Status", "IdClass", "Code", "Administrator", "Description") VALUES ('A', '"Role"', ‘"test"’, true,'SuperUser');

Command succeeds but I dont really know what Code stands for in the cmdbuild terminology.

The I retype the third command it succeeds as well I have 1 record in the User table, in the Role Table and in the Map_UserRole table but there is still the group issue. So I guess the mapping was not accurate. What I dont understand is why the Code value in Role has to be not null when it is not an obligation in every other table. It seems not to be normal since I guess people who wrote the doc would'nt have typed wrong commands with a fail result in the documentation.

I have a snapshot of my vm before all the SQL commands, i can revert to it but the role table has the same issue in that snapshot.

 

Thx for your help

JL

 

 

 

 

Previously Tecnoteca wrote:
The user has no associated groups and this means, in CMDBuild terminology, that the user you are using miss at least one relation with a "Role". Could you refer to the technical manual for the creation of the role and its association with the already created user (see the manual installation section).
 
Best regards.
 
-- Davide Pavan