Bean build not found within scope


I've been trying to create a custom tab for the build results. I want to access some of the build's details and parameters. After looking in buildDetails.jsp from my local TeamCity installation I tried the following in my tab's JSP page.

<jsp:useBean id="build" type="jetbrains.buildServer.serverSide.SBuild" scope="request" />

But at runtime I get the following exception:
ERROR -   jetbrains.buildServer.SERVER - Error java.lang.InstantiationException: bean build not found within scope while processing request: GET '/buildLog/viewLog.jsp?buildTypeId=Abc_Abc&buildId=1&tab=redGateTeamCityBuildUtilitiesTab', from client, authenticated as david, original page URL: /viewLog.html?buildTypeId=Abc_Abc&buildId=1&tab=redGateTeamCityBuildUtilitiesTab
java.lang.InstantiationException: bean build not found within scope

How can I best get access to information about the build from my JSP?

I would like to access the name of the build agent and the checkout directory.

Any help much appreciated!


Comment actions Permalink

Hi David,

Try adding the bean inside fillModel method of your extension.
Also, if you extend BuildTab, "build" should be present in JSP model.

Comment actions Permalink

Thanks for you reply. I was about to post a solution.

Your colleague Maxim replied to an e-mail I sent and suggested I change the bean id to "buildData". This seems to have fixed my issue.

Thank you everyone. :-)



Please sign in to leave a comment.