Unable to parse template "Class" Error message: This template did not produce a Java class or an interface - during New -> Java Class

I am getting
Unable to parse template "Class" Error message: This template did not produce a Java class or an interface - during New -> Java Class

Here is template: *default template for CLASS):
#parse("Copyright Header.java")
#if (${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
#parse("File Header.java")
public class ${NAME} {
}

Here is stack trace from idea.log:

2011-06-21 22:14:43,074 [21463456]   INFO - lij.ide.actions.ElementCreator -  
java.lang.NullPointerException
    at com.intellij.psi.impl.file.JavaDirectoryServiceImpl.a(JavaDirectoryServiceImpl.java:156)
    at com.intellij.psi.impl.file.JavaDirectoryServiceImpl.createClass(JavaDirectoryServiceImpl.java:91)
    at com.intellij.ide.actions.CreateClassAction.doCreate(CreateClassAction.java:73)
    at com.intellij.ide.actions.CreateClassAction.doCreate(CreateClassAction.java:37)
    at com.intellij.ide.actions.CreateTemplateInPackageAction.a(CreateTemplateInPackageAction.java:120)
    at com.intellij.ide.actions.CreateTemplateInPackageAction.createFile(CreateTemplateInPackageAction.java:49)
    at com.intellij.ide.actions.CreateFromTemplateAction$1.createFile(CreateFromTemplateAction.java:73)
    at com.intellij.ide.actions.CreateFromTemplateAction$1.createFile(CreateFromTemplateAction.java:66)
    at com.intellij.ide.actions.CreateFileFromTemplateDialog$BuilderImpl$1.create(CreateFileFromTemplateDialog.java:123)
    at com.intellij.ide.actions.ElementCreator$1.run(ElementCreator.java:82)
    at com.intellij.openapi.application.RunResult.run(RunResult.java:37)
    at com.intellij.openapi.command.WriteCommandAction$2$1.run(WriteCommandAction.java:122)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:841)
    at com.intellij.openapi.command.WriteCommandAction$2.run(WriteCommandAction.java:120)
    at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:115)
    at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:91)
    at com.intellij.openapi.command.WriteCommandAction.performWriteCommandAction(WriteCommandAction.java:118)
    at com.intellij.openapi.command.WriteCommandAction.access$000(WriteCommandAction.java:34)
    at com.intellij.openapi.command.WriteCommandAction$1.run(WriteCommandAction.java:73)
    at com.intellij.openapi.command.WriteCommandAction.execute(WriteCommandAction.java:78)
    at com.intellij.ide.actions.ElementCreator.tryCreate(ElementCreator.java:76)
    at com.intellij.ide.actions.CreateFileFromTemplateDialog.doOKAction(CreateFileFromTemplateDialog.java:74)
    at com.intellij.openapi.ui.DialogWrapper$OkAction.doAction(DialogWrapper.java:1332)
    at com.intellij.openapi.ui.DialogWrapper$DialogWrapperAction.actionPerformed(DialogWrapper.java:1305)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:404)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:374)
    at javax.swing.plaf.basic.BasicRootPaneUI$Actions.actionPerformed(BasicRootPaneUI.java:208)
    at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1664)
    at javax.swing.JComponent.processKeyBinding(JComponent.java:2851)
    at javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:285)
    at javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:234)
    at javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:2928)
    at javax.swing.JComponent.processKeyBindings(JComponent.java:2920)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2814)
    at java.awt.Component.processEvent(Component.java:5913)
    at java.awt.Container.processEvent(Container.java:2105)
    at java.awt.Component.dispatchEventImpl(Component.java:4497)
    at java.awt.Container.dispatchEventImpl(Container.java:2163)
    at java.awt.Component.dispatchEvent(Component.java:4323)
    at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1881)
    at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:749)
    at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1025)
    at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:892)
    at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:713)
    at java.awt.Component.dispatchEventImpl(Component.java:4367)
    at java.awt.Container.dispatchEventImpl(Container.java:2163)
    at java.awt.Window.dispatchEventImpl(Window.java:2478)
    at java.awt.Component.dispatchEvent(Component.java:4323)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:649)
    at java.awt.EventQueue.access$000(EventQueue.java:96)
    at java.awt.EventQueue$1.run(EventQueue.java:608)
    at java.awt.EventQueue$1.run(EventQueue.java:606)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:116)
    at java.awt.EventQueue$2.run(EventQueue.java:622)
    at java.awt.EventQueue$2.run(EventQueue.java:620)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:619)
    at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:661)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:501)
    at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:410)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:368)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:194)
    at java.awt.Dialog$1.run(Dialog.java:1072)
    at java.awt.Dialog$3.run(Dialog.java:1126)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Dialog.show(Dialog.java:1124)
    at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:675)
    at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:412)
    at com.intellij.openapi.ui.DialogWrapper.showAndGetOk(DialogWrapper.java:1179)
    at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1164)
    at com.intellij.ide.actions.CreateFileFromTemplateDialog$BuilderImpl.show(CreateFileFromTemplateDialog.java:136)
    at com.intellij.ide.actions.CreateFromTemplateAction.actionPerformed(CreateFromTemplateAction.java:65)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter$1.run(ActionMenuItem.java:242)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:662)
    at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:104)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:228)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:92)
    at com.intellij.ui.plaf.beg.BegMenuItemUI.a(BegMenuItemUI.java:512)
    at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:44)
    at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:532)
    at java.awt.Component.processMouseEvent(Component.java:6136)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
    at java.awt.Component.processEvent(Component.java:5901)
    at java.awt.Container.processEvent(Container.java:2105)
    at java.awt.Component.dispatchEventImpl(Component.java:4497)
    at java.awt.Container.dispatchEventImpl(Container.java:2163)
    at java.awt.Component.dispatchEvent(Component.java:4323)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4461)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4125)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4055)
    at java.awt.Container.dispatchEventImpl(Container.java:2149)
    at java.awt.Window.dispatchEventImpl(Window.java:2478)
    at java.awt.Component.dispatchEvent(Component.java:4323)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:649)
    at java.awt.EventQueue.access$000(EventQueue.java:96)
    at java.awt.EventQueue$1.run(EventQueue.java:608)
    at java.awt.EventQueue$1.run(EventQueue.java:606)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:116)
    at java.awt.EventQueue$2.run(EventQueue.java:622)
    at java.awt.EventQueue$2.run(EventQueue.java:620)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:619)
    at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:661)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:510)
    at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:410)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:368)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)
2011-06-21 22:14:45,209 [21465591]  ERROR - fileTemplates.FileTemplateUtil - Error evaluating template:
#parse("Copyright Header.java")
#if (${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
#parse("File Header.java")
public class ${NAME} {
}

org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'Copyright Header.java'
    at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:452)
    at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:335)
    at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1102)
    at org.apache.velocity.runtime.directive.Parse.render(Parse.java:177)
    at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
    at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
    at org.apache.velocity.app.Velocity.evaluate(Velocity.java:322)
    at org.apache.velocity.app.Velocity.evaluate(Velocity.java:195)
    at com.intellij.ide.fileTemplates.FileTemplateUtil.a(FileTemplateUtil.java:230)
    at com.intellij.ide.fileTemplates.FileTemplateUtil.mergeTemplate(FileTemplateUtil.java:224)
    at com.intellij.ide.fileTemplates.impl.FileTemplateBase.getText(FileTemplateBase.java:86)
    at com.intellij.ide.fileTemplates.FileTemplateUtil$4.compute(FileTemplateUtil.java:295)
    at com.intellij.ide.fileTemplates.FileTemplateUtil$4.compute(FileTemplateUtil.java:292)
    at com.intellij.openapi.util.ClassLoaderUtil.runWithClassLoader(ClassLoaderUtil.java:63)
    at com.intellij.ide.fileTemplates.FileTemplateUtil.createFromTemplate(FileTemplateUtil.java:291)
    at com.intellij.ide.fileTemplates.FileTemplateUtil.createFromTemplate(FileTemplateUtil.java:257)
    at com.intellij.ide.fileTemplates.ui.CreateFromTemplateDialog.b(CreateFromTemplateDialog.java:115)
    at com.intellij.ide.fileTemplates.ui.CreateFromTemplateDialog.create(CreateFromTemplateDialog.java:94)
    at com.intellij.psi.impl.file.JavaDirectoryServiceImpl.a(JavaDirectoryServiceImpl.java:145)
    at com.intellij.psi.impl.file.JavaDirectoryServiceImpl.createClass(JavaDirectoryServiceImpl.java:91)
    at com.intellij.ide.actions.CreateClassAction.doCreate(CreateClassAction.java:73)
    at com.intellij.ide.actions.CreateClassAction.doCreate(CreateClassAction.java:37)
    at com.intellij.ide.actions.CreateTemplateInPackageAction.a(CreateTemplateInPackageAction.java:120)
    at com.intellij.ide.actions.CreateTemplateInPackageAction.createFile(CreateTemplateInPackageAction.java:49)
    at com.intellij.ide.actions.CreateFromTemplateAction$1.createFile(CreateFromTemplateAction.java:73)
    at com.intellij.ide.actions.CreateFromTemplateAction$1.createFile(CreateFromTemplateAction.java:66)
    at com.intellij.ide.actions.CreateFileFromTemplateDialog$BuilderImpl$1.create(CreateFileFromTemplateDialog.java:123)
    at com.intellij.ide.actions.ElementCreator$1.run(ElementCreator.java:82)
    at com.intellij.openapi.application.RunResult.run(RunResult.java:37)
    at com.intellij.openapi.command.WriteCommandAction$2$1.run(WriteCommandAction.java:122)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:841)
    at com.intellij.openapi.command.WriteCommandAction$2.run(WriteCommandAction.java:120)
    at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:115)
    at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:91)
    at com.intellij.openapi.command.WriteCommandAction.performWriteCommandAction(WriteCommandAction.java:118)
    at com.intellij.openapi.command.WriteCommandAction.access$000(WriteCommandAction.java:34)
    at com.intellij.openapi.command.WriteCommandAction$1.run(WriteCommandAction.java:73)
    at com.intellij.openapi.command.WriteCommandAction.execute(WriteCommandAction.java:78)
    at com.intellij.ide.actions.ElementCreator.tryCreate(ElementCreator.java:76)
    at com.intellij.ide.actions.CreateFileFromTemplateDialog.doOKAction(CreateFileFromTemplateDialog.java:74)
    at com.intellij.openapi.ui.DialogWrapper$OkAction.doAction(DialogWrapper.java:1332)
    at com.intellij.openapi.ui.DialogWrapper$DialogWrapperAction.actionPerformed(DialogWrapper.java:1305)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:404)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:253)
    at java.awt.Component.processMouseEvent(Component.java:6136)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
    at java.awt.Component.processEvent(Component.java:5901)
    at java.awt.Container.processEvent(Container.java:2105)
    at java.awt.Component.dispatchEventImpl(Component.java:4497)
    at java.awt.Container.dispatchEventImpl(Container.java:2163)
    at java.awt.Component.dispatchEvent(Component.java:4323)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4461)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4125)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4055)
    at java.awt.Container.dispatchEventImpl(Container.java:2149)
    at java.awt.Window.dispatchEventImpl(Window.java:2478)
    at java.awt.Component.dispatchEvent(Component.java:4323)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:649)
    at java.awt.EventQueue.access$000(EventQueue.java:96)
    at java.awt.EventQueue$1.run(EventQueue.java:608)
    at java.awt.EventQueue$1.run(EventQueue.java:606)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:116)
    at java.awt.EventQueue$2.run(EventQueue.java:622)
    at java.awt.EventQueue$2.run(EventQueue.java:620)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:619)
    at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:661)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:510)
    at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:410)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:368)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:194)
    at java.awt.Dialog$1.run(Dialog.java:1072)
    at java.awt.Dialog$3.run(Dialog.java:1126)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Dialog.show(Dialog.java:1124)
    at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:675)
    at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:412)
    at com.intellij.openapi.ui.DialogWrapper.showAndGetOk(DialogWrapper.java:1179)
    at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1164)
    at com.intellij.ide.actions.CreateFileFromTemplateDialog$BuilderImpl.show(CreateFileFromTemplateDialog.java:136)
    at com.intellij.ide.actions.CreateFromTemplateAction.actionPerformed(CreateFromTemplateAction.java:65)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter$1.run(ActionMenuItem.java:242)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:662)
    at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:104)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:228)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:92)
    at com.intellij.ui.plaf.beg.BegMenuItemUI.a(BegMenuItemUI.java:512)
    at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:44)
    at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:532)
    at java.awt.Component.processMouseEvent(Component.java:6136)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
    at java.awt.Component.processEvent(Component.java:5901)
    at java.awt.Container.processEvent(Container.java:2105)
    at java.awt.Component.dispatchEventImpl(Component.java:4497)
    at java.awt.Container.dispatchEventImpl(Container.java:2163)
    at java.awt.Component.dispatchEvent(Component.java:4323)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4461)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4125)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4055)
    at java.awt.Container.dispatchEventImpl(Container.java:2149)
    at java.awt.Window.dispatchEventImpl(Window.java:2478)
    at java.awt.Component.dispatchEvent(Component.java:4323)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:649)
    at java.awt.EventQueue.access$000(EventQueue.java:96)
    at java.awt.EventQueue$1.run(EventQueue.java:608)
    at java.awt.EventQueue$1.run(EventQueue.java:606)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:116)
    at java.awt.EventQueue$2.run(EventQueue.java:622)
    at java.awt.EventQueue$2.run(EventQueue.java:620)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:619)
    at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:661)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:510)
    at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:410)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:368)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)
2011-06-21 22:14:45,213 [21465595]  ERROR - fileTemplates.FileTemplateUtil - IntelliJ IDEA 10.5  Build #IU-107.105
2011-06-21 22:14:45,213 [21465595]  ERROR - fileTemplates.FileTemplateUtil - JDK: 1.6.0-google-v4
2011-06-21 22:14:45,213 [21465595]  ERROR - fileTemplates.FileTemplateUtil - VM: OpenJDK 64-Bit Server VM
2011-06-21 22:14:45,213 [21465595]  ERROR - fileTemplates.FileTemplateUtil - Vendor: Google Inc.
2011-06-21 22:14:45,213 [21465595]  ERROR - fileTemplates.FileTemplateUtil - OS: Linux
2011-06-21 22:14:45,213 [21465595]  ERROR - fileTemplates.FileTemplateUtil - Last Action: NewClass
2011-06-21 22:14:45,213 [21465595]  ERROR - fileTemplates.FileTemplateUtil - Current Command: Creating class com.google.runtest.SomeTest

14 comments
Comment actions Permalink

I am adding 'Copy Header' template using:
com.intellij.ide.fileTemplates.FileTemplateManager.addTemplate("Copyright Header", "java")
                                                                                                    .setText(lines("// copy right header",             ""      ));

This adds 'Copyright Header' under 'Templates' tab, where as manually adding this 'copyright Header' under 'Includes' tab is working fine. [Note: Templates/Includes tab exists under: File -> Settings -> File Templates].

Any idea how to fix this?

0
Comment actions Permalink

Hi,

Just want to add, that I had the same error. Restarting IntelliJ fixed it in my case.

best
ingvar

0
Comment actions Permalink

Having the same problem. Restarting does not fix the problem for me. I cannot create new classes in the IDE and that's quite frustrating (2017.1.3 ultimate).

 

0
Comment actions Permalink

Add to your idea.vmoptions or idea64.vmoptions following line: 

-Djdk.util.zip.ensureTrailingSlash=false

For more info check Oracle changelog for version 144 about ZipEntry: https://www.java.com/en/download/faq/release_changes.xml

 

7
Comment actions Permalink

I too was struggling with this issue from the past few days.  Reinstalling/Restarting never worked out for me.  However, the suggestion given by @Fred worked out.  I am surprised I missed this suggestion earlier.  Thanks @Fred.

1
Comment actions Permalink

I had the same problem. I'm on 2016.3.7. 

Fred's suggestion worked for me. 

Thank you, Fred!

1
Comment actions Permalink

I had such problem in AndroidStudio (tried version 2.3 and 3.0 beta 2). The fix described by Wojciech Fred helped me. Thanks a lot!

0
Comment actions Permalink

Thanks a lot, @Fred!

0
Comment actions Permalink

Worked like a champ, @Fred.  Thank you!

0
Comment actions Permalink

"-Djdk.util.zip.ensureTrailingSlash=false" worked for me as well. The problem started appearing when I moved my project to different directory which was actually a symbolic link. It might have something to do with canonical paths.

0
Comment actions Permalink

Can you plz show me how to add this "-Djdk.util.zip.ensureTrailingSlash=false" because im new you can mail me at im-poli@postribe.com hope you will help me i need help for my android studio because i just have started programing and im running in this errors ... thank you 

0
Comment actions Permalink

I had the same problem. First I tried the second solution in this answer. https://stackoverflow.com/a/47195919/2940265 It didn't work out. I suspect that it might be the IntelliJ cache. So I restarted IntelliJ using File -> Invalidate Caches/Restart My problem was solved then.

0
Comment actions Permalink

Fred's tip is also the solution for me. Thank you.

0
Comment actions Permalink

i try both tips, first try File -> Invalidate Caches/Restart

but not working.......

then try Fred's tips

and aging File -> Invalidate Caches/Restart

now working

thanks...........

0

Please sign in to leave a comment.