org.postgresql.util.PSQLException

tip

Try downgrading PostgresSQL server to 9.5 or update your PostgresSQL driver to 9.4-1211 with the following command: 9.4.1211

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • I tried to install DSpace with another schema than the default "public" schema. Nevertheless all necessary tables, sequences and the function getnextid where created in public schema. The ant build (I called fresh_install) fails with the following Exception: ================= load_registries: [java] 2014-07-21 16:40:07,480 INFO org.dspace.core.ConfigurationManager @ Loading system provided config property (-Ddspace.configuration): config/dspace.cfg [java] 2014-07-21 16:40:07,493 INFO org.dspace.core.ConfigurationManager @ Using default log4j provided log configuration. If unintended, check your dspace.cfg for (log.init.config) [java] 2014-07-21 16:40:07,908 FATAL org.dspace.administer.RegistryLoader @ anonymous::error_loading_registries: [java] org.postgresql.util.PSQLException: ERROR: syntax error at or near ")" [java] Position: 39 [java] at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103) [java] at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836) [java] at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257) [java] at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512) [java] at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388) [java] at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:273) [java] at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) [java] at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) [java] at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) [java] at org.dspace.storage.rdbms.DatabaseManager.doInsertPostgres(DatabaseManager.java:1725) [java] at org.dspace.storage.rdbms.DatabaseManager.insert(DatabaseManager.java:655) [java] at org.dspace.storage.rdbms.DatabaseManager.create(DatabaseManager.java:446) [java] at org.dspace.content.BitstreamFormat.create(BitstreamFormat.java:403) [java] at org.dspace.administer.RegistryLoader.loadFormat(RegistryLoader.java:172) [java] at org.dspace.administer.RegistryLoader.loadBitstreamFormats(RegistryLoader.java:138) [java] at org.dspace.administer.RegistryLoader.main(RegistryLoader.java:75) [java] Error: [java] - ERROR: syntax error at or near ")" [java] Position: 39 BUILD FAILED /home/pbecker/git/tuub/dspace/target/dspace-installer/build.xml:858: Java returned: 1 ================= If I remove the "public" schema from my database, DSpace installation already fails while trying to create the database tables: ================= [java] 2014-07-21 16:47:36,514 INFO org.dspace.servicemanager.DSpaceKernelImpl @ DSpace kernel startup completed in 1826 ms and registered as MBean: org.dspace:name=772d5a14-d9eb-459d-8430-d35355120306,type=DSpaceKernel [java] 2014-07-21 16:47:36,518 INFO org.dspace.storage.rdbms.InitializeDatabase @ Initializing Database [java] 2014-07-21 16:47:36,528 INFO net.sf.ehcache.util.UpdateChecker @ New update(s) found: 2.4.7 [http://www.terracotta.org/confluence/display/release/Release+Notes+Ehcache+Core+2.4] [java] 2014-07-21 16:47:36,605 WARN org.dspace.storage.rdbms.DatabaseManager @ Got SQL Exception: org.postgresql.util.PSQLException: ERROR: no schema has been selected to create in [java] org.postgresql.util.PSQLException: ERROR: no schema has been selected to create in [java] at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103) [java] at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836) [java] at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257) [java] at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512) [java] at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374) [java] at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:366) [java] at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264) [java] at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264) [java] at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264) [java] at org.dspace.storage.rdbms.DatabaseManager.loadSql(DatabaseManager.java:961) [java] at org.dspace.storage.rdbms.InitializeDatabase.main(InitializeDatabase.java:50) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [java] at java.lang.reflect.Method.invoke(Method.java:606) [java] at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:225) [java] at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:77) ================= This Exception is repeated really often, followed by other Exceptions complaining missing relations, like "item".
    via by Pascal-Nicolas Becker,
  • I tried to install DSpace with another schema than the default "public" schema. Nevertheless all necessary tables, sequences and the function getnextid where created in public schema. The ant build (I called fresh_install) fails with the following Exception: ================= load_registries: [java] 2014-07-21 16:40:07,480 INFO org.dspace.core.ConfigurationManager @ Loading system provided config property (-Ddspace.configuration): config/dspace.cfg [java] 2014-07-21 16:40:07,493 INFO org.dspace.core.ConfigurationManager @ Using default log4j provided log configuration. If unintended, check your dspace.cfg for (log.init.config) [java] 2014-07-21 16:40:07,908 FATAL org.dspace.administer.RegistryLoader @ anonymous::error_loading_registries: [java] org.postgresql.util.PSQLException: ERROR: syntax error at or near ")" [java] Position: 39 [java] at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103) [java] at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836) [java] at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257) [java] at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512) [java] at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388) [java] at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:273) [java] at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) [java] at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) [java] at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) [java] at org.dspace.storage.rdbms.DatabaseManager.doInsertPostgres(DatabaseManager.java:1725) [java] at org.dspace.storage.rdbms.DatabaseManager.insert(DatabaseManager.java:655) [java] at org.dspace.storage.rdbms.DatabaseManager.create(DatabaseManager.java:446) [java] at org.dspace.content.BitstreamFormat.create(BitstreamFormat.java:403) [java] at org.dspace.administer.RegistryLoader.loadFormat(RegistryLoader.java:172) [java] at org.dspace.administer.RegistryLoader.loadBitstreamFormats(RegistryLoader.java:138) [java] at org.dspace.administer.RegistryLoader.main(RegistryLoader.java:75) [java] Error: [java] - ERROR: syntax error at or near ")" [java] Position: 39 BUILD FAILED /home/pbecker/git/tuub/dspace/target/dspace-installer/build.xml:858: Java returned: 1 ================= If I remove the "public" schema from my database, DSpace installation already fails while trying to create the database tables: ================= [java] 2014-07-21 16:47:36,514 INFO org.dspace.servicemanager.DSpaceKernelImpl @ DSpace kernel startup completed in 1826 ms and registered as MBean: org.dspace:name=772d5a14-d9eb-459d-8430-d35355120306,type=DSpaceKernel [java] 2014-07-21 16:47:36,518 INFO org.dspace.storage.rdbms.InitializeDatabase @ Initializing Database [java] 2014-07-21 16:47:36,528 INFO net.sf.ehcache.util.UpdateChecker @ New update(s) found: 2.4.7 [http://www.terracotta.org/confluence/display/release/Release+Notes+Ehcache+Core+2.4] [java] 2014-07-21 16:47:36,605 WARN org.dspace.storage.rdbms.DatabaseManager @ Got SQL Exception: org.postgresql.util.PSQLException: ERROR: no schema has been selected to create in [java] org.postgresql.util.PSQLException: ERROR: no schema has been selected to create in [java] at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103) [java] at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836) [java] at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257) [java] at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512) [java] at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374) [java] at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:366) [java] at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264) [java] at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264) [java] at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264) [java] at org.dspace.storage.rdbms.DatabaseManager.loadSql(DatabaseManager.java:961) [java] at org.dspace.storage.rdbms.InitializeDatabase.main(InitializeDatabase.java:50) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [java] at java.lang.reflect.Method.invoke(Method.java:606) [java] at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:225) [java] at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:77) ================= This Exception is repeated really often, followed by other Exceptions complaining missing relations, like "item".
    via by Pascal-Nicolas Becker,
  • GitHub comment 413#162845402
    via GitHub by kosarko
    ,
  • We found a problem after upgrading from dspace 3.2 to dspace 5.0 rc2 (for testing purposes). We've tested running: /dspace/bin/dspace checker -lp the following error occurs when we tested with migrated itens or with new itens: dspace log -------------------------------------------------- Bitstream metadata could not be retrieved. ERROR: column bitstream.user_format_description does not exist Position: 141 org.postgresql.util.PSQLException: ERROR: column bitstream.user_format_description does not exist Position: 141 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:273) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) at org.dspace.checker.BitstreamInfoDAO.findByBitstreamId(BitstreamInfoDAO.java:244) at org.dspace.checker.CheckerCommand.checkBitstream(CheckerCommand.java:142) at org.dspace.checker.CheckerCommand.process(CheckerCommand.java:119) at org.dspace.app.checker.ChecksumChecker.main(ChecksumChecker.java:233) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:225) at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:77) checksum checker log ------------------------------------------------- WET - STATEMENT: select bitstream.deleted, bitstream.store_number, bitstream.size_bytes, bitstreamformatregistry.short_description, bitstream.bitstream_id, bitstream.user_format_description, bitstream.internal_id, bitstream.source, bitstream.checksum_algorithm, bitstream.checksum, bitstream.name, most_recent_checksum.last_process_end_date,most_recent_checksum.to_be_processed from bitstream left outer join bitstreamformatregistry on bitstream.bitstream_format_id = bitstreamformatregistry.bitstream_format_id, most_recent_checksum where bitstream.bitstream_id = $1 and bitstream.bitstream_id = most_recent_checksum.bitstream_id 2015-01-08 00:00:00.299 WET - ERROR: column bitstream.user_format_description does not exist at character 141 ---------------------------------------------------------------- We know that some of the columns (one of them is the user_format_description) in the bitstream table are droped in this version of DSpace. We confirmed that after upgrading from 3.2 to 5.0 rc2, in the BD, the column bitstream.user_format_description no longer exists. We think the problem might be with the checker himself.
    via by Paulo Graça,
  • This is one of the most commonly problems encountered in dspace-tech in the long term. When you configure browse indexes (webui.browse.index.*) in dspace.cfg and forget to run index-init, you'll get the following stacktrace: 2012-11-28 15:39:13,905 INFO org.dspace.browse.BrowseEngine @ anonymous:session_id=1BC621649FBADF668F6EFB2157FF68D0:ip_addr=66.249.74.79:browse_by_value:focus=null 2012-11-28 15:39:13,925 ERROR org.dspace.browse.BrowseDAOPostgres @ caught exception: org.postgresql.util.PSQLException: ERROR: relation "bi_4_dis" does not exist Position: 30 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:273) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) at org.dspace.storage.rdbms.DatabaseManager.query(DatabaseManager.java:284) at org.dspace.browse.BrowseDAOPostgres.doCountQuery(BrowseDAOPostgres.java:155) at org.dspace.browse.BrowseEngine.getTotalResults(BrowseEngine.java:761) at org.dspace.browse.BrowseEngine.browseByValue(BrowseEngine.java:450) It would be more helpful to display an explanation what is wrong and how to fix it (run index-init) with a link to the documentation: https://wiki.duraspace.org/pages/viewpage.action?pageId=30218817 https://wiki.duraspace.org/display/DSDOC3x/Configuration
    via by Ivan Masár,
  • This is one of the most commonly problems encountered in dspace-tech in the long term. When you configure browse indexes (webui.browse.index.*) in dspace.cfg and forget to run index-init, you'll get the following stacktrace: 2012-11-28 15:39:13,905 INFO org.dspace.browse.BrowseEngine @ anonymous:session_id=1BC621649FBADF668F6EFB2157FF68D0:ip_addr=66.249.74.79:browse_by_value:focus=null 2012-11-28 15:39:13,925 ERROR org.dspace.browse.BrowseDAOPostgres @ caught exception: org.postgresql.util.PSQLException: ERROR: relation "bi_4_dis" does not exist Position: 30 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:273) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) at org.dspace.storage.rdbms.DatabaseManager.query(DatabaseManager.java:284) at org.dspace.browse.BrowseDAOPostgres.doCountQuery(BrowseDAOPostgres.java:155) at org.dspace.browse.BrowseEngine.getTotalResults(BrowseEngine.java:761) at org.dspace.browse.BrowseEngine.browseByValue(BrowseEngine.java:450) It would be more helpful to display an explanation what is wrong and how to fix it (run index-init) with a link to the documentation: https://wiki.duraspace.org/pages/viewpage.action?pageId=30218817 https://wiki.duraspace.org/display/DSDOC3x/Configuration
    via by Ivan Masár,
  • Internal System Error on dspace 5.2
    via by Emmanuel Wilson,
    • org.postgresql.util.PSQLException: ERROR: syntax error at or near ")" Position: 39 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:273) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) at org.dspace.storage.rdbms.DatabaseManager.doInsertPostgres(DatabaseManager.java:1725) at org.dspace.storage.rdbms.DatabaseManager.insert(DatabaseManager.java:655) at org.dspace.storage.rdbms.DatabaseManager.create(DatabaseManager.java:446) at org.dspace.content.BitstreamFormat.create(BitstreamFormat.java:403) at org.dspace.administer.RegistryLoader.loadFormat(RegistryLoader.java:172) at org.dspace.administer.RegistryLoader.loadBitstreamFormats(RegistryLoader.java:138) at org.dspace.administer.RegistryLoader.main(RegistryLoader.java:75)

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    haerickhaerick
    10 times, last one,
    csanyigaborcsanyigabor
    4 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    jokesterjokester
    1 times, last one,
    94 more bugmates