views:

34

answers:

1

I have a grails project and a java project. The java project was a standalone set of POJO classes, and I just dumped them into src/java under my grails project.

In the controller, I added an import statement for this package.

Now when I do a grails run-app and try to run the program, I get a grails runtime exception. It is saying NoClassDefFound for a class that is in a package that one of my POJOs imports.

The error message is showing on a line of my Controller, but the class that is missing is from an external jar that my POJO needed. I moved the .jar that it is complaining about to the grails project's lib folder. What else do I need to do?

How do I track down what is really causing this problem?

Thanks!

A: 

a low-level approach: run ProcessMonitor (which now integrates the formerly separate File Monitor). With it you can see what class file the JVM is searching for.

Also, you can add -verbose:class to the JAVA_OPTS defined in startGrails/startGrails.bat in the bin directory of grails. This will show the output (verbose!) from the class loader.

Possibly there are other JARs that are needed.

wishihadabettername