Thread: DbcpException: Backend Start-up Failed
We are trying to install DSPACE with POSTGRES. When we run the ant fresh_install command we get a DbcpException. What could be causing an org.apache.commons.dbcp.DbcpException: Backend start-up failed: FATAL: Database "usr" does not exist in the system catalog.
I can run the command psql -d dspace -c "SELECT version();" on the postgres database and it returns the following: version -------------------------------------------------------------------------- PostgreSQL 7.3.4 on sparc-sun-solaris2.9, compiled by GCC gcc (GCC) 3.3.2 (1 row) The error we are getting with the dspace install is as follows: setup_database: [java] 2004-02-06 14:03:40,319 INFO org.dspace.storage.rdbms.InitializeDatabase @ Initializing Database [java] 2004-02-06 14:03:41,683 FATAL org.dspace.storage.rdbms.InitializeDatabase @ Caught exception: [java] org.apache.commons.dbcp.DbcpException: Backend start-up failed: FATAL: Database "usr" does not exist in the system catalog. [java] at org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:101) [java] at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:184) [java] at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(Unknown Source) [java] at org.apache.commons.dbcp.PoolingDriver.connect(PoolingDriver.java:146) [java] at java.sql.DriverManager.getConnection(DriverManager.java:512) [java] at java.sql.DriverManager.getConnection(DriverManager.java:193) [java] at org.dspace.storage.rdbms.DatabaseManager.getConnection(DatabaseManager.java:382) [java] at org.dspace.storage.rdbms.DatabaseManager.loadSql(DatabaseManager.java:668) [java] at org.dspace.storage.rdbms.InitializeDatabase.main(InitializeDatabase.java:76) [java] Caused by: Backend start-up failed: FATAL: Database "usr" does not exist in the system catalog. [java] at org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(AbstractJdbc1Connection.java:306) [java] at org.postgresql.Driver.connect(Driver.java:122) [java] at java.sql.DriverManager.getConnection(DriverManager.java:512) [java] at java.sql.DriverManager.getConnection(DriverManager.java:171) [java] at org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:95) [java] ... 8 more BUILD FAILED file:/export/home/dspace-1.1.1-source/build.xml:220: Java returned: 1 Total time: 18 seconds
Tammy, It looks like it is trying to connect using the user "usr", what is/are the connection properties. Dave On Fri, 2004-02-06 at 14:29, Tammy Jones wrote: > We are trying to install DSPACE with POSTGRES. When we run the ant > fresh_install command we get a DbcpException. What could be causing an > org.apache.commons.dbcp.DbcpException: Backend start-up failed: FATAL: > Database "usr" does not exist in the system catalog. > I can run the command psql -d dspace -c "SELECT version();" on the postgres database and it returns the following: > > version > -------------------------------------------------------------------------- > PostgreSQL 7.3.4 on sparc-sun-solaris2.9, compiled by GCC gcc (GCC) > 3.3.2 > (1 row) > > > The error we are getting with the dspace install is as follows: > > > setup_database: > > [java] 2004-02-06 14:03:40,319 INFO > org.dspace.storage.rdbms.InitializeDatabase @ Initializing Database > > [java] 2004-02-06 14:03:41,683 FATAL > org.dspace.storage.rdbms.InitializeDatabase @ Caught exception: > > [java] org.apache.commons.dbcp.DbcpException: > Backend start-up failed: FATAL: Database "usr" does not > exist in the system catalog. > > > [java] at > org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:101) > > [java] at > org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:184) > > [java] at > org.apache.commons.pool.impl.GenericObjectPool.borrowObject(Unknown > Source) > > [java] at > org.apache.commons.dbcp.PoolingDriver.connect(PoolingDriver.java:146) > > [java] at > java.sql.DriverManager.getConnection(DriverManager.java:512) > > [java] at > java.sql.DriverManager.getConnection(DriverManager.java:193) > > [java] at > org.dspace.storage.rdbms.DatabaseManager.getConnection(DatabaseManager.java:382) > > [java] at > org.dspace.storage.rdbms.DatabaseManager.loadSql(DatabaseManager.java:668) > > [java] at > org.dspace.storage.rdbms.InitializeDatabase.main(InitializeDatabase.java:76) > > [java] Caused by: Backend start-up failed: > FATAL: Database "usr" does not exist in the system > catalog. > > > [java] at > org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(AbstractJdbc1Connection.java:306) > > [java] at > org.postgresql.Driver.connect(Driver.java:122) > > [java] at > java.sql.DriverManager.getConnection(DriverManager.java:512) > > [java] at > java.sql.DriverManager.getConnection(DriverManager.java:171) > > [java] at > org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:95) > > [java] ... 8 > more > > > BUILD FAILED > > file:/export/home/dspace-1.1.1-source/build.xml:220: > > Java returned: 1 > > > Total time: 18 seconds > -- Dave Cramer 519 939 0336 ICQ # 14675561
While reading the source code, I noticed we use instanceOf *alot* this is (used to be ? ) a fairly expensive operation. Does anyone know the state of the current technology, and what the cost of instanceof really is? Then I guess the next question is how to refactor the instanceof out? Dave -- Dave Cramer 519 939 0336 ICQ # 14675561
Dave Cramer wrote: > While reading the source code, I noticed we use instanceOf *alot* this > is (used to be ? ) a fairly expensive operation. Does anyone know the > state of the current technology, and what the cost of instanceof really > is? instanceof is cheap in comparison to the other work the driver does. I wouldn't worry about it unless you have some benchmarks that point to it as a real bottleneck. > Then I guess the next question is how to refactor the instanceof out? The main user is setObject() and friends. We can't avoid an instanceof or getClass() in this case -- we need to know the runtime type of the object to do anything sensible with it. -O