Folks,
I am facing a strange issue with Roo's database configuration. As part of Heroku deployment I had to create this environment variable:
Now every Roo project I create somehow detects that variable and uses it instead of the config provided in database.properties.Code:DATABASE_URL = postgres://postgres:password@localhost:5432/testdb
applicationContext.xml:
database.properties:Code:... <bean class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close" id="dataSource"> <property name="driverClassName" value="${database.driverClassName}"/> <property name="url" value="${database.url}"/> <property name="username" value="${database.username}"/> <property name="password" value="${database.password}"/> ... </bean> ...
Error message when running 'mvn clean jetty:run'Code:database.driverClassName=org.apache.derby.jdbc.EmbeddedDriver database.url=jdbc\:derby\:test;create\=true database.username= database.password=
I can't find any references to 'DATABASE_URL' anywhere in the project, not sure how/why it detects that environment variable chooses to use it over what is configured in database.properties. Any ideas?Code:2012-10-12 11:42:19,235 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaExport - schema export unsuccessful org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class 'org.apache.derby.jdbc.EmbeddedDriver' for connect URL 'postgres://postgres:password@localhost:5432/testdb'


Reply With Quote