• Welcome, guest

  • Login

  •  

Type:
Bug
Priority:
Critical Critical  
State:
Fixed
Subsystem:
Server Web
Reporter:
Petr Panuska (pepan) Send Email
Assignee:
Olesya Smirnova (lesya) Send Email
Affects:
Agra EAP (4073)
Fixed in:
TeamCity 2.0 Agra (4111)
Created:
17 months ago (05 Apr 2007 17:13)
Updated:
16 months ago (11 Apr 2007 18:47)
Votes:
0
Resolved:
JIRA source:
TW-2296
Duplications.jpg
Duplications.jpg (203 kb)
logs.zip (3263 kb)
Issue has no links

Duplication can't be seen neither in web UI nor in Idea (the IPR project file is not stored in root of the project).


It behaves very like in http://www.jetbrains.net/jira/browse/TW-2191 but no text ' Unable to find build-project/apollo2sc/file://C:/TeamCity/buildAgent/work/Server/Apollo2/registry/components/tornado_ui/src/com/systinet/platform/ui/document/EditDocument.java in VCS for build' is shown now (as it was shown in the build 4037). The bottom frames are just empty.
When clicking on the button to open in Idea, nothing happens (although it tries to run some javascript code).


When clicking on the 'Duplicates' tab in web, no source code is shown and this I found in the stdout_20070404.log file:


[2007-04-05 15:01:02,345] ERROR - .[localhost].[/].[buildServer] - Servlet.service() for servlet buildServer threw exception

java.lang.StringIndexOutOfBoundsException: String index out of range: 7433

    at java.lang.String.substring(Unknown Source)

    at jetbrains.buildServer.duplicator.DuplicatesTabTextController.doHandle(DuplicatesTabTextController.java:27)

    at jetbrains.buildServer.controllers.BaseController.handleRequestInternal(BaseController.java:11)

    at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)

    at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)

    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:723)

    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:663)

    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:394)

    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:358)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)

    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)

    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)

    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)

    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)

    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)

    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)

    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)

    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)

    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)

    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)

    at java.lang.Thread.run(Unknown Source)

[2007-04-05 15:01:02,376] ERROR - .[localhost].[/].[buildServer] - Servlet.service() for servlet buildServer threw exception
java.lang.StringIndexOutOfBoundsException: String index out of range: 9137

    at java.lang.String.substring(Unknown Source)

    at jetbrains.buildServer.duplicator.DuplicatesTabTextController.doHandle(DuplicatesTabTextController.java:27)

    at jetbrains.buildServer.controllers.BaseController.handleRequestInternal(BaseController.java:11)

    at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)

    at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)

    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:723)

    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:663)

    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:394)

    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:358)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)

    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)

    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)

    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)

    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)

    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)

    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)

    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)

    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)

    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)

    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)

    at java.lang.Thread.run(Unknown Source)



When clicking on the button to open it in Idea, only this text is shown in Mozzila bottom line:
Transfering data from 127.0.0.1...
But nothing happens (I'm not running TC locally!). I found nothing related to this issue In Idea logs. I tried it with Idea 6.0.4 and 6.0.5 and I found out that when I tried it on a computer where was Idea without installed TC plugin, the page responded - no running IDE was found (or something similar). If I installed the plugin (does not matter if I login or not in Idea), it did not write anything. In any case, no file was open in Idea, no file was shown in the web.


More info at http://www.intellij.net/forums/thread.jspa?messageID=5185461&#5185461


Environment: Win XP


Issue wasresolved

  • Anna Kozlova (anet) Send Email
    17 months ago (05 Apr 2007 17:36)

To investigate the problem we do need your .ipr file. If it is possible it would be greate to fetch duplicates.xml which is located in teamcity.temp directory during build.
Thank you.

  • Kirill Maximov (maxkir) Send Email
    17 months ago (05 Apr 2007 18:57)

Petr, please enable debug on server like described at
http://urltea.com/3g1
and attach content of teamcity-server.log file.

  • Petr Panuska (pepan) Send Email
    17 months ago (05 Apr 2007 21:38)

It contains logs, tmp directories and configuration files including the project.
Although everything is packed in one zip file, the included files were not fetched at the same time. The temp directory was taken during the process duplicate findings, other files were copied after the duplicate findings finished, I logged into TC and tried to look at UI at the duplicates (you can see the exception at TeamCity\logs\stdout_20070405.log file). Also I tried to click on the button to open them in Idea (nothing happened).
You can have a look at conf directory how did I setup log4j.
Enjoy it.

  • Kirill Maximov (maxkir) Send Email
    17 months ago (05 Apr 2007 22:21)

Petr, could you please let us know the following:
1. Does open in IDE works from Duplicates interface for IDEA? Does it work correctly?
2. What VCS settings do you use? If you use SVN, do you use externals?
3. How path to file you're trying to open looks like?
4. What is the size of the file you're trying to open. If there were modifications in this file since duplicates runner run?

  • Petr Panuska (pepan) Send Email
    17 months ago (06 Apr 2007 11:06)

1. Does open in IDE works from Duplicates interface for IDEA? Does it work correctly?
- no it does not work properly. It does not open anything. I have never seen any results of duplicates findings, neither from Web, nor from Idea.
2. What VCS settings do you use? If you use SVN, do you use externals?
- we use CVS
3. How path to file you're trying to open looks like?
the first found duplicates contain these file paths (in top right frame):

#1 ../../registry/components/tornado_ui/src/com/systinet/platform/ui/document/EditDocument.java
#2 ../../registry/components/tornado_ui/src/com/systinet/platform/ui/integration/uddiimport/EditRegistry.java

the fifth one contains these file paths:
  1. 1 ../../registry/components/repository/src/com/systinet/platform/tools/xsl/Normalize.java
  2. 2 ../../registry/components/repository/src/com/systinet/platform/tools/xsl/Normalize.java
  3. 3 ../../registry/components/repository/src/com/systinet/platform/tools/xsl/Normalize.java


None of these files have changed for a week at least.
4. What is the size of the file you're trying to open. If there were modifications in this file since duplicates runner run?


EditDocument - 15591bytes, last change on 16/Mar/2007
EditRegistry - 25624 bytes, last change on 5/Mar/2007
Normalize - 19347 bytes, last change on 13/Dec/2005

  • Petr Panuska (pepan) Send Email
    17 months ago (06 Apr 2007 11:10)

This is what I see in web UI. When clicking on the button to open the file in Idea, nothing happens (see my commets above).

  • Kirill Maximov (maxkir) Send Email
    17 months ago (06 Apr 2007 12:36)

Petr,


 Have you managed to run other builds with these CVS roots? Did checkout operations work in TeamCity?
 What version of CVS server do you use?
 
 Could you possibly try to setup IPR-based build for your project? What are the results?


Kind regards,
KIR

  • Kirill Maximov (maxkir) Send Email
    17 months ago (06 Apr 2007 13:15)

Petr,


 Please change \ to / in path to ipr file of your project. That should help.
 Will be fixed in release.


KIR


  • Petr Panuska (pepan) Send Email
    17 months ago (06 Apr 2007 13:15)

Have you managed to run other builds with these CVS roots? Did checkout operations work in TeamCity?


I'm running the inspections (with all the issues I reported into jira or discussion forums - works fine, only in Eclipse I can't open the files directly from Web UI). Although it was not easy to setup, it works finally.
I also tried to compile the project (using IPR), but it failed (see http://www.jetbrains.net/jira/browse/TW-2225). The problem was not in CVS, though. For duplications, inspections, compilations I use IPR, CVS checkouts work fine, in duplications is problem with report, in compilation with classpath.


 What version of CVS server do you use?


We use cvs-1.11.17-9.systinet, which is cvs-1.11.17-9 patched with our code (to enable locks on branches).

 
 Could you possibly try to setup IPR-based build for your project? What are the results?


Also, whole the duplication process finishes fine. The only problem is when going through the report.


I was also thinking about the CVS setup... how is the file (that is to be shown in duplication) fetched from CVS? Which credentials TC uses to log in to the CVS (if I'm logged as a guest, I have no credentials). Can be this the problem? I did not find any settings of CVS at the user settings page (there is the name but no password field for CVS).

  • Kirill Maximov (maxkir) Send Email
    17 months ago (06 Apr 2007 15:08)

Petr,


   Please try the trick I mentioned in the last post.


KIR

  • Petr Panuska (pepan) Send Email
    17 months ago (06 Apr 2007 15:23)

Kirill, what you mean by changing the path?
Now, I have this path set in the 'Path to .ipr file' field: build-project/apollo2sc/apollo.ipr of the Duplicator Configuration.


You want me to change it into 'build-project\apollo2sc\apollo.ipr' ?

  • Kirill Maximov (maxkir) Send Email
    17 months ago (06 Apr 2007 15:35)

Uups. I thought you used other slashes in the ipr path. We've found a bug with slashes, but it looks not your case than.

  • Petr Panuska (pepan) Send Email
    17 months ago (06 Apr 2007 16:17)

Kirill, I tried your suggestion and these are my findings:


when I use \ in the path, the bottom frames show the message: Unable to find...
whe I use / in the path, the bottom frames show nothing...


This is not that interesting but I found out also one more thing and I hope I did hit the nail on its head this time.


The project is created by many modules and some of these modules are checked out from CVS from the MAIN trunk and some of them from a branch. And actually, I CAN SEE some of these duplicate files (in web and in Idea) but only those that are checked out from the MAIN trunk! If the file is checked out from a branch, nothing appears...


So for files stored in main trunk it works fine apart from following:
1. the line numbers at web starts always at 1., 2. ... shouldn't be they rather the real line numbers where the duplication is located?
2. when the file is opened in Idea, it is not scrolled to the duplicate location but the cursor is rather at the beginning of the file...

  • Kirill Maximov (maxkir) Send Email
    17 months ago (06 Apr 2007 17:24)

Petr, really thanks for the investigation.
I believe we've fixed this bug and the fix will be available in the next release.

  • Petr Panuska (pepan) Send Email
    16 months ago (10 Apr 2007 12:49)

I'm afraid that this still does not work (at least at web ui). I installed new TC (build 4096), started duplication finder and this is the result. For files checked out from the main trunk, it works; for files checked out from a branch, no duplicate is shown (see the screenshot). The button for opening in Idea fortunatelly works, but it does not scroll to the real duplicate location. Since web ui does not shown the line number where the duplcation starts, it is not possible to locate duplications for long files.
I looked at the logs, but I found nothing interesting.

  • Kirill Maximov (maxkir) Send Email
    16 months ago (10 Apr 2007 13:23)

With regard to line number please watch http://www.jetbrains.net/jira/browse/TW-2321

  • Petr Panuska (pepan) Send Email
    16 months ago (11 Apr 2007 18:33)

I confirm that in build 4111 it finally works fine.

  • Olesya Smirnova (lesya) Send Email
    16 months ago (11 Apr 2007 18:47)

Thanks!

Old New
Petr Panuska (pepan) - 16 months ago (11 Apr 2007 18:47)

JetBrains Tracker revision #1044 [21-Aug-2008 11:26] (version #46) Copyright 2007-2008 JetBrains s.r.o.