Description

When Velocity starts, an error indicating VM_global_library.vm cannot be found
is generated at "error" level. It does not seem to prevent proper behavior and
I couldn't tell from querying BugZilla whether this problem has been addressed.

Activity

You are right here - this is output as an error and it shouldn't be, as it isn't.
Velocity is trying to find the default VM library, and when it can't it reports as
an error. We can fix that by just checking to see if the library that isn't
found is the default, and squelch that error message.

Geir Magnusson Jr
added a comment - 18/Jun/02 21:38 You are right here - this is output as an error and it shouldn't be, as it isn't.
Velocity is trying to find the default VM library, and when it can't it reports as
an error. We can fix that by just checking to see if the library that isn't
found is the default, and squelch that error message.

At the very least, could the logged message be at WARN level rather than ERROR
level? I have no idea what this error means, but Velocity is working just fine
despite this "error", so I think the level should be reduced to WARN.

Matthew Sgarlata
added a comment - 19/Jan/05 13:28 At the very least, could the logged message be at WARN level rather than ERROR
level? I have no idea what this error means, but Velocity is working just fine
despite this "error", so I think the level should be reduced to WARN.
Thanks,
Matt

VM_global_library.vm is a file containing macros globally shared among all
templates. You're right in that this should be logged as either WARNING or
INFO since there's no requirement to have such a file.

Mike Kienenberger
added a comment - 20/Jan/05 01:47 VM_global_library.vm is a file containing macros globally shared among all
templates. You're right in that this should be logged as either WARNING or
INFO since there's no requirement to have such a file.

Shinobu Kawai
added a comment - 25/Jan/05 16:47 > Comment #5
If you specify a different macro file, and it didn't exist, shouldn't it be an
error?
I'm thinking there are 4 patterns:
1. No macro file specified, and VM_global_library.vm exists.
2. No macro file specified, and VM_global_library.vm doesn't exist.
3. Macro file specified, and exists.
4. Macro file specified, and doesn't exist.
1 and 3 should work fine, 2 should give an info, and 4 an error.

Shinobu Kawai
added a comment - 26/Jan/05 00:54 Created an attachment (id=14099)
patch based on Comment #7
I moved the default velocimacro library template from the default
velocity.properties to RuntimeConstants.
Now, VelocimacroFactory will check if there are any set, and if not, try the
default.
Do we need a test for this? (What do we test for?)

Will Glass-Husain
added a comment - 01/Feb/05 10:28 Patch applied. This seemed basic enough to me to do eyeball testing and patch
without a unit test. Thanks Andy for reporting this, and thanks Shinobu for
the patch. Revision #149352.