timomeinen / team-piazza

A build monitor for the TeamCity continuous integration server
GNU General Public License v3.0
17 stars 7 forks source link

Does not seem to work for teamcity 8.0.1 #43

Closed timomeinen closed 10 years ago

timomeinen commented 10 years ago

From sasha.c...@gmail.com on July 09, 2013 08:10:09

Accessing a project team piazza build monitor page after upgrading to TeamCity 8.0.1 results in:

HTTP Status 404 - no project with id Trunk

type Status report

message no project with id Trunk

description The requested resource is not available. Apache Tomcat/7.0.37

Using piazza-201210121702

Original issue: http://code.google.com/p/team-piazza/issues/detail?id=44

timomeinen commented 10 years ago

From richards...@gmail.com on July 24, 2013 04:03:43

I am finding the exact same issue in TeamCity 8.0.2 also.

timomeinen commented 10 years ago

From 3dcreato...@gmail.com on August 08, 2013 01:41:39

Same here. Some more details: Links, that contain projectId do not work, example:

/piazza.html?projectId=testProject&featureBranchBuildsOnly=true But links, that contain build configuration id do work, for example: /piazza.html?buildTypeId=bt4&featureBranchBuildsOnly=false I investigated a little bit deeper and found that if you will go to link like: /configurePiazzaProject.html?projectId=testProject you will get an error with stack trace: Trace: java.lang.NullPointerException at com.natpryce.piazza.projectConfiguration.ProjectConfigurationController.updateConfiguration(ProjectConfigurationController.java:66) at com.natpryce.piazza.projectConfiguration.ProjectConfigurationController.doHandle(ProjectConfigurationController.java:59) at jetbrains.buildServer.controllers.BaseController.handleRequestInternal(BaseController.java:73) 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:790) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549) at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at jetbrains.buildServer.maintenance.TeamCityDispatcherServlet.service(TeamCityDispatcherServlet.java:33) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at jetbrains.buildServer.web.ParametersProviderCalculationContextFilter.doFilter(ParametersProviderCalculationContextFilter.java:5) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at jetbrains.buildServer.web.DisableSessionIdFromUrlFilter.doFilter(DisableSessionIdFromUrlFilter.java:9) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at jetbrains.buildServer.web.DiagnosticFilter.doFilter(DiagnosticFilter.java:43) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at jetbrains.buildServer.web.ResponseFragmentFilter.doFilter(ResponseFragmentFilter.java:13) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Corresponding part of code is: private void updateConfiguration(HttpServletRequest request) { try { SProject project = this.projectManager.findProjectById(getProjectId(request)); project.persist(); addSuccessMessage(request); } catch (PiazzaConfiguration.SaveConfigFailedException e) { Loggers.SERVER.error(e); addPiazzaMessage(request, "Save failed: " + e.getLocalizedMessage()); } } project.persist() fails. Most probably because project is null. Is it null because wrong ID was passed to manager or because some internal manager workings I can not say. Server data: TeamCity: 8.0 (build 27402) Operating system: Windows Server 2008 R2 (6.1, x86) Java: 1.7.0_21-b11 (Oracle Corporation) Servlet container: Apache Tomcat/7.0.37
timomeinen commented 10 years ago

From sergei.s...@gmail.com on September 11, 2013 00:32:49

Any news on this?

timomeinen commented 10 years ago

From ASPDevel...@gmail.com on September 12, 2013 01:36:51

I download the source to hunt for the issue, but have very limited Java knowledge and didn't get very far.

This should be a high priority issue - as this whole project is useless at present.

timomeinen commented 10 years ago

From richards...@gmail.com on September 12, 2013 01:50:01

I haven't looked at the code but I am pretty sure it has been broken because the older versions on TeamCity used an integer to denote a project id (for example) but they now use a string based on the project title as the id.

I would imagine that the code expected to see an integer but is passed a string instead.

timomeinen commented 10 years ago

From sergei.s...@gmail.com on September 12, 2013 13:49:57

Here's a patch working on TC 8.0.3

Attachment: team-piazza-tc-8-0-3.diff

timomeinen commented 10 years ago

From maveric...@gmail.com on September 13, 2013 05:53:52

Thanks for the patch Sergei, I've applied it to the source code. Unfortunately I've no experience in compiling a Java project and don't have the time to research how in the near future.

Is someone able to make the compiled project available?

I'd be most appreciative if they could :)

timomeinen commented 10 years ago

From sergei.s...@gmail.com on September 13, 2013 05:59:33

Here is the zip built from the patch.

I've built it with IntelliJ IDEA using the 'all' Ant task. Just open the project in IDEA and change build.properties file like so:

path.variable.teamcitydistribution=/Users/me/bin/TeamCity # This is where I put TC idea.home=/Applications/IntelliJ IDEA 12 CE.app # This is where I have IDEA's annotations.jar

Attachment: piazza-201309121704.zip

timomeinen commented 10 years ago

From maveric...@gmail.com on September 18, 2013 06:49:25

Verified as working.

Thanks Sergei, me and the development team here thank you :)

timomeinen commented 10 years ago

From sergei.s...@gmail.com on September 18, 2013 07:09:41

No problem, I learned something in the process :)

Can someone apply the patch and publish an official release in downloads?

timomeinen commented 10 years ago

From tanneeru...@gmail.com on October 14, 2013 08:30:07

Thanks Sergei, you saved a lot of my time.

timomeinen commented 10 years ago

From tanneeru...@gmail.com on October 18, 2013 01:23:15

hi guys, also "Read user from commit metadata" feature is not working[user name not displayed] in this version did any one had any workaround for this?

thanks in advance

timomeinen commented 10 years ago

From timomeinen on October 18, 2013 07:05:50

Hi,

sorry for being absent from the project. I can confirm, that the plugin does not work for TC8. Thank you very much for the patch. We will integrate it in the next release.

Status: Accepted
Owner: timomeinen
Labels: -Priority-Medium Priority-Critical TC8

timomeinen commented 10 years ago

From timomeinen on October 19, 2013 13:06:33

Status: Started

timomeinen commented 10 years ago

From timomeinen on October 19, 2013 13:40:33

TeamCity 8 uses a whole new system of project ID generation. As Team-Piazza relies on the ID to determine which project to show in the summary tab, our plugin was broken. The plugin is now compatible with TC8, however, as you have any problems regarding the project IDs, please reopen the issue. Thank you for your help.

Status: Fixed
Labels: -TC8 TeamCity8