CMDBuild Forum

Query for create "system_patch_domainindexes();" function

Hello,
 
I need the query to create the function .., I have problems with the patches (forum relationed   http://www.cmdbuild.org/forum/forum-in-english/830013748), when trying to install the patches directly on the pgadmin tells me that the function does not exist (suggestion http://www.cmdbuild.org/forum/forum-en-espanol/116914534?set_language=en&cl=en ), try running the query several (WEB-INF \ patches) folder, getting this error. 
 
I appreciate any information. I am using postgres on windows.  
Would you explain in detail what are you trying to do? Are you installing a new version with a new database or upgrading an existing one? Which version are you trying to install? If you are upgrading, from which version are you starting?
And, talking about your system, which PostgreSQL version are you using? Which is the path of your Tomcat installation?
 
Best regards.
 
-- CMDBuild Team
 
Previously Cristian Merchan wrote:
Hello,
 
I need the query to create the function .., I have problems with the patches (forum relationed   http://www.cmdbuild.org/forum/forum-in-english/830013748), when trying to install the patches directly on the pgadmin tells me that the function does not exist (suggestion http://www.cmdbuild.org/forum/forum-en-espanol/116914534?set_language=en&cl=en ), try running the query several (WEB-INF \ patches) folder, getting this error. 
 
I appreciate any information. I am using postgres on windows.  

 

hello good day, I have a version of OpenMaint working well, unfortunately the patch update process has not allowed to continue using the software displays a SQL error (try to install patches that  1.0.3-02 to 2.3 2-02 "I think all"), when trying to run the query's from pgadmin out errors absence of functions, I relate some examples.
 
to solve the problem, run again the Query \ sql \ base_schema, thereby initially mentioned function exists, but the problem persists.
 
PRINCIPAL ERROR
 
not installing patch.  SQL error sentence,
Call: services/json/configure/applypatches
-------------------------------------------
Error: org.cmdbuild.exception.ORMException: ORM_SQL_PATCH
	at org.cmdbuild.exception.ORMException$ORMExceptionType.createException(ORMException.java:61)
	at org.cmdbuild.services.DefaultPatchManager.applyPatch(DefaultPatchManager.java:268)
	at org.cmdbuild.services.DefaultPatchManager.applyPatchList(DefaultPatchManager.java:243)
	at org.cmdbuild.services.startup.DefaultStartupLogic.migrate(DefaultStartupLogic.java:31)
	at org.cmdbuild.servlets.json.Configure.applyPatches(Configure.java:203)
	at sun.reflect.GeneratedMethodAccessor175.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.cmdbuild.servlets.JSONDispatcher.dispatch(JSONDispatcher.java:101)
	at org.cmdbuild.servlets.JSONDispatcher.doPost(JSONDispatcher.java:61)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.cmdbuild.filters.AuthFilter.doFilter(AuthFilter.java:158)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.cmdbuild.filters.PatchManagerFilter.doFilter(PatchManagerFilter.java:48)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.cmdbuild.filters.ConfCheckFilter.doFilter(ConfCheckFilter.java:31)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.cmdbuild.filters.TranslationFilter.doFilter(TranslationFilter.java:52)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.cmdbuild.filters.LocalizationFilter.doFilter(LocalizationFilter.java:148)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
	at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:861)
	at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
	at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1584)
	at java.lang.Thread.run(Thread.java:662)
 
Manual Query execution on PgAdmin (examples errors),
 
Query 1.0.3-02
ERROR:  la relación «Email» ya existe
CONTEXT:  sentencia SQL: «CREATE TABLE "Email"( CONSTRAINT "Email_pkey" PRIMARY KEY ("Id")) INHERITS ("Class")»
PL/pgSQL function "cm_create_class" line 28 at sentencia EXECUTE
PL/pgSQL function "system_class_create" line 8 at RETURN
********** Error **********
ERROR: la relación «Email» ya existe
SQL state: 42P07
Context: sentencia SQL: «CREATE TABLE "Email"( CONSTRAINT "Email_pkey" PRIMARY KEY ("Id")) INHERITS ("Class")»
PL/pgSQL function "cm_create_class" line 28 at sentencia EXECUTE
PL/pgSQL function "system_class_create" line 8 at RETURN
 
Query 1.03-05
NOTICE:  no existe la función system_domain_createindex(pg_catalog.varchar), ignorando
ERROR:  la relación «idx_map_accounttemplate_uniqueright» ya existe
CONTEXT:  sentencia SQL: «CREATE UNIQUE INDEX idx_map_AccountTemplate_uniqueright
 ON "Map_AccountTemplate"
 USING btree
 ((CASE
   WHEN "Status"::text = 'A'::text
THEN "IdClass2"
ELSE NULL::regclass
END), (CASE
   WHEN "Status"::text = 'A'::text
THEN "IdObj2"
ELSE NULL::integer
END));»
PL/pgSQL function "system_patch_domainindexes" line 29 at sentencia EXECUTE
********** Error **********
ERROR: la relación «idx_map_accounttemplate_uniqueright» ya existe
SQL state: 42P07
Context: sentencia SQL: «CREATE UNIQUE INDEX idx_map_AccountTemplate_uniqueright
 ON "Map_AccountTemplate"
 USING btree
 ((CASE
   WHEN "Status"::text = 'A'::text
THEN "IdClass2"
ELSE NULL::regclass
END), (CASE
   WHEN "Status"::text = 'A'::text
THEN "IdObj2"
ELSE NULL::integer
END));»
PL/pgSQL function "system_patch_domainindexes" line 29 at sentencia EXECUTE
 
 
i need help, thanks.
 
 
 
 
 
Previously Tecnoteca wrote:
Would you explain in detail what are you trying to do? Are you installing a new version with a new database or upgrading an existing one? Which version are you trying to install? If you are upgrading, from which version are you starting?
And, talking about your system, which PostgreSQL version are you using? Which is the path of your Tomcat installation?
 
Best regards.
 
-- CMDBuild Team
 
Previously Cristian Merchan wrote:
Hello,
 
I need the query to create the function .., I have problems with the patches (forum relationed   http://www.cmdbuild.org/forum/forum-in-english/830013748), when trying to install the patches directly on the pgadmin tells me that the function does not exist (suggestion http://www.cmdbuild.org/forum/forum-en-espanol/116914534?set_language=en&cl=en ), try running the query several (WEB-INF \ patches) folder, getting this error. 
 
I appreciate any information. I am using postgres on windows.  

 

 

Wait, there is surely an issue with the installation or the configuration.
 
The Patch Manager is saying that your database version is lower than version 1.0.3 of CMDBuild and that s not possible.
 
Which versions of application and database are you using? Could you open logs (Tomcat and CMDBuild) and look if there is an error that happens before the application of patches?
 
Best regards.
 
-- CMDBuild Team
 
Previously Cristian MErchan wrote:
hello good day, I have a version of OpenMaint working well, unfortunately the patch update process has not allowed to continue using the software displays a SQL error (try to install patches that  1.0.3-02 to 2.3 2-02 "I think all"), when trying to run the query's from pgadmin out errors absence of functions, I relate some examples.
 
to solve the problem, run again the Query \ sql \ base_schema, thereby initially mentioned function exists, but the problem persists.
 
PRINCIPAL ERROR
 
not installing patch.  SQL error sentence,
Call: services/json/configure/applypatches
-------------------------------------------
Error: org.cmdbuild.exception.ORMException: ORM_SQL_PATCH
	at org.cmdbuild.exception.ORMException$ORMExceptionType.createException(ORMException.java:61)
	at org.cmdbuild.services.DefaultPatchManager.applyPatch(DefaultPatchManager.java:268)
	at org.cmdbuild.services.DefaultPatchManager.applyPatchList(DefaultPatchManager.java:243)
	at org.cmdbuild.services.startup.DefaultStartupLogic.migrate(DefaultStartupLogic.java:31)
	at org.cmdbuild.servlets.json.Configure.applyPatches(Configure.java:203)
	at sun.reflect.GeneratedMethodAccessor175.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.cmdbuild.servlets.JSONDispatcher.dispatch(JSONDispatcher.java:101)
	at org.cmdbuild.servlets.JSONDispatcher.doPost(JSONDispatcher.java:61)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.cmdbuild.filters.AuthFilter.doFilter(AuthFilter.java:158)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.cmdbuild.filters.PatchManagerFilter.doFilter(PatchManagerFilter.java:48)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.cmdbuild.filters.ConfCheckFilter.doFilter(ConfCheckFilter.java:31)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.cmdbuild.filters.TranslationFilter.doFilter(TranslationFilter.java:52)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.cmdbuild.filters.LocalizationFilter.doFilter(LocalizationFilter.java:148)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
	at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:861)
	at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
	at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1584)
	at java.lang.Thread.run(Thread.java:662)
 
Manual Query execution on PgAdmin (examples errors),
 
Query 1.0.3-02
ERROR:  la relación «Email» ya existe
CONTEXT:  sentencia SQL: «CREATE TABLE "Email"( CONSTRAINT "Email_pkey" PRIMARY KEY ("Id")) INHERITS ("Class")»
PL/pgSQL function "cm_create_class" line 28 at sentencia EXECUTE
PL/pgSQL function "system_class_create" line 8 at RETURN
********** Error **********
ERROR: la relación «Email» ya existe
SQL state: 42P07
Context: sentencia SQL: «CREATE TABLE "Email"( CONSTRAINT "Email_pkey" PRIMARY KEY ("Id")) INHERITS ("Class")»
PL/pgSQL function "cm_create_class" line 28 at sentencia EXECUTE
PL/pgSQL function "system_class_create" line 8 at RETURN
 
Query 1.03-05
NOTICE:  no existe la función system_domain_createindex(pg_catalog.varchar), ignorando
ERROR:  la relación «idx_map_accounttemplate_uniqueright» ya existe
CONTEXT:  sentencia SQL: «CREATE UNIQUE INDEX idx_map_AccountTemplate_uniqueright
 ON "Map_AccountTemplate"
 USING btree
 ((CASE
   WHEN "Status"::text = 'A'::text
THEN "IdClass2"
ELSE NULL::regclass
END), (CASE
   WHEN "Status"::text = 'A'::text
THEN "IdObj2"
ELSE NULL::integer
END));»
PL/pgSQL function "system_patch_domainindexes" line 29 at sentencia EXECUTE
********** Error **********
ERROR: la relación «idx_map_accounttemplate_uniqueright» ya existe
SQL state: 42P07
Context: sentencia SQL: «CREATE UNIQUE INDEX idx_map_AccountTemplate_uniqueright
 ON "Map_AccountTemplate"
 USING btree
 ((CASE
   WHEN "Status"::text = 'A'::text
THEN "IdClass2"
ELSE NULL::regclass
END), (CASE
   WHEN "Status"::text = 'A'::text
THEN "IdObj2"
ELSE NULL::integer
END));»
PL/pgSQL function "system_patch_domainindexes" line 29 at sentencia EXECUTE
 
 
i need help, thanks.
 
 
 
 
 
Previously Tecnoteca wrote:
Would you explain in detail what are you trying to do? Are you installing a new version with a new database or upgrading an existing one? Which version are you trying to install? If you are upgrading, from which version are you starting?
And, talking about your system, which PostgreSQL version are you using? Which is the path of your Tomcat installation?
 
Best regards.
 
-- CMDBuild Team
 
Previously Cristian Merchan wrote:
Hello,
 
I need the query to create the function .., I have problems with the patches (forum relationed   http://www.cmdbuild.org/forum/forum-in-english/830013748), when trying to install the patches directly on the pgadmin tells me that the function does not exist (suggestion http://www.cmdbuild.org/forum/forum-en-espanol/116914534?set_language=en&cl=en ), try running the query several (WEB-INF \ patches) folder, getting this error. 
 
I appreciate any information. I am using postgres on windows.