toString plugin error in 2206
Hi, I can't use toString plugin, every time after I choose fields I get this exception:
org.intellij.idea.plugin.tostring.exception.GenerateCodeException: Unable to configure AvalonLogSystem : java.io.FileNotFoundException: /opt/intellij-idea-eap/bin/velocity.log (Permission denied)
at org.intellij.idea.plugin.tostring.GenerateToStringActionHandler.generateMethodBody(GenerateToStringActionHandler.java:450)
at org.intellij.idea.plugin.tostring.GenerateToStringActionHandler.createToStringMethod(GenerateToStringActionHandler.java:309)
at org.intellij.idea.plugin.tostring.GenerateToStringActionHandler.executeGenerateAction(GenerateToStringActionHandler.java:202)
at org.intellij.idea.plugin.tostring.GenerateToStringActionHandler.access$400(GenerateToStringActionHandler.java:41)
at org.intellij.idea.plugin.tostring.GenerateToStringActionHandler$3.run(GenerateToStringActionHandler.java:219)
at com.intellij.openapi.b.b.c.runWriteAction(c.java:266)
at org.intellij.idea.plugin.tostring.GenerateToStringActionHandler$2.run(GenerateToStringActionHandler.java:216)
at com.intellij.openapi.command.b.a.executeCommand(a.java:11)
at org.intellij.idea.plugin.tostring.psi.idea4.PsiAdapterIdea4.executeCommand(PsiAdapterIdea4.java:124)
at org.intellij.idea.plugin.tostring.GenerateToStringActionHandler.executeGenerateActionLater(GenerateToStringActionHandler.java:228)
at org.intellij.idea.plugin.tostring.GenerateToStringActionHandler.access$000(GenerateToStringActionHandler.java:41)
at org.intellij.idea.plugin.tostring.GenerateToStringActionHandler$1.run(GenerateToStringActionHandler.java:115)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at com.intellij.ide.t.b(t.java:89)
at com.intellij.ide.t.a(t.java:70)
at com.intellij.ide.t.dispatchEvent(t.java:155)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Caused by: java.lang.Exception: Unable to configure AvalonLogSystem : java.io.FileNotFoundException: /opt/intellij-idea-eap/bin/velocity.log (Permission denied)
at org.apache.velocity.runtime.log.AvalonLogSystem.init(AvalonLogSystem.java:134)
at org.apache.velocity.runtime.log.LogManager.createLogSystem(LogManager.java:165)
at org.apache.velocity.runtime.RuntimeInstance.initializeLogger(RuntimeInstance.java:533)
at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:267)
at org.apache.velocity.app.VelocityEngine.init(VelocityEngine.java:122)
at org.intellij.idea.plugin.tostring.GenerateToStringActionHandler.generateMethodBody(GenerateToStringActionHandler.java:435)
... 21 more
I think it's because I don't have write access to my IDEA folder.
请先登录再写评论。
Hi
I will dig into it tomorrow at work where I have some time :)
Yes I strongly presume it is velocity that does not have permission to write to its logfile when executing.
You can also try this from IDEA:
File -> Settings -> Plugins -> ToStringPlugin
And press the 'syntax checker' button. It will activate Velocity. And let us see if you get the same error again.
/Claus
PS: Have you this problem in older version of IDEA? Or is it a fresh installation of IDEA and the plugin?
Yes, it happens when I run Syntax Checker. This is a fresh installation of IDEA and toString plugin.
On Mon, 19 Jul 2004 19:51:58 +0400, Claus Ibsen wrote:
See Jacques Morel's contributions dated 12 June to the thread "[Ann]
Copyright Plugin version 0.1.0" - he suggests a way to avoid this problem
that Rick Maddy successfully used for that particular plugin.
--
Mark Scott
mark@codebrewer.com
I just released v2.19 with the fix to use IDEAs logger for Velocity.
Thanks to Mark Scott for the hint how to fix this.
The plugin was uploaded using the old name (not the for IDEA 4.x). I set the since-build to 1162 to let it be visible for all IDEA 4 versions. I asked a Jetbrains guy to remove the for IDEA 4.5x plugin.
If you can not see the v2.19 in the pluginmanager you can manually download it from the plugin homepage.
/Claus
It is "for the IDEA 4.5x" version the plugin has NOT been updated.
The v2.19 is only uploaded for the original old pluginname.
Check the pluginmanager web pages to find the v2.19:
http://plugins.intellij.net
And the plugin homepage is at:
http://www.intellij.org/twiki/bin/view/Main/ToStringPlugin
/Claus
Great, thanks.