tags:

views:

125

answers:

2

I have a grails project and a jar file in the lib directory of the grails project. The problem is when i run the app I get class not found errors on classes within the jar file. Why can these not be seen by the grails app?

A: 

The lib directory is the right place for JAR files. With only the information provided above, I've no way of guessing why it's not working for you. All I can suggest is:

  • Run "grails war" on the command line
  • Unzip the created .war file and check that the JARs are in the WEB-INF\lib directory

If you're running Grails 1.2 you might want to check that the JAR isn't excluded by the new dependency resolution DSL.

Don
thanks - I'm trying to use Esendex from within a service in the grails-app/services directory. I've got the Esendex jar in the lib folder and I've got the import line correct, it just throws a class def not found error on the Esendex Header class when i try to call the service.
ellander
I have done as you suggested - the corerct jars are within the WAR file in the correct place.
ellander
+2  A: 

From your last response, I believe you're missing some more required jar files. You should probably check if there are any other jars required for Esendex. Hope it helps.

Satya