Could not find or load main class com.opengamma.component.tool.DbCreateTool

I am trying to setup PostgreSQL but facing this class not found error. I am following the doc

C:\\OG-Platform\\examples\\examples-simulated\\target\\scripts>db-create-tool.bat  -c classpath:dbtoolcontext/

"C:\\Program Files\\Java\\jdk1.7.0_25\\bin\\java" -Xms512m -Xmx1024m -XX:PermSize=128
M -XX:MaxPermSize=256M -XX:+UseParallelGC -XX:+UseParallelOldGC -cp "C:\\Users\\Mu
NAPSHOT.jar;" com.opengamma.component.tool.DbCreateTool -c classpath:dbtoolconte
xt/ -l com/opengamma/util/warn-logb

Error: Could not find or load main class com.opengamma.component.tool.DbCreateTool


You need to be running that script from within target/server-dir/scripts, not target/scripts

It looks like you are running the scripts from the wrong folder. The “examples-simulated/target/scripts” folder is a temporary work area used while creating the build. Scripts will not work in there.

The standard maven build creates a full unpacked installation in “examples-simulated/target/server-dir”, and it is the scripts in there that you should run. You may wish to move that folder out of “target” to simplify development.

Thanks, now I am able to run the script. But its throwing error for the following line
MANAGER.NEXT.FILE = classpath:dbtoolcontext/dbtoolcontext.ini

I do not have any dbtoolcontext.ini file in server-dir/config/dbtoolcontext folder. Is it automatically added by maven? or do I need to write it on my own? how do I write this?

Here is an example you can use: