anubhav94 / team-piazza

Automatically exported from code.google.com/p/team-piazza
GNU General Public License v3.0
0 stars 0 forks source link

Does not seem to work for teamcity 8.0.1 #44

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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 reported on code.google.com by sasha.c...@gmail.com on 9 Jul 2013 at 6:10

GoogleCodeExporter commented 9 years ago
I am finding the exact same issue in TeamCity 8.0.2 also.

Original comment by richards...@gmail.com on 24 Jul 2013 at 11:03

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Same here. Some more details:
Links, that contain projectId do not work, example:
<TCRoot>/piazza.html?projectId=testProject&featureBranchBuildsOnly=true 

But links, that contain build configuration id do work, for example:
<TCRoot>/piazza.html?buildTypeId=bt4&featureBranchBuildsOnly=false 

I investigated a little bit deeper and found that if you will go to link like:
<TCRoot>/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 

Original comment by 3dcreato...@gmail.com on 8 Aug 2013 at 8:41

GoogleCodeExporter commented 9 years ago
Any news on this?

Original comment by sergei.s...@gmail.com on 11 Sep 2013 at 7:32

GoogleCodeExporter commented 9 years ago
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.

Original comment by ASPDevel...@gmail.com on 12 Sep 2013 at 8:36

GoogleCodeExporter commented 9 years ago
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.

Original comment by richards...@gmail.com on 12 Sep 2013 at 8:50

GoogleCodeExporter commented 9 years ago
Here's a patch working on TC 8.0.3

Original comment by sergei.s...@gmail.com on 12 Sep 2013 at 8:49

Attachments:

GoogleCodeExporter commented 9 years ago
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 :)

Original comment by maveric...@gmail.com on 13 Sep 2013 at 12:53

GoogleCodeExporter commented 9 years ago
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

Original comment by sergei.s...@gmail.com on 13 Sep 2013 at 12:59

Attachments:

GoogleCodeExporter commented 9 years ago
Verified as working.

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

Original comment by maveric...@gmail.com on 18 Sep 2013 at 1:49

GoogleCodeExporter commented 9 years ago
No problem, I learned something in the process :)

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

Original comment by sergei.s...@gmail.com on 18 Sep 2013 at 2:09

GoogleCodeExporter commented 9 years ago
Thanks Sergei, you saved a lot of my time. 

Original comment by tanneeru...@gmail.com on 14 Oct 2013 at 3:30

GoogleCodeExporter commented 9 years ago
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

Original comment by tanneeru...@gmail.com on 18 Oct 2013 at 8:23

GoogleCodeExporter commented 9 years ago
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.

Original comment by timomeinen on 18 Oct 2013 at 2:05

GoogleCodeExporter commented 9 years ago

Original comment by timomeinen on 19 Oct 2013 at 8:06

GoogleCodeExporter commented 9 years ago
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.

Original comment by timomeinen on 19 Oct 2013 at 8:40