0

I have no idea why I keep getting errors like these but I've been banging my head on the issues for a while now.

Basically, I can't use the Xtend Library when I execute a project. Eclipse builds just fine, but during runtime if I execute a class that has a reference to one of Xtext's methods I get a NoClassDefinedError.

For example this compiles just fine: var redirects = newHashMap( "/index.html" -> "/" );

But it does not execute because it has reference to Xtext's Pair.

I feel like it has something to do with build automation. Maybe a Manifest or something but I'm fairly new to Eclipse/Java (and Xtend) so it's difficult for me to see where the issue lies.

I started the java project out as a Google App Engine Web Application project and added the Xtend functionality afterwards.

Anyone have any ideas?

1 Answers1

1

You need to ensure that the Server has access to any 3rd party JARs that you add to your GAE application. I suggest that you add the JAR files to the war\WEB-INF\lib directory and then try to run your application.

Romin
  • 8,708
  • 2
  • 24
  • 28
  • This was definitely the fix. Just because the IDE has access to the jars doesn't mean that the server will have access to them. To build, the jars need to be referenced by the project and to run the server needs to have access to them. This is accomplished by referencing/placing the jars into both locations. I actually thought about manually adding the jars to the lib folder but I didn't want to do things the "wrong" way and if there were a standard way to add them I would do that instead. Thanks! – gohenderson Sep 12 '12 at 12:34