lundi 26 janvier 2015

javasetting jdbc driver for coldfusion (Railo) in Application.cfc

Here is what I have that doesn't work.


I have never had a need to handle a DB like this so any help is appreciated. But I am working an environment that prevents me from doing anything in the cfadmin.


In Railo under webapps I have a website folder called cms. That folder contains a file structure you would expect, js, css, img, etc.


It also has two folders: /db/cms.sqlite.db /jar/sqlite-jdbc-3.8.6.jar


Here is my Application.cfc code (cfscript):



this.javaSettings = {LoadPaths = ["./jar/"], loadColdFusionClassPath = true, reloadOnChange = true, watchInterval=30};
obj = createObject("java", "org.sqlite.JDBC");
this.datasources["cms"] = {class:'org.sqlite.JDBC',connectionString:'jdbc:sqlite:webapps/cms/db/cms.sqlite.db'};


How can I get all this to work? I can get the DB to work if I copy the JDBC jar flie to /lib/ext(so that datasources with connection string works).


Now I just have to access that JDBC jar file locally and make it accessible to form a connection string (and I don't know how exactly to do that.


Aucun commentaire:

Enregistrer un commentaire