Google Groups Home
Help | Sign in
Message from discussion Custom dashboard plugins not loading
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
trey  
View profile
 More options Apr 18 2008, 11:26 am
From: trey <t...@bytemellc.com>
Date: Fri, 18 Apr 2008 08:26:06 -0700 (PDT)
Local: Fri, Apr 18 2008 11:26 am
Subject: Custom dashboard plugins not loading
I originally posted this message on the users mailing list, and was
directed to post it here. Original message follows:
---------------------

I've developed a custom web dashboard plugin, as per the details
listed here: http://confluence.public.thoughtworks.org/display/CCNET/Developing+We...

I'm using ccnet-1.2.1.

I've been working on a project plugin, and I define the plugin in the
dashboard's config file like so:
<projectPlugins>
 ...
  <propertiesPlugin />
</projectPlugins>

Where my custom plugin is named "propertiesPlugin".

When I include this xml element definition, I receive a
NullReferenceException being reported from the asp.net app through the
web browser. If I omit the declaration, the dashboard works as
expected, but without the benefit of my plugin(obviously).

I downloaded the source for 1.2.1, and I found the problem. The
SetupObjectSourceForRequest method of the
CruiseObjectSourceInitializer object(in the dashboard project) is
looping through all of the
named actions in the plugin, via the following line of code:
foreach (INamedAction action in plugin.NamedActions)

However, the plugin object is null. Upon further inspection, it
appears that the plugins collection has the correct number of
elements, but the last element is null. I traced code execution back
into the Load method of the DashboardConfigurationLoader class. The
line of code in this method that seems to be the root cause is as
follows:
typeTable.Add(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Locatio n),
"ccnet.*.plugin.dll");

It appears that the type table is attempting to load all of the types
decorated with the ReflectorType attribute from all ccnet.*.plugin.dll
assemblies, located in the same folder as the executing assembly. That
makes sense; and is what I expected from the documentation.

However, Assembly.GetExecutingAssembly().Location does not return the
result that I was expecting. The result is some long path buried deep
somewhere in the windows temp folder. I assume that this is due to
asp.net's shadow copying.

So - the point? What's the solution? Can shadow-copying be disabled
only for the ccnet dashboard app? I rather think this behavior is a
defect, and would be difficult to reproduce within an nunit test
case.

Thoughts?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google