Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Unable to load velocity template

Priyanka B KDec 30 2014 — edited Jan 2 2015

Hi Friends,

Jdev Version: 11.1.1.7

Am trying to load velocity template in backing bean, AMImpl.

But no where it is loading. It is throwing null pointer exception at getTemplate method.

I tried giving different ways as below, still am unable to load it.

Is there any issue with the code?

VelocityEngine velocityEngine = new VelocityEngine();

Velocity.init();

1.Template template = velocityEngine.getTemplate("src/com/view/portal/templates/fb_velocity_template.vm");

2.Template template = velocityEngine.getTemplate("./src/com/view/portal/templates/fb_velocity_template.vm");

3.Template template = velocityEngine.getTemplate("fb_velocity_template.vm");

This post has been answered by Timo Hahn on Dec 31 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 30 2015
Added on Dec 30 2014
4 comments
2,238 views