Gemini Community Support Site

This Gemini community support site can be used to find solutions to product issues. You can log in using Open Id, Google Profile and even Facebook. Feel free to ask a question or browse FAQs and documentation. Product tour videos are also available along with how-to videos demonstrating key Gemini capabilities.




Error encountered processing template file...

web-app

In the last week or so we've started getting a lot of error combinations in the format:

DEBUG 1/24/2008 5:16:44 PM   Error encountered processing template file: html/IssueComment.vm

Object reference not set to an instance of an object. 1/24/2008 5:16:44 PM SOURCE: NVelocity  TARGETSITE: Int32 IndexOf(System.Object) STACKTRACE: at Commons.Collections.LRUMap.IndexOf(Object key) at Commons.Collections.LRUMap.MoveToMRU(Object key) at Commons.Collections.LRUMap.getItem(Object key) at Commons.Collections.LRUMap.SyncLRUMap.getItem(Object key) at NVelocity.Runtime.Resource.ResourceCacheImpl.get(Object key) at NVelocity.Runtime.Resource.ResourceManagerImpl.GetResource(String resourceName, ResourceType resourceType, String encoding) at NVelocity.Runtime.RuntimeInstance.GetTemplate(String name, String encoding) at NVelocity.Runtime.RuntimeInstance.GetTemplate(String name) at NVelocity.Runtime.RuntimeSingleton.GetTemplate(String name) at NVelocity.App.Velocity.GetTemplate(String name) at CounterSoft.Gemini.Business.MailPlugin.MakeTemplateNVelocity(IssueEventArgs args, String templateFile)  
or
DEBUG 1/24/2008 5:15:47 PM   Error encountered processing template file: text/IssueResolved.vm

Object reference not set to an instance of an object. 1/24/2008 5:15:47 PM SOURCE: NVelocity TARGETSITE: Int32 IndexOf(System.Object) STACKTRACE: at Commons.Collections.LRUMap.IndexOf(Object key) at Commons.Collections.LRUMap.MoveToMRU(Object key) at Commons.Collections.LRUMap.get
Item(Object key) at Commons.Collections.LRUMap.SyncLRUMap.getItem(Object key) at NVelocity.Runtime.Resource.ResourceCacheImpl.get(Object key) at NVelocity.Runtime.Resource.ResourceManagerImpl.GetResource(String resourceName, ResourceType resourceType, String encoding) at NVelocity.Runtime.RuntimeInstance.GetTemplate(String name, String encoding) at NVelocity.Runtime.RuntimeInstance.GetTemplate(String name) at NVelocity.Runtime.RuntimeSingleton.GetTemplate(String name) at NVelocity.App.Velocity.GetTemplate(String name) at CounterSoft.Gemini.Business.MailPlugin.MakeTemplateNVelocity(IssueEventArgs args, String templateFile)
When this happens, we get an email notification of an issue comment, status change, or creation -- but the subject is blank, or the body is blank.

Restarting the IIS service resolves the issue for a few hours, but on busy days the blank emails resume in as little as 2 hours since the last service-restart.  That's unreasonable, as each restart affects the other concurrent users of the system.

Restarting the IIS service on our Gemini server has no effect on the actual smtp service in use -- because the emails are all sent through a separate server on the network with its own instance of smtp running -- so the problem is a Gemini issue, not an smtp issue.

What could cause the blank email or blank subject email problems, and the other errors associated with them?

We're running version 2.2.3, using the MailPlugin option (not the Scheduler).
There are no Event Log errors or information entries around the same times as the errors.

We have no problem sending email through our email server from other applications on the Gemini server, or any problems with any other servers sending through our main smtp service.

I've searched this forum for clues, but have only found "restart your server" or "upgrade to 2.2" as answers.  Well, I'm on 2.2.3 already, and it's not fixed, and as I described above, restarting as often as appears necessary isn't practical.

Help is appreciated.

JBroome
· 1
JBroome
Replies (6)
helpful
0
not helpful

The reason for asking users to upgrade to 2.2 is because of the scheduler. Any reasons why you are not using it?


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

Hi Saar, thanks for the reply.

We haven't used the scheduler because we were only slightly interested in creating issues from pop3 emails - and since the built-in mail plugin took care of sending, and scheduler didn't offer functionality we really needed on top of that, we didn't give it much thought.

Are there other advantages to using Scheduler over the mailplugin?


JBroome
· 1
JBroome
helpful
0
not helpful

The scheduler does include the POP3 email processor, but this is disabled by default.

The main advantage of using the scheduler is that you get batch of emais. ie. it runs every so often and send only 1 alert per issue. So if you update the issue twice in that timespan the scheduler will send one email with both changes.

The other advantage is that it is much more robust than the mail plugin.


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

Well, I gave it a shot, but the Scheduler doesn't run.  During startup of the service I get this error in the Application Log:

System.ApplicationException: WSE842: The service pipeline could not be created. ---> System.Configuration.ConfigurationErrorsException: WSE032: There was an error loading the microsoft.web.services3 configuration section. ---> System.Configuration.ConfigurationErrorsException: The entry 'UsernameToken' has already been added.
   at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult)
   at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject)
   at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
   at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
   at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
   at System.Configuration.BaseConfigurationRecord.GetSection(String configKey, Boolean getLkg, Boolean checkPermission)
   at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
   at System.Web.HttpContext.GetSection(String sectionName)
   at Microsoft.Web.Services3.Configuration.WebServicesConfiguration.getCurrent()
   --- End of inner exception stack trace ---
   at Microsoft.Web.Services3.Configuration.WebServicesConfiguration.get
Current()
   at Microsoft.Web.Services3.Configuration.WebServicesConfiguration.getMessagingConfiguration()
   at Microsoft.Web.Services3.WseProtocol.ModifyInitializedExtensions(PriorityGroup group, SoapExtension[] extensions)
   at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
   --- End of inner exception stack trace ---
So I went back to the MailPlugin setting, which worked again for several hours, then the next day went back to showing blank email bodies approx 11 hours after the previous IIS restart, and the Gemini Log contains this error combination (the first of many like it):
DEBUG 1/28/2008 2:50:15 PM   Error encountered processing template file: html/IssueCreate.vm

Object reference not set to an instance of an object. 1/28/2008 2:50:15 PM SOURCE: NVelocity TARGETSITE: Int32 IndexOf(System.Object) STACKTRACE: at Commons.Collections.LRUMap.IndexOf(Object key) at Commons.Collections.LRUMap.MoveToMRU(Object key) at Commons.Collections.LRUMap.get
Item(Object key) at Commons.Collections.LRUMap.SyncLRUMap.getItem(Object key) at NVelocity.Runtime.Resource.ResourceCacheImpl.get(Object key) at NVelocity.Runtime.Resource.ResourceManagerImpl.GetResource(String resourceName, ResourceType resourceType, String encoding) at NVelocity.Runtime.RuntimeInstance.GetTemplate(String name, String encoding) at NVelocity.Runtime.RuntimeInstance.GetTemplate(String name) at NVelocity.Runtime.RuntimeSingleton.GetTemplate(String name) at NVelocity.App.Velocity.GetTemplate(String name) at CounterSoft.Gemini.Business.MailPlugin.MakeTemplateNVelocity(IssueEventArgs args, String templateFile)

It would be far more valuable to me to learn why after months of normal operation this suddenly started happening every day, than to try switching my installed setup to use an alternate send method -- one that needs to be debugged before I can use it.

Thanks for your help.


JBroome
· 1
JBroome
helpful
0
not helpful

Hi,

To recap: MailPlugin was fine and then it started to behave erratically resulting in blank email body and/or subject.

If Gemini has not been upgraded then the question is what else has changed to cause this issue?

Are the files being virus scanned and thus not "available" sometimes during file access?
Are the files under "template\mail" affected by some other process somehow (e.g. DEFRAG).

Apologies for not giving you some more direct, practical advice/solution!



Harvey Kandola
· 212
Harvey Kandola
helpful
0
not helpful

To narrow down possible external sources of interference I've disabled virus checking for the time being.  There's no scheduled defrag or other process going on.
I double-checked permissions and the ASP.NET processes have all the rights needed to read that template-html directory mentioned in the debug messages.

I've also created a dedicated mailbox for the admin user and set the admin to receive updates on every possible trigger of an email - so that I've got a single mailbox I can check for all email activity on the system so I can see when emails start missing subjects/bodies etc and try to correlate them to event log entries, gemini log entries, time of day, etc.

Thanks for your help - I'll update when I've got more info (probably after the next occurence of missing email content)


JBroome
· 1
JBroome