Exception(s) During CCNet Continuous Integration Build

If you are having a problem using Fortress, post a message here.

Moderator: SourceGear

Post Reply
obrion
Posts: 18
Joined: Thu Jul 01, 2004 7:48 am

Exception(s) During CCNet Continuous Integration Build

Post by obrion » Fri Aug 01, 2008 8:56 am

I have a couple builds set up now using Fortress as the source code repository and they are mostly working. The complete build that uses NAnt works flawlessly! However, I also have a Continuous Integration build set up and uses the CruiseControl.NET Fortress plugin in order to get the modified files out of Fortress then uses the <devenv> task to build the project. The CruiseControl.NET dashboard displays an exception, seemingly while Fortress is checking for modifications, however, when looking at the server log it looks mostly fine except for one that that logs "Integration complete: Exception - 8/1/2008 10:17:27 AM". The e-mail sent out when the build completes also indicates an exception occurred. These exceptions are new since I migrated to Fortress from SourceSafe, so I suspect it might be related somehow. Maybe I am missing some setup or configuration somewhere?

Following is the exception displayed on the dashboard:

Exception calling NVelocity for template: ProjectGrid.vm Template path is C:\Program Files\CruiseControl.NET\webdashboard\templates

Exception Full Details
ThoughtWorks.CruiseControl.Core.CruiseControlException: Exception calling NVelocity for template: ProjectGrid.vm Template path is C:\Program Files\CruiseControl.NET\webdashboard\templates ---> NVelocity.Exception.MethodInvocationException: Invocation of method 'BuildStage' in ThoughtWorks.CruiseControl.WebDashboard.Dashboard.ProjectGridRow, template ProjectGrid.vm Line 101 Column 26 threw an exception ---> System.NullReferenceException: Object reference not set to an instance of an object. at ThoughtWorks.CruiseControl.WebDashboard.Dashboard.ProjectGridRow.get_BuildStage() --- End of inner exception stack trace --- at NVelocity.Runtime.Parser.Node.ASTIdentifier.Execute(Object o, IInternalContextAdapter context) at NVelocity.Runtime.Parser.Node.ASTReference.Execute(Object o, IInternalContextAdapter context) at NVelocity.Runtime.Parser.Node.ASTReference.Value(IInternalContextAdapter context) at NVelocity.Runtime.Parser.Node.ASTGTNode.Evaluate(IInternalContextAdapter context) at NVelocity.Runtime.Parser.Node.ASTExpression.Evaluate(IInternalContextAdapter context) at NVelocity.Runtime.Parser.Node.ASTIfStatement.Render(IInternalContextAdapter context, TextWriter writer) at NVelocity.Runtime.Parser.Node.ASTBlock.Render(IInternalContextAdapter context, TextWriter writer) at NVelocity.Runtime.Directive.Foreach.Render(IInternalContextAdapter context, TextWriter writer, INode node) at NVelocity.Runtime.Parser.Node.ASTDirective.Render(IInternalContextAdapter context, TextWriter writer) at NVelocity.Runtime.Parser.Node.ASTBlock.Render(IInternalContextAdapter context, TextWriter writer) at NVelocity.Runtime.Parser.Node.ASTIfStatement.Render(IInternalContextAdapter context, TextWriter writer) at NVelocity.Runtime.Parser.Node.SimpleNode.Render(IInternalContextAdapter context, TextWriter writer) at NVelocity.Template.Merge(IContext context, TextWriter writer) at NVelocity.App.VelocityEngine.MergeTemplate(String templateName, String encoding, IContext context, TextWriter writer) at ThoughtWorks.CruiseControl.WebDashboard.MVC.View.LazilyInitialisingVelocityTransformer.Transform(String transformerFileName, Hashtable transformable) --- End of inner exception stack trace --- at ThoughtWorks.CruiseControl.WebDashboard.MVC.View.LazilyInitialisingVelocityTransformer.Transform(String transformerFileName, Hashtable transformable) at ThoughtWorks.CruiseControl.WebDashboard.MVC.View.VelocityViewGeneratorWithTransformer.GenerateView(String templateName, Hashtable velocityContext) at ThoughtWorks.CruiseControl.WebDashboard.Dashboard.VelocityProjectGridAction.GenerateView(ProjectStatusListAndExceptions projectStatusListAndExceptions, String actionName, IRequest request, IServerSpecifier serverSpecifier) at ThoughtWorks.CruiseControl.WebDashboard.Dashboard.VelocityProjectGridAction.Execute(String actionName, IServerSpecifier serverSpecifier, IRequest request) at ThoughtWorks.CruiseControl.WebDashboard.Plugins.ServerReport.ServerReportServerPlugin.Execute(ICruiseRequest request) at ThoughtWorks.CruiseControl.WebDashboard.MVC.Cruise.ServerCheckingProxyAction.Execute(ICruiseRequest cruiseRequest) at ThoughtWorks.CruiseControl.WebDashboard.MVC.Cruise.CruiseActionProxyAction.Execute(IRequest request) at ThoughtWorks.CruiseControl.WebDashboard.MVC.Cruise.ExceptionCatchingActionProxy.Execute(IRequest request)


And following is the exception sent in the e-mail at the conclusion of the build:

System.InvalidOperationException: There was an error generating the XML document. ---> System.InvalidOperationException: The type ThoughtWorks.CruiseControl.Core.FortressModification was not expected. Use the XmlInclude or SoapInclude attribute to specify types that are not known statically.
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterModificationArray.Write2_Modification(String n, String ns, Modification o, Boolean isNullable, Boolean needType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterModificationArray.Write3_ArrayOfModification(Object o)
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)
at System.Xml.Serialization.XmlSerializer.Serialize(TextWriter textWriter, Object o)
at ThoughtWorks.CruiseControl.Core.Tasks.ModificationWriterTask.Run(IIntegrationResult result)
at ThoughtWorks.CruiseControl.Core.Project.RunTasks(IIntegrationResult result, IList tasksToRun)
at ThoughtWorks.CruiseControl.Core.Project.Run(IIntegrationResult result)
at ThoughtWorks.CruiseControl.Core.IntegrationRunner.Build(IIntegrationResult result)


Any suggestions for how I could go about figuring out what is amiss?

Thanks again for all the great support!

Robert O'Brion
AT&T

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Exception(s) During CCNet Continuous Integration Build

Post by Beth » Fri Aug 01, 2008 10:08 am

What I'm focusing on in that error is "Object reference not set to an instance of an object." Can you check your Fortress server log around the same time that you received that and see if any error was logged? If so, what was it?

Next, can you use the Fortress GUI client on the build machine and manually perform a Get out to a different location? Did you receive any errors during that? Can the files retrieved in that Get be built?

If the Get you just performed can be built, then try using the GUI again to Get to the same location that your regular build occurs at. Did you receive any errors during that Get? Can the files retrieved in that Get be built?

If any of these cases cause a problem, then lets leave CCNet out of the equation until we can make the GUI client work.
Beth Kieler
SourceGear Technical Support

obrion
Posts: 18
Joined: Thu Jul 01, 2004 7:48 am

Re: Exception(s) During CCNet Continuous Integration Build

Post by obrion » Fri Aug 01, 2008 11:54 am

I checked the server log and did not seeing anything. I then enabled Debug logging on the Fortress server and tried again. By refreshing the CCNet dashboard page, I saw the job start checking for modifications, then the exception started being displayed. I checked the server log and there was no indication on the Fortress server of any exception. After the Fortress task was complete, the exception went away and the devenv build task started and then completed successfully.

I tried getting the source on the Build Server using the Fortress Client into a new directory. That worked.

I then tried getting the source using the Fortress client into the directory used for the build. The default is attempt automatic merge so I used that. It worked.

I then tried again using Overwrite instead of automatic merge. That worked as well.

I note that the exception references NVelocity. I have never installed that. Is that a pre-requisite for using the Fortress plug-in with CruiseControl.NET?

Robert

shannon

Re: Exception(s) During CCNet Continuous Integration Build

Post by shannon » Sun Aug 03, 2008 7:28 pm

Are you using modificationWriter?

obrion
Posts: 18
Joined: Thu Jul 01, 2004 7:48 am

Re: Exception(s) During CCNet Continuous Integration Build

Post by obrion » Mon Aug 04, 2008 6:35 am

I am. I wanted to get the modifications from the previous build included in the e-mail sent when the build completes.

I just took it out for now, and the exception seems to have gone away with the one build I forced. Will see what happens with the next build invoked due to a file checkin.

Is there some pre-requisite that must be used along with Fortress and the modificationWriter in order for this to work?

Thanks again,

Robert

shannon

Re: Exception(s) During CCNet Continuous Integration Build

Post by shannon » Mon Aug 04, 2008 6:39 am

No, we found a problem with our new plugin and the modification writer a few weeks ago. We've been looking into solutions.

obrion
Posts: 18
Joined: Thu Jul 01, 2004 7:48 am

Re: Exception(s) During CCNet Continuous Integration Build

Post by obrion » Mon Aug 04, 2008 6:57 am

Ah! Good to know.

Also, turns out I misunderstood what the modificationWriter did, specifically. It seems it actually writes the modifications to an XML file that could be used by an external program, such as a NAnt script. Even without this included, the e-mail sent includes the modifications from the previous build. So in my case, I do not actually need to use it. And I triggered an automatic build by checking in a file, and that build worked fine as well without the modificationWriter task. I am going to leave it out for now as I do not really need the mods in an external file at this time.

Thanks again for all your help!

Robert

shannon

Re: Exception(s) During CCNet Continuous Integration Build

Post by shannon » Mon Aug 04, 2008 6:58 am

You're welcome. Glad I could help clear that up.

shannon

Re: Exception(s) During CCNet Continuous Integration Build

Post by shannon » Mon Aug 04, 2008 7:02 am

You might want to have a look at the email publisher: http://confluence.public.thoughtworks.o ... +Publisher

That's what we use. If you set includeDetails to True, it might give you the emails you're looking for.

josullivan
Posts: 4
Joined: Wed Oct 22, 2008 8:02 am

Re: Exception(s) During CCNet Continuous Integration Build

Post by josullivan » Tue Mar 24, 2009 11:59 am

Did you find a solution to the issue with the fortressplugin and modificationWriter? I was looking into it so that I could process the output within my build script to determine the work items associated with a specific set of modifications.

Thanks

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Exception(s) During CCNet Continuous Integration Build

Post by Beth » Wed Apr 01, 2009 3:05 pm

I looked up what was logged on that and it's still an open item. We have a lot of items ahead of it right now.
Beth Kieler
SourceGear Technical Support

Post Reply