Announcement Announcement Module
Collapse
No announcement yet.
Add jars to the classpath in a Grails project Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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',driver:'o...QLDriver']

    I hope someone can help me...
    Last edited by Talena; Mar 10th, 2012, 07:11 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.

    Comment


    • #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.

      Comment

      Working...
      X