I developed on my win machine, so I guess I ran in this error a bit too late
The test server is a linux machine now and I guess I have to specify where the log should exist?
Whole exception:
Thx in advance
Oh right... sorry. I don't have any problem with this, so don't think I can help...
Does that last line right?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Because the method is:
public String getBody(String templateDirectory, String template, Map<String, Object> contextParameters) throws VelocityException
Do you have an working example?
You meant this, right? :o
velocityManager.getEncodedBodyForContent(this.class.getResource("view/email/subject.vm").getText("utf-8"), "", context)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Why are you passing just the filename? Yours Paths stuff is wrong and not necessary.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, I tried this way now:
VelocityManager velocityManager = ComponentAccessor.getVelocityManager() Map<String, Object> context = new HashMap<String, Object>() context.put("issueSummary", "summary") context.put("issueKey", "SD-678") Path path = Paths.get(this.class.getResource("view/email/subject.vm").toURI()) log.debug(velocityManager.getBody(path.parent.toString(), path.fileName.toString(), context))
But that will throw a much bigger exception:
http://pastebin.com/GJs4DuCh
Can someone point me the correct way to go here?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I created a new Velocity object:
VelocityEngine ve = new VelocityEngine()
I used it with a VelocityContext and everything worked fine on my Win machine. I guess there was no problem to create the velocity.log but now on linux on my test server it crashes.
After that I thought that pulling Velocity from the ComponentAccessor will be a better way and maybe there everything is configured. That last bit I´ll try tomorrow.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you give a bit of background? What's your question?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.