We're updating the issue view to help you get more done. 

Postgres support not working in v1.4-rc-1

Description

I have a hibernate config set to postgres and an empty xwiki database.
I verified that it works with PhenoTips v1.3.7, but when I tried it on v1.4-rc-1 I get these errors on start:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 2018-07-22 17:08:29.272:INFO:optjl.NotifyListener:Server started, you can now open http://wm4d1-03b.fios-router.home:8141/ in your browser to access PhenoTips. 2018-07-22 17:08:29.272:INFO:optjl.NotifyListener:---------------------------------- 2018-07-22 17:08:32.055 EDT [28524] ERROR: relation "xwikidbversion" does not exist at character 45 2018-07-22 17:08:32.055 EDT [28524] STATEMENT: select this_.XWV_VERSION as XWV1_26_0_ from xwikidbversion this_ 2018-07-22 17:08:32.071 EDT [28524] ERROR: relation "xwikidoc" does not exist at character 29 2018-07-22 17:08:32.071 EDT [28524] STATEMENT: select count(*) as y0_ from xwikidoc this_ 2018-07-22 17:08:32,072 [XWiki initialization] INFO .HibernateDataMigrationManager - Checking Hibernate mapping and updating schema if needed for wiki [xwiki] 2018-07-22 17:08:32.500 EDT [28524] ERROR: syntax error at or near "user" at character 145 2018-07-22 17:08:32.500 EDT [28524] STATEMENT: create table xwiki.AuditEvent (uuid BINARY(16) not null, action varchar(255), entity varchar(255), extra text, ip varchar(255), time timestamp, user varchar(255), primary key (uuid)) 2018-07-22 17:08:32,504 [XWiki initialization] ERROR .HibernateDataMigrationManager - The empty database xwiki seems to be not writable, please check your configuration! com.xpn.xwiki.store.migration.DataMigrationException: Unable to update schema of wiki [xwiki] at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.updateSchema(HibernateDataMigrationManager.java:182) at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.initializeEmptyDB(HibernateDataMigrationManager.java:142) at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.initNewDB(AbstractDataMigrationManager.java:445) at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.initializeCurrentDatabase(AbstractDataMigrationManager.java:550) at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.checkDatabase(AbstractDataMigrationManager.java:533) at com.xpn.xwiki.store.XWikiHibernateBaseStore.setDatabase(XWikiHibernateBaseStore.java:734) at com.xpn.xwiki.store.XWikiHibernateBaseStore.beginTransaction(XWikiHibernateBaseStore.java:911) at com.xpn.xwiki.store.XWikiHibernateBaseStore.beginTransaction(XWikiHibernateBaseStore.java:843) at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:857) at com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:299) at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1647) at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1693) at org.xwiki.configuration.internal.AbstractXWikiPreferencesConfigurationSource.getBaseObject(AbstractXWikiPreferencesConfigurationSource.java:86) at org.xwiki.configuration.internal.AbstractXWikiPreferencesConfigurationSource.getBaseProperty(AbstractXWikiPreferencesConfigurationSource.java:139) at org.xwiki.configuration.internal.AbstractXWikiPreferencesConfigurationSource.getBaseProperty(AbstractXWikiPreferencesConfigurationSource.java:156) at org.xwiki.configuration.internal.AbstractDocumentConfigurationSource.getPropertyValue(AbstractDocumentConfigurationSource.java:315) at org.xwiki.configuration.internal.AbstractDocumentConfigurationSource.containsKey(AbstractDocumentConfigurationSource.java:194) at org.xwiki.configuration.internal.SpacesConfigurationSource$SpaceConfigurationSource.containsKey(SpacesConfigurationSource.java:182) at org.xwiki.configuration.internal.AbstractCompositeConfigurationSource.containsKey(AbstractCompositeConfigurationSource.java:45) at org.xwiki.configuration.internal.AbstractCompositeConfigurationSource.containsKey(AbstractCompositeConfigurationSource.java:45) at org.xwiki.configuration.internal.AbstractCompositeConfigurationSource.getProperty(AbstractCompositeConfigurationSource.java:95) at org.xwiki.store.filesystem.internal.DefaultFilesystemAttachmentsConfiguration.cleanOnStartup(DefaultFilesystemAttachmentsConfiguration.java:52) at org.xwiki.store.filesystem.internal.DefaultFilesystemStoreTools.initialize(DefaultFilesystemStoreTools.java:162) at org.xwiki.component.embed.InitializableLifecycleHandler.handle(InitializableLifecycleHandler.java:39) at org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:322) at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:424) at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:392) at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:190) at org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:363) at org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:312) at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:424) at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:392) at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:190) at org.xwiki.component.internal.multi.DelegateComponentManager.getInstance(DelegateComponentManager.java:83) at org.xwiki.component.internal.multi.DelegateComponentManager.getInstance(DelegateComponentManager.java:83) at org.xwiki.component.internal.multi.DelegateComponentManager.getInstance(DelegateComponentManager.java:83) at org.xwiki.component.internal.multi.DelegateComponentManager.getInstance(DelegateComponentManager.java:83) at org.xwiki.component.internal.multi.DelegateComponentManager.getInstance(DelegateComponentManager.java:83) at com.xpn.xwiki.web.Utils.getComponent(Utils.java:756) at com.xpn.xwiki.web.Utils.getComponent(Utils.java:719) at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:1017) at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:965) at com.xpn.xwiki.XWiki.<init>(XWiki.java:954) at com.xpn.xwiki.internal.XWikiInitializerJob.runInternal(XWikiInitializerJob.java:117) at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:205) at org.xwiki.job.AbstractJob.run(AbstractJob.java:188) at java.lang.Thread.run(Thread.java:748) Caused by: org.hibernate.HibernateException: Failed updating schema while executing query [create table xwiki.AuditEvent (uuid BINARY(16) not null, action varchar(255), entity varchar(255), extra text, ip varchar(255), time timestamp, user varchar(255), primary key (uuid))] at com.xpn.xwiki.store.XWikiHibernateBaseStore.updateSchema(XWikiHibernateBaseStore.java:625) at com.xpn.xwiki.store.XWikiHibernateBaseStore.updateSchema(XWikiHibernateBaseStore.java:371) at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.hibernateShemaUpdate(HibernateDataMigrationManager.java:198) at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.updateSchema(HibernateDataMigrationManager.java:179) ... 46 common frames omitted Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near "user" Position: 145 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2477) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2190) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:300) at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:428) at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:354) at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:301) at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:287) at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:264) at org.postgresql.jdbc.PgStatement.executeUpdate(PgStatement.java:244) at org.apache.commons.dbcp2.DelegatingStatement.executeUpdate(DelegatingStatement.java:234) at org.apache.commons.dbcp2.DelegatingStatement.executeUpdate(DelegatingStatement.java:234) at com.xpn.xwiki.store.XWikiHibernateBaseStore.updateSchema(XWikiHibernateBaseStore.java:621) ... 49 common frames omitted 2018-07-22 17:08:32,506 [XWiki initialization] ERROR PreferencesConfigurationSource - Failed to access configuration property com.xpn.xwiki.XWikiException: Error number 3202 in 3: Exception while reading document [xwiki:data.WebPreferences] at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:990) at com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:299) at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1647) at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1693) at org.xwiki.configuration.internal.AbstractXWikiPreferencesConfigurationSource.getBaseObject(AbstractXWikiPreferencesConfigurationSource.java:86) at org.xwiki.configuration.internal.AbstractXWikiPreferencesConfigurationSource.getBaseProperty(AbstractXWikiPreferencesConfigurationSource.java:139) at org.xwiki.configuration.internal.AbstractXWikiPreferencesConfigurationSource.getBaseProperty(AbstractXWikiPreferencesConfigurationSource.java:156) at org.xwiki.configuration.internal.AbstractDocumentConfigurationSource.getPropertyValue(AbstractDocumentConfigurationSource.java:315) at org.xwiki.configuration.internal.AbstractDocumentConfigurationSource.containsKey(AbstractDocumentConfigurationSource.java:194) at org.xwiki.configuration.internal.SpacesConfigurationSource$SpaceConfigurationSource.containsKey(SpacesConfigurationSource.java:182) at org.xwiki.configuration.internal.AbstractCompositeConfigurationSource.containsKey(AbstractCompositeConfigurationSource.java:45) at org.xwiki.configuration.internal.AbstractCompositeConfigurationSource.containsKey(AbstractCompositeConfigurationSource.java:45) at org.xwiki.configuration.internal.AbstractCompositeConfigurationSource.getProperty(AbstractCompositeConfigurationSource.java:95) at org.xwiki.store.filesystem.internal.DefaultFilesystemAttachmentsConfiguration.cleanOnStartup(DefaultFilesystemAttachmentsConfiguration.java:52) at org.xwiki.store.filesystem.internal.DefaultFilesystemStoreTools.initialize(DefaultFilesystemStoreTools.java:162) at org.xwiki.component.embed.InitializableLifecycleHandler.handle(InitializableLifecycleHandler.java:39) at org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:322) at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:424) at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:392) at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:190) at org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:363) at org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:312) at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:424) at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:392) at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:190) at org.xwiki.component.internal.multi.DelegateComponentManager.getInstance(DelegateComponentManager.java:83) at org.xwiki.component.internal.multi.DelegateComponentManager.getInstance(DelegateComponentManager.java:83) at org.xwiki.component.internal.multi.DelegateComponentManager.getInstance(DelegateComponentManager.java:83) at org.xwiki.component.internal.multi.DelegateComponentManager.getInstance(DelegateComponentManager.java:83) at org.xwiki.component.internal.multi.DelegateComponentManager.getInstance(DelegateComponentManager.java:83) at com.xpn.xwiki.web.Utils.getComponent(Utils.java:756) at com.xpn.xwiki.web.Utils.getComponent(Utils.java:719) at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:1017) at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:965) at com.xpn.xwiki.XWiki.<init>(XWiki.java:954) at com.xpn.xwiki.internal.XWikiInitializerJob.runInternal(XWikiInitializerJob.java:117) at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:205) at org.xwiki.job.AbstractJob.run(AbstractJob.java:188) at java.lang.Thread.run(Thread.java:748) Caused by: com.xpn.xwiki.XWikiException: Error number 3301 in 3: Exception while switching to database xwiki at com.xpn.xwiki.store.XWikiHibernateBaseStore.setDatabase(XWikiHibernateBaseStore.java:738) at com.xpn.xwiki.store.XWikiHibernateBaseStore.beginTransaction(XWikiHibernateBaseStore.java:911) at com.xpn.xwiki.store.XWikiHibernateBaseStore.beginTransaction(XWikiHibernateBaseStore.java:843) at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:857) ... 38 common frames omitted Caused by: com.xpn.xwiki.store.migration.DataMigrationException: The empty database xwiki seems to be not writable, please check your configuration! at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.initializeCurrentDatabase(AbstractDataMigrationManager.java:556) at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.checkDatabase(AbstractDataMigrationManager.java:533) at com.xpn.xwiki.store.XWikiHibernateBaseStore.setDatabase(XWikiHibernateBaseStore.java:734) ... 41 common frames omitted Caused by: com.xpn.xwiki.store.migration.DataMigrationException: Unable to update schema of wiki [xwiki] at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.updateSchema(HibernateDataMigrationManager.java:182) at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.initializeEmptyDB(HibernateDataMigrationManager.java:142) at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.initNewDB(AbstractDataMigrationManager.java:445) at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.initializeCurrentDatabase(AbstractDataMigrationManager.java:550) ... 43 common frames omitted Caused by: org.hibernate.HibernateException: Failed updating schema while executing query [create table xwiki.AuditEvent (uuid BINARY(16) not null, action varchar(255), entity varchar(255), extra text, ip varchar(255), time timestamp, user varchar(255), primary key (uuid))] at com.xpn.xwiki.store.XWikiHibernateBaseStore.updateSchema(XWikiHibernateBaseStore.java:625) at com.xpn.xwiki.store.XWikiHibernateBaseStore.updateSchema(XWikiHibernateBaseStore.java:371) at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.hibernateShemaUpdate(HibernateDataMigrationManager.java:198) at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.updateSchema(HibernateDataMigrationManager.java:179) ... 46 common frames omitted Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near "user" Position: 145 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2477) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2190) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:300) at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:428) at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:354) at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:301) at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:287) at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:264) at org.postgresql.jdbc.PgStatement.executeUpdate(PgStatement.java:244) at org.apache.commons.dbcp2.DelegatingStatement.executeUpdate(DelegatingStatement.java:234) at org.apache.commons.dbcp2.DelegatingStatement.executeUpdate(DelegatingStatement.java:234) at com.xpn.xwiki.store.XWikiHibernateBaseStore.updateSchema(XWikiHibernateBaseStore.java:621) ... 49 common frames omitted 2018-07-22 17:08:32.511 EDT [28524] ERROR: relation "xwikidbversion" does not exist at character 45 2018-07-22 17:08:32.511 EDT [28524] STATEMENT: select this_.XWV_VERSION as XWV1_26_0_ from xwikidbversion this_ 2018-07-22 17:08:32.513 EDT [28524] ERROR: relation "xwikidoc" does not exist at character 29 2018-07-22 17:08:32.513 EDT [28524] STATEMENT: select count(*) as y0_ from xwikidoc this_ 2018-07-22 17:08:32,514 [XWiki initialization] INFO .HibernateDataMigrationManager - Checking Hibernate mapping and updating schema if needed for wiki [xwiki] 2018-07-22 17:08:32.691 EDT [28524] ERROR: syntax error at or near "user" at character 145 2018-07-22 17:08:32.691 EDT [28524] STATEMENT: create table xwiki.AuditEvent (uuid BINARY(16) not null, action varchar(255), entity varchar(255), extra text, ip varchar(255), time timestamp, user varchar(255), primary key (uuid))

Environment

None

Status

Assignee

Sergiu Dumitriu

Reporter

Ben Weisburd

Labels

None

External issue ID

None

External issue ID

None

Fix versions

Affects versions

1.4-rc-1

Priority

Blocker