error when use elasticsearch

Hi, I have Nuxeo 8.10 and use PostgreSQL 9.5 and Elasticsearch 2.3.5.

Nuxeo works fine but in server.log I watch this error:

2017-01-26 11:07:31,138 ERROR [localhost-startStop-1] [org.hibernate.util.JDBCExceptionReporter] ERROR: column t1.tgisconstraint does not exist Hint: Perhaps you meant to reference the column “t1.tgconstraint”. Position: 581 2017-01-26 11:07:31,139 ERROR [localhost-startStop-1] [org.hibernate.tool.hbm2ddl.SchemaUpdate] could not complete schema update org.hibernate.exception.SQLGrammarException: could not get table metadata: NXP_UIDSEQ

    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52)
    at org.hibernate.tool.hbm2ddl.DatabaseMetadata.getTableMetadata(DatabaseMetadata.java:128)
    at org.hibernate.cfg.Configuration.generateSchemaUpdateScript(Configuration.java:995)
    at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:187)
    at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:356)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1341)
    at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
    at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:646)
    at org.nuxeo.ecm.core.persistence.HibernateConfiguration.createEntityManagerFactory(HibernateConfiguration.java:160)
    at org.nuxeo.ecm.core.persistence.HibernateConfiguration.getFactory(HibernateConfiguration.java:151)
    at org.nuxeo.ecm.core.persistence.HibernateConfiguration.getFactory(HibernateConfiguration.java:201)
    at org.nuxeo.ecm.core.persistence.PersistenceProvider.openPersistenceUnit(PersistenceProvider.java:51)
    at org.nuxeo.ecm.core.persistence.PersistenceComponent.applicationStarted(PersistenceComponent.java:84)
    at org.nuxeo.runtime.model.impl.RegistrationInfoImpl.notifyApplicationStarted(RegistrationInfoImpl.java:332)
    at org.nuxeo.runtime.osgi.OSGiRuntimeService.notifyComponentsOnStarted(OSGiRuntimeService.java:487)
    at org.nuxeo.runtime.osgi.OSGiRuntimeService.fireApplicationStarted(OSGiRuntimeService.java:523)
    at org.nuxeo.runtime.api.ServicePassivator$Waiter.proceed(ServicePassivator.java:415)
    at org.nuxeo.runtime.api.ServicePassivator.proceed(ServicePassivator.java:83)
    at org.nuxeo.runtime.osgi.OSGiRuntimeService.frameworkEvent(OSGiRuntimeService.java:535)
    at org.nuxeo.osgi.OSGiAdapter.fireFrameworkEvent(OSGiAdapter.java:232)
    at org.nuxeo.osgi.application.loader.FrameworkLoader.doStart(FrameworkLoader.java:241)
    at org.nuxeo.osgi.application.loader.FrameworkLoader.start(FrameworkLoader.java:125)
    at org.nuxeo.runtime.deployment.NuxeoStarter.start(NuxeoStarter.java:120)
    at org.nuxeo.runtime.deployment.NuxeoStarter.contextInitialized(NuxeoStarter.java:93)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5068)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5584)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:679)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1966)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

Caused by: org.postgresql.util.PSQLException: ERROR: column t1.tgisconstraint does not exist Hint: Perhaps you meant to reference the column “t1.tgconstraint”. Position: 581

    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2455)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2155)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:288)
    at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:430)
    at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:356)
    at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:303)
    at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:289)
    at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:266)
    at org.postgresql.jdbc.PgStatement.executeQuery(PgStatement.java:233)
    at org.postgresql.jdbc.PgDatabaseMetaData.getImportedExportedKeys(PgDatabaseMetaData.java:2573)
    at org.postgresql.jdbc.PgDatabaseMetaData.getImportedKeys(PgDatabaseMetaData.java:2717)
    at org.tranql.connector.jdbc.DatabaseMetaDataHandle.getImportedKeys(DatabaseMetaDataHandle.java:110)
    at org.hibernate.tool.hbm2ddl.TableMetadata.initForeignKeys(TableMetadata.java:155)
    at org.hibernate.tool.hbm2ddl.TableMetadata.<init>(TableMetadata.java:60)
    at org.hibernate.tool.hbm2ddl.DatabaseMetadata.getTableMetadata(DatabaseMetadata.java:113)
    ... 36 more

2017-01-26 11:07:31,575 WARN [localhost-startStop-1] [org.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: 42703 2017-01-26 11:07:31,576 ERROR [localhost-startStop-1] [org.hibernate.util.JDBCExceptionReporter] ERROR: column t1.tgisconstraint does not exist Hint: Perhaps you meant to reference the column “t1.tgconstraint”. Position: 581 2017-01-26 11:07:31,576 ERROR [localhost-startStop-1] [org.hibernate.tool.hbm2ddl.SchemaUpdate] could not complete schema update org.hibernate.exception.SQLGrammarException: could not get table metadata: NXP_LOGS

    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52)
    at org.hibernate.tool.hbm2ddl.DatabaseMetadata.getTableMetadata(DatabaseMetadata.java:128)
    at org.hibernate.cfg.Configuration.generateSchemaUpdateScript(Configuration.java:995)
    at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:187)
    at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:356)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1341)
    at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
    at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:646)
    at org.nuxeo.ecm.core.persistence.HibernateConfiguration.createEntityManagerFactory(HibernateConfiguration.java:160)
    at org.nuxeo.ecm.core.persistence.HibernateConfiguration.getFactory(HibernateConfiguration.java:151)
    at org.nuxeo.ecm.core.persistence.HibernateConfiguration.getFactory(HibernateConfiguration.java:201)
    at org.nuxeo.ecm.core.persistence.PersistenceProvider.openPersistenceUnit(PersistenceProvider.java:51)
    at org.nuxeo.ecm.core.persistence.PersistenceComponent.applicationStarted(PersistenceComponent.java:84)
    at org.nuxeo.runtime.model.impl.RegistrationInfoImpl.notifyApplicationStarted(RegistrationInfoImpl.java:332)
    at org.nuxeo.runtime.osgi.OSGiRuntimeService.notifyComponentsOnStarted(OSGiRuntimeService.java:487)
    at org.nuxeo.runtime.osgi.OSGiRuntimeService.fireApplicationStarted(OSGiRuntimeService.java:523)
    at org.nuxeo.runtime.api.ServicePassivator$Waiter.proceed(ServicePassivator.java:415)
    at org.nuxeo.runtime.api.ServicePassivator.proceed(ServicePassivator.java:83)
    at org.nuxeo.runtime.osgi.OSGiRuntimeService.frameworkEvent(OSGiRuntimeService.java:535)
    at org.nuxeo.osgi.OSGiAdapter.fireFrameworkEvent(OSGiAdapter.java:232)
    at org.nuxeo.osgi.application.loader.FrameworkLoader.doStart(FrameworkLoader.java:241)
    at org.nuxeo.osgi.application.loader.FrameworkLoader.start(FrameworkLoader.java:125)
    at org.nuxeo.runtime.deployment.NuxeoStarter.start(NuxeoStarter.java:120)
    at org.nuxeo.runtime.deployment.NuxeoStarter.contextInitialized(NuxeoStarter.java:93)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5068)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5584)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:679)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1966)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

Caused by: org.postgresql.util.PSQLException: ERROR: column t1.tgisconstraint does not exist Hint: Perhaps you meant to reference the column “t1.tgconstraint”. Position: 581

    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2455)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2155)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:288)
    at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:430)
    at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:356)
    at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:303)
    at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:289)
    at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:266)
    at org.postgresql.jdbc.PgStatement.executeQuery(PgStatement.java:233)
    at org.postgresql.jdbc.PgDatabaseMetaData.getImportedExportedKeys(PgDatabaseMetaData.java:2573)
    at org.postgresql.jdbc.PgDatabaseMetaData.getImportedKeys(PgDatabaseMetaData.java:2717)
    at org.tranql.connector.jdbc.DatabaseMetaDataHandle.getImportedKeys(DatabaseMetaDataHandle.java:110)
    at org.hibernate.tool.hbm2ddl.TableMetadata.initForeignKeys(TableMetadata.java:155)
    at org.hibernate.tool.hbm2ddl.TableMetadata.<init>(TableMetadata.java:60)
    at org.hibernate.tool.hbm2ddl.DatabaseMetadata.getTableMetadata(DatabaseMetadata.java:113)
    ... 36 more

This happened since I connected Nuxeo with external elasticsearch, is it normal?

0 votes

1 answers

2404 views

ANSWER

Hi,

I have downloaded Nuxeo from the official page and I have not touch the driver. I have seen in lib directory and I have:

[tscloud@ltest7983 lib]$ ls annotations-api.jar el-api.jar mail-1.4.5.jar tomcat-api.jar tomcat-util.jar catalina-ant.jar freemarker-2.3.23.jar nuxeo-runtime-launcher-8.10.jar tomcat-coyote.jar websocket-api.jar catalina-ha.jar jasper-el.jar nuxeo-runtime-tomcat-adapter-8.10.jar tomcat-dbcp.jar xercesImpl-2.11.0.jar catalina.jar jasper.jar postgresql-9.4.1212.jar tomcat-i18n-es.jar xml-apis-1.4.01.jar catalina-tribes.jar jcl-over-slf4j-1.7.21.jar servlet-api.jar tomcat-i18n-fr.jar commons-lang-2.6.jar jsp-api.jar slf4j-api-1.7.21.jar tomcat-i18n-ja.jar commons-lang3-3.3.2.jar log4j-1.2.17.jar slf4j-log4j12-1.7.21.jar tomcat-jdbc.jar ecj-4.4.2.jar log4j.xml

the version of jar is “postgresql-9.4.1212.jar”, is the correct version no?

It´s curious, because this error only appear when use the external elastic search. With embedded elastic search works fine. Are you sure that is for driver?

01/26/2017

Were you able to solve this Jorge.
09/09/2019



“ERROR: column t1.tgisconstraint does not exist” is a symptom of a very old PostgreSQL JDBC driver (older than the one we ship with Nuxeo 8.10). Please check your driver version.

0 votes



(see comment on original question)
01/26/2017