1

I have installed the geoserver JDBC config community module, but now geoserver fails to start. I have set the properties to connect to an oracle database like this:

#Default GeoServer JDBC config driver and connection pool options. Edit as appropriate.
#Mon Aug 18 13:46:46 CEST 2014
enabled=true
initdb=true
initScript=${GEOSERVER_DATA_DIR}/jdbcconfig/scripts/initdb.oracle.sql
import=true
jdbcUrl=jdbc:oracle:thin:@xxx.xxx.local:1521/dbname
driverClassName=oracle.jdbc.driver.OracleDriver
username=username
password=password
pool.minIdle=4
pool.maxActive=20
pool.poolPreparedStatements=true
pool.maxOpenPreparedStatements=100
pool.testOnBorrow=true
pool.validationQuery=SELECT SYSDATE FROM DUAL;

However when I start geoerserver it returns the following stacktrace:

2014-08-28 17:40:19,377 ERROR [org.springframework.web.context.ContextLoader] - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'geoServerLoader' defined in URL [jar:file:/C:/Program%20Files%20(x86)/GeoServer/webapps/geoserver/WEB-INF/lib/gs-main-2.5.1.jar!/applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'JDBCGeoServerLoader' defined in URL [jar:file:/C:/Program%20Files%20(x86)/GeoServer/webapps/geoserver/WEB-INF/lib/gs-jdbcconfig-2.5-SNAPSHOT.jar!/applicationContext.xml]: Cannot resolve reference to bean 'JDBCCatalogFacade' while setting bean property 'catalogFacade'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'JDBCCatalogFacade' defined in URL [jar:file:/C:/Program%20Files%20(x86)/GeoServer/webapps/geoserver/WEB-INF/lib/gs-jdbcconfig-2.5-SNAPSHOT.jar!/applicationContext.xml]: Cannot resolve reference to bean 'JDBCConfigDB' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'JDBCConfigDB' defined in URL [jar:file:/C:/Program%20Files%20(x86)/GeoServer/webapps/geoserver/WEB-INF/lib/gs-jdbcconfig-2.5-SNAPSHOT.jar!/applicationContext.xml]: Cannot resolve reference to bean 'jdbcConfigDataSource' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdbcConfigDataSource': FactoryBean threw exception on object creation; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (ORA-00911: invalid character )
etc lots more stack
etc
etc
etc
.
.
.
Caused by: java.sql.SQLException: ORA-00911: invalid character at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288) at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743) at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207) at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:790) at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1037) at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:830) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1132) at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1272) at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208) at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208) at org.apache.commons.dbcp.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:658) at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1558) at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545) ... 94 more

Bottomline is that it returns an invalid character error.
I have have looked at the provided initdb.oracle.sql, but cannot find anything wrong. Even when I have only 1 line which I typed myself it fails on the ORA-0911 error. For instance the first line:

CREATE SEQUENCE seq_OBJECT;

This also fails on the invalid character error. I also tried this without the semicolon.
Any suggestions?
I am using geoserver 2.5.1 and have downloaded the appropriated JDBCconfig files. I am trying to connect to an oracle 11 database. I am working on a windows 7 desktop. I have only added what I think is the interesting part of the stacktrace, but i can add the rest if needed.

0

I found out what caused it.
I had to remove all semi-colons from all queries, both from the jdbcconfig.properties file as well as from the initdb.oracle.sql file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.