Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error with CMDBUILD_DUMP=openmaint_demo.dump.xz #5

Open
sindile opened this issue Aug 26, 2019 · 5 comments
Open

error with CMDBUILD_DUMP=openmaint_demo.dump.xz #5

sindile opened this issue Aug 26, 2019 · 5 comments

Comments

@sindile
Copy link

sindile commented Aug 26, 2019

I modified my docker-compose.yml and change to CMDBUILD_DUMP=openmaint_demo.dump.xz

running docker-compose up -d

and going to http://localhost:8090/cmdbuild
image

Closing the small window and clicking apply patches I get the following
image

With the following error message
org.cmdbuild.dao.DaoException: error processing patch = Patch{version=1.0.3-01, category=core, applied=false}, caused by: org.cmdbuild.dao.DaoException: error processing patch = core-1.0.3-01 (Change Role class type from reserved to sysread), caused by: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [ SET SESSION cmdbuild.ignore_tenant_policies = 'true'; SET SESSION cmdbuild.user_tenants = '{}'; DO $$ BEGIN RAISE NOTICE 'apply cmdbuild patch %', 'core-1.0.3-01'; END $$ LANGUAGE PLPGSQL; -- Change Role class type from reserved to sysread COMMENT ON TABLE "Role" IS 'MODE: sysread|TYPE: class|DESCR: Roles|SUPERCLASS: false|MANAGER: class|STATUS: active'; DO $$ BEGIN RAISE NOTICE 'applied cmdbuild patch %', 'core-1.0.3-01'; END $$ LANGUAGE PLPGSQL; ]; nested exception is org.postgresql.util.PSQLException: ERROR: relation "Role" does not exist, caused by: org.postgresql.util.PSQLException: ERROR: relation "Role" does not exist

@txavier
Copy link

txavier commented Sep 9, 2019

I am having the same problem. Is there any solution to this?

@txavier
Copy link

txavier commented Sep 10, 2019

I figured out a workaround.

docker cp [Path to Demo.dump]\demo.dump [Your container id]:\
  • Attach a terminal to the docker container.
docker exec -it [Your container id] /bin/sh -c "[ -e /bin/bash ] && /bin/bash || /bin/sh"
su postgres
pg_restore --verbose --clean --no-acl --no-owner -h localhost -d cmdbuild_3 demo.dump
  • Go to localhost:8090/cmdbuild
  • Login now works

@txavier
Copy link

txavier commented Sep 10, 2019

Oh wait, I see now I got this error because I had initially skipped a step. If you run the docker-compose.yml file from where it is after cloning the repository then it works and no workaround is needed.

I skipped this:

git clone https://github.com/itmicus/cmdbuild_docker

@txavier
Copy link

txavier commented Sep 17, 2019

Oh wait, I see now I got this error because I had initially skipped a step. If you run the docker-compose.yml file from where it is after cloning the repository then it works and no workaround is needed.

I skipped this:

git clone https://github.com/itmicus/cmdbuild_docker

No actually this doesnt work as it is supposed to. My original solution post is the only work around currently.

@itmicus
Copy link
Owner

itmicus commented Feb 19, 2020

Please check now

CMDbuild openMAINT 2.0

docker run --name openmaint_db -p 5432:5432 -d itmicus/cmdbuild:db-3.0
docker run --name openmaint_app --restart unless-stopped -e CMDBUILD_DUMP="demo.dump.xz" --link openmaint_db  -p 8090:8080 -d itmicus/cmdbuild:om-2.0-3.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants