Help with dashboard widget

View: New views
1 Messages — Rating Filter:   Alert me  

Help with dashboard widget

by Nathan Russell :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hi,

Wonder if anyone can help with something. I am trying to write a new dashboard widget. I’ve found a couple of pages on the web (http://cruisecontrol.sourceforge.net/widgets.html and http://www.nabble.com/Dashboard-PMD-widget...-td11127239.html), and looked up the source of the dashboard widgets as shipped with CC. Using these resources, I’ve written the following:

 

import net.sourceforge.cruisecontrol.dashboard.widgets.AbstractXslOutputWidget;

import net.sourceforge.cruisecontrol.dashboard.widgets.Widget;

 

public class VerifyIFPDashboardWidget extends AbstractXslOutputWidget implements Widget {

 

      public String getDisplayName() {

            return "Verify IFP Results";

      }

 

      public String getXslPath() {

            return "/webapps/cruisecontrol/xsl/verifyIFP.xsl";

      }

 

}

 

(instead of extending AbstractXslOutputWidget I have also tried writing my own ‘public Object getOutput(Map parameters)’ method. Both give the same result)

 

I’ve told CC about my new widget by adding it in dashboard-config.xml:

        <subtabs>

            <subtab class="net.sourceforge.cruisecontrol.dashboard.widgets.ErrorsAndWarningsMessagesWidget" />

            <subtab class="VerifyIFPDashboardWidget" />

        </subtabs>

 

I then restart CC. If I try to use dashboard with a browser, I see my list of projects; but then when I try to click on one (to see the screen with the tabs, and hopefully my new one), I get the following stack trace:

HTTP ERROR: 500

argument type mismatch

RequestURI=/dashboard/tab/build/detail/projectA

Caused by:

java.lang.IllegalArgumentException: argument type mismatch
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeExceptionHandler(MultiActionController.java:646)
        at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleException(MultiActionController.java:616)
        at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:451)
        at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:384)
        at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
        at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:858)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476)
        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:431)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
        at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
        at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
        at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:324)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
        at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:829)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
        at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)

Powered by Jetty://

(The same stack trace is in the CC log file)

 

 

What have I done wrong? Any ideas?

Cheers

 

Nathan

 


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Cruisecontrol-user mailing list
Cruisecontrol-user@...
https://lists.sourceforge.net/lists/listinfo/cruisecontrol-user