ToString exception with Padalla

Getting this exception trying to generate a toString or trying to
configure the plugin

org.intellij.idea.plugin.tostring.exception.GenerateCodeException: Error
loading default templates
caused by: Stream closed
at
org.intellij.idea.plugin.tostring.GenerateToStringAction$GenerateToStringHandler.generateMethodBody(GenerateToStringAction.java:382)
at
org.intellij.idea.plugin.tostring.GenerateToStringAction$GenerateToStringHandler.createToStringMethod(GenerateToStringAction.java:267)
at
org.intellij.idea.plugin.tostring.GenerateToStringAction$GenerateToStringHandler.generateCodeForFields(GenerateToStringAction.java:167)
at
org.intellij.idea.plugin.tostring.GenerateToStringAction$GenerateToStringHandler.access$700(GenerateToStringAction.java:71)
at
org.intellij.idea.plugin.tostring.GenerateToStringAction$3.run(GenerateToStringAction.java:181)
at com.intellij.openapi.application.b.b.runWriteAction(b.java:212)
at
org.intellij.idea.plugin.tostring.GenerateToStringAction$2.run(GenerateToStringAction.java:178)
at com.intellij.openapi.command.impl.a.executeCommand(a.java:13)
at
org.intellij.idea.plugin.tostring.psi.idea4.PsiAdapterIdea4.executeCommand(PsiAdapterIdea4.java:129)
at
org.intellij.idea.plugin.tostring.GenerateToStringAction$GenerateToStringHandler.generateCodeForFieldsLater(GenerateToStringAction.java:190)
at
org.intellij.idea.plugin.tostring.GenerateToStringAction$GenerateToStringHandler.access$300(GenerateToStringAction.java:71)
at
org.intellij.idea.plugin.tostring.GenerateToStringAction$1.run(GenerateToStringAction.java:120)
at
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
at com.intellij.ide.q.b(q.java:129)
at com.intellij.ide.q.a(q.java:105)
at com.intellij.ide.q.dispatchEvent(q.java:41)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
Caused by:
org.intellij.idea.plugin.tostring.exception.TemplateResourceException:
Error loading default templates
caused by: Stream closed
at
org.intellij.idea.plugin.tostring.template.TemplateResourceLocator.getDefaultTemplates(TemplateResourceLocator.java:69)
at
org.intellij.idea.plugin.tostring.template.TemplateResourceLocator.getDefaultTemplateBody(TemplateResourceLocator.java:43)
at
org.intellij.idea.plugin.tostring.GenerateToStringAction$GenerateToStringHandler.generateMethodBody(GenerateToStringAction.java:362)
... 21 more
Caused by: java.io.IOException: Stream closed
at
java.io.BufferedInputStream.ensureOpen(BufferedInputStream.java:120)
at java.io.BufferedInputStream.read(BufferedInputStream.java:199)
at
org.intellij.idea.plugin.tostring.util.FileUtil.readFileContent(FileUtil.java:51)
at
org.intellij.idea.plugin.tostring.util.FileUtil.readFile(FileUtil.java:27)
at
org.intellij.idea.plugin.tostring.template.TemplateResourceLocator.getDefaultTemplates(TemplateResourceLocator.java:58)
... 23 more


--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

6 comments
Comment actions Permalink

Hi

I have not yet tried Padalla.
However tomorrow I will download Padalla and try to fix it to work in both IDEA 4.x and Padalla.

/Claus

0
Comment actions Permalink

I am loading the resource files using


However JetBrains might have changed something about the classloader in Padalla. I will check it out tomorrow - Far Cry is calling :)

/Claus

0
Comment actions Permalink

On Tue, 30 Mar 2004 20:49:08 +0000 (UTC), Claus Ibsen
<no_mail@jetbrains.com> wrote:

I am loading the resource files using

>

 BufferedInputStream(Thread.currentThread().getContextClassLoader().getResourceAsStream(resource));]]>

>

However JetBrains might have changed something about the classloader in
Padalla. I will check it out tomorrow - Far Cry is calling :)

>

/Claus


Many thx and good shooting.

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

0
Comment actions Permalink

BTW: You are using v2.11 right?

/Claus

0
Comment actions Permalink

I found the bug and have it working in build 2002.

However I was getting late yesterday due the football game (Spain vs. Denmark) so I will release a dist today after work (approx +10 hours from now).

/Claus

0
Comment actions Permalink

Now fixed in v2.12 just released.

0

Please sign in to leave a comment.