Sunday, December 6, 2009

Problem with Freemarker and Google App Engine 1.2.6

Got the following error after upgrading Google app engine to 1.2.8: java.lang.NoClassDefFoundError: javax.swing.tree.TreeNode is a restricted class. Please see the Google App Engine developer's guide for more details.

Follow the link to this thread and you will find a patch.
clipped from

Freemarker 2.4, GAE/J 1.2.6 and javax.swing.tree.TreeNode

Apparently the javax.swing.tree.TreeNode class is not on the whitelist

for 1.2.6 and Freemarker 2.4 has an evil (IMO) dependency on it.

copy this class into your source folder
public final class TextBlock extends TemplateElement {