views:

206

answers:

1

Specifically, I want to have my grails app under development to connect to an Oracle db defined by an tnsnames.ora file. I have the tnsnames.ora file located in c:\drivers\Network\ on my PC. When I run the grails app via "grails run-war", the db connection string defined in the tnsnames.ora file doesn't seem to be picked up:

grails prod run-war -Dserver.port=62215 -Doracle.net.tns_admin=C:\drivers\Network\

It seems the name-value pair of oracle.net.tns_admin is not being passed to the JVM used by the the embedded Tomcat that comes with Grails 1.2.0. If not, what is the proper way of specifying it, or pass any JAVA_OPTS to the underlying JVM?

+1  A: 

You're best off setting your JAVA_OPTS in the Grails startup script (%GRAILS_HOME%/bin/grails.bat). See this link for an example.

gareth_bowles