ah. hooray for the archives! yeah, that confirms it. the problem is that your email merging code is using the Velocity singleton and it is not being init'ed before use.
you have a few different options: - use the same VelocityEngine as the VelocityViewServlet instead of the singleton. the only way to get this is via a the protected getVelocityEngine() method in the VVS. so to do this, you would likely have to subclass the VelocityViewServlet to get access to that method. i'm not sure where you would go from there though, because i have no idea how your email code is set up. - use a second VelocityEngine instead of the singleton. this should be pretty straightforward. just create a VelocityEngine, initialize it and then use it. the tricky part might be the initialization. - keep using the singleton, but initialize it yourself. this is probably the simplest solution for now. the only potential tricky part, as above, will be setting/getting the init properties. but that shouldn't be too hard. On 4/15/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Thank you so much Nathan. I have spent much time today reading and rereading > your words and looking at the code. > > I think I understand now. Thank you for taking the time to explain it. > > In general I had been doing things a little bit wrong, but it used to work in > 1.4. Now it doesn't. > > I need to figure out now how to get the instance of the VelocityViewServelet > for use in my email template merger. Not sure how to do it but looking > around. > > I had another problem that I think can help others in the future. In looking > through the archives I noticed other people having the same null pointer > exception I was having. I went through the code and noticed that if a person > did not "init()" a velocity engine, the resourceManager never gets > initialized. When they call the function below in RuntimeInstance.java, they > get the null pointer exception. > > public Template getTemplate(String name, String encoding) > throws ResourceNotFoundException, ParseErrorException, Exception > { > return (Template) > resourceManager.getResource(name, > ResourceManager.RESOURCE_TEMPLATE, encoding); > } > > I think once I figure out how to get the VVS and use that for my templating, > things will just work again with 1.5. > > Thank you so much both of you for your patience and help. > > JohnE > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]