velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject NullPointerException in setDefaultProperties
Date Wed, 21 Jan 2004 16:08:31 GMT

Hi,
I'm just starting to use Velocity, so please forgive this question if
it's a classical newbie one.  I did search the list archives and the
documentation without finding an answer to this, though a similar one
was raised once
(http://marc.theaimsgroup.com/?l=velocity-user&w=2&r=1&s=setdefaultprope
rties+&q=b).

Using Velocity 1.3.1 on JDK 1.4.2 (on Solaris), I do:

VelocityEngine ve = new VelocityEngine();
ve.init();

And I get:
java.lang.NullPointerException
  at
org.apache.velocity.runtime.RuntimeInstance.setDefaultProperties(Runtime
Instance.java:295)
  at
org.apache.velocity.runtime.RuntimeInstance.initializeProperties(Runtime
Instance.java:423
  at
org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:26
6)
  ...

I will add that:
- The velocity jar file is on the classpath (along with the
commons-collections jar)
- The velocity jar file contains the
org.apache.velocity.runtime.defaults properties files, so the
classloader resource lookup should be OK

So what am I missing?  This should be trivial, right?

Thanks,

Yoav Shapira
Millennium ChemInformatics





This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message