Getting velocity error at statup “VM_global_library.vm”

一个人想着一个人 提交于 2019-12-10 02:39:46

问题


I am using Velocity with Spring. But in Eclipse console I get this error. My code works fine, but I want to know how to fix it.

ResourceManager : unable to find resource 'VM_global_library.vm' in any resource loader.


回答1:


Looks like it is a harmless message. From the Velocity Documentation, if this file is present, Velocity loads this up as a location of global macros. I believe you can override the behaviour by resetting or overriding the value of the below property.

velocimacro.library=




回答2:


We used to get this all the time. It's just looking for the global velocity macro library. You can just put an empty file with that name at the root of your velocity config directory or somewhere else accessible by your resource loaders. If I remember correctly its a file for you to create your own global macros... can be empty.

You may be able to disable that feature in the config, but I think the version we were using at the time did not have any way to turn off that checking.

Hope this helps.




回答3:


Upgrade your Velocity version. Or, just create an empty template of that name.




回答4:


FYI, you should go directly to the Apache Velocity downloads page and get the updated engine (1.7) and tools (2.0). Using the link above was less than helpful, but when I updated all the jars for velocity (including the 2 velocity jars and the 3 tools jars), this error finally went away. It's such a tiny thing but it's bothered me for ages.



来源:https://stackoverflow.com/questions/5313470/getting-velocity-error-at-statup-vm-global-library-vm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!