Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0-beta-7
-
Fix Version/s: 1.0-beta-7
-
Component/s: None
-
Labels:None
-
Environment:Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing)
-
Number of attachments :
Description
The following code:
import org.apache.velocity.app.*;
Velocity.init();
results in the following stack trace:
Caught: groovy.lang.MissingPropertyException: No such property: Velocity for class: tester
groovy.lang.MissingPropertyException: No such property: Velocity for class: tester
at groovy.lang.MetaClass.getProperty(MetaClass.java:697)
at groovy.lang.GroovyObjectSupport.getProperty(GroovyObjectSupport.java:65)
at groovy.lang.Script.getProperty(Script.java:85)
at org.codehaus.groovy.runtime.InvokerHelper.getGroovyObjectProperty(InvokerHelper.java:201)
at tester.run(/linux/home/tildahl/cvs/qwela/src/com/qwela/db/tester.groovy:3)
It looks like groovy think Velocity is a property when it is a class
and I'm trying to call a static method in the class.
Tracked the problem down to groovy not importing the jar files in
~/.groovy/lib. It doesn't make a lot of sense to tell users to put
common jars in this directory and then comment out the import
of this directory in all the conf files. Seems like eather the docs
or the conf file should be change to be consistent.