I cannot get my Spring web app to find my scripts. I have the jdbc namespace configured. I have the scripts written, but, I can't figure out why no matter where I put the scripts, they can't be found. I've specifically marked folders are 'class folders'. I've put them in the same folderr as all my jars... I've thrown a hundred rocks. It's almost as though the error listed is not really my error.
This should be so simple, but sometimes, I just hit stumps.
Ultimately, I'm trying to get code in place so I can initialize a database I've promoted to CloudFoundry.
I get "Cannot read SQL script from class path resource [etcog-schema.sql]". This is my code--just like every other example I've found.
<jdbc:initialize-database data-source="dataSource">
<jdbc:script location="classpath:etcog-schema.sql"/>
<jdbc:script location="classpath:etcog-data.sql"/>
</jdbc:initialize-database>
If you are using STS and if you have created your application using the Spring Templates, then if you just put your *.sql file(s) inside src/main/resources, you should be able to access them via classpath:...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With