-
Mar 10th, 2012, 05:59 AM
#1
Add jars to the classpath in a Grails project
Hi all,
I'm new to STS and I'm developing a semantic web search. I am using STS 2.9.0 and Grails 2.0.1 on WIndows 7.
I have to add the jdbs4sparql driver to the classpath. As usual: Project->Builth path->Configure builth path-> add Jars.
Is this enough to add the jars to the classpath? I can see all the Jars I have added in the .classpath file. But I get a ClassNotFoundException: the 0rg.lexicon.jdbc4sparql.SPARQLDriver was not found.
Should I see them in the Grails Dependencies too?
This is my code where I use this driver:
def db=[url:'jdbc:sparql:http://dbpedia.org.sparql',drive...QLDriver']
I hope someone can help me...
Last edited by Talena; Mar 10th, 2012 at 06:11 AM.
-
Mar 10th, 2012, 08:52 AM
#2
Adding to the STS classpath has no effect on the Grails application - STS manages its dependencies from what it finds in the Grails project. You can put jars in the lib directory but you need to run "grails compile --refresh-dependencies". Then in STS run Grails Tools | Refresh Dependencies to get it back in sync with Grails.
-
Mar 12th, 2012, 06:59 AM
#3
works like a dream
Thanks for the tip. I was struggling with this. I was stuck with the STS IDE, tried adding to build path, moving to WEB-INF/lib, upgraded STS to beta version from the nightly update server, modifed Config.groovy file, etc....
However, I just needed to run the command suggested by burtbeckwith
thanks for this.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules