aspose file tools*
The moose likes Beginning Java and the fly likes How do I read the compile time error messages? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How do I read the compile time error messages?" Watch "How do I read the compile time error messages?" New topic
Author

How do I read the compile time error messages?

Jake Barnes
Greenhorn

Joined: Jan 15, 2010
Posts: 4
I'm using NetBeans 6.8. I tried to compile. I got the following error. It seems to say that I do not have a class that I need. But which class? I'm unsure which class is missing.


David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Seems fairly clear:Sounds like there's a build path problem with the project, obviously with Ivy, which I've used only rarely.
Jake Barnes
Greenhorn

Joined: Jan 15, 2010
Posts: 4
Is it normal for NetBeans to use Ivy? Or is it only resorting to that because I tried to include a Groovy class?

Maybe I should restate my question. I think I'm having a problem with trying to compile a mix of Java and Groovy classes. I was assuming NetBeans would handle that for me automatically, since I've downloaded the Groovy plugin for NetBeans, but maybe I was wrong.
Jake Barnes
Greenhorn

Joined: Jan 15, 2010
Posts: 4
Also, I apologize if this is an idiot question, but why was it "obvious" to you that Ivy was the problem? Simply because it appears first in the stack trace? The NoClassDefFoundError will always point straight to the package or file that is causing the problem?

I do wish the error would tell me what class is missing. That would be a lot more helpful. Can you think of anyway for me to get a better error message?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

The error *is* telling you what class is missing; look at it again:I guess I'm not sure how to interpret that any other way. When you look at a stack trace the top-most line will be the most recent "thing" that caused the problem. It's a stack ("stack trace"), meaning the top-most item is the most-recently-put-on-the-stack.

Sometimes you'll see things like "Root cause" or, as here, "Caused by". In this case, there's a "Caused by", but the top-most item in that list is the same thing. It's a bit more clear that it's an Ant/Ivy issue once you move further down the stack trace (back into program execution history, into the past).

I don't know *why* NB is using Ivy: Ivy is a dependency resolution solution for Ant. Do you have an Ant build file? It might also be something to do with Groovy, the NetBeans/Groovy integration, or...?

(I haven't used Groovy for some time (now that it has AST transformations, however, I will again) so it might be something to do with Groovy, building Groovy classes, or who knows what else.)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do I read the compile time error messages?