Help with dashboard widget
"Nathan Russell" <[email protected]>
| Newsgroups | gmane.comp.java.cruise-control.user |
|---|---|
| Message-ID | <6E80CFEBE068F44BAD79EB89CA1FD59101762E21@edgemail01.uk.edgeipk.com> |
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.ErrorsAndWarnings
MessagesWidget" />
<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.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.springframework.web.servlet.mvc.multiaction.MultiActionController.in
vokeExceptionHandler(MultiActionController.java:646)
at
org.springframework.web.servlet.mvc.multiaction.MultiActionController.ha
ndleException(MultiActionController.java:616)
at
org.springframework.web.servlet.mvc.multiaction.MultiActionController.in
vokeNamedMethod(MultiActionController.java:451)
at
org.springframework.web.servlet.mvc.multiaction.MultiActionController.ha
ndleRequestInternal(MultiActionController.java:384)
at
org.springframework.web.servlet.mvc.AbstractController.handleRequest(Abs
tractController.java:153)
at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handl
e(SimpleControllerHandlerAdapter.java:48)
at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherS
ervlet.java:858)
at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherSe
rvlet.java:792)
at
org.springframework.web.servlet.FrameworkServlet.processRequest(Framewor
kServlet.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:2
16)
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(ContextHandler
Collection.java:206)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.jav
a: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(HttpConne
ction.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:// <http://jetty.mortbay.org/>
(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
[email protected]
https://lists.sourceforge.net/lists/listinfo/cruisecontrol-user