Hi,
I am using velocity templates to generate emails in a stand alone
application.
During the life cycle of the application, i generate 5 emails. But i
am facing a problem now:
If i run this stand alone application say more than 3 times
continuosly, i get the below error and mails are not being sent after
that.If i restart the server, start the application, then the mails
will be sent without any problems for next 3 runs. Is it a bug with
Velocity itself or bug in the way i implemented it?
I googled it and found many people face same problem. But couldn't get
any solution for it. So thought this is the right place to post it.
PANIC : error configuring SimpleLog4JLogSystem :
java.io.FileNotFoundException: velocity.log (Too many open files)
log4j:WARN No appenders could be found for logger
(org.apache.velocity.runtime.log.SimpleLog4JLogSys tem).
log4j:WARN Please initialize the log4j system properly.
Can any one please help me to overcome this problem?
I am using the log4J for logging instead of AvalonLogSystem.
Here is the steps what i do for sending emails:
1. Initialize the velocity --- > Velocity.init(p); where 'p' is the
properties file.
2.Create the new instance of velocitycontext and usue it for all emails -->
VelocityContext context = new VelocityContext();
3. Put the data to context.
Please note that, if i run my application once in a day, it works
fine.
I feel it is some thing to do with the way Velocity does the file
handling....
Please help me to overcome this problem.
Thanks in advance,
---------------------------------
Yahoo! Answers - Get better answers from someone who knows. Tryit now.