JDK-8176260 : Build of the project breaks on one host; but succeeds on other
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 8
  • Priority: P4
  • Status: Resolved
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2017-03-06
  • Updated: 2017-03-15
  • Resolved: 2017-03-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9Resolved
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
Windows host:
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

Linux hosts (both):
java version "1.8.0_112"
Java(TM) SE Runtime Environment (build 1.8.0_112-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.112-b15, mixed mode)



ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601] - breaks with compilation error
Linux host1 4.9.0-0 #1 SMP Mon Dec 12 17:21:01 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux - breaks with compilation error
Linux host2 4.9.0-0 #1 SMP Mon Dec 12 17:21:01 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux - builds ok, no errors

EXTRA RELEVANT SYSTEM CONFIGURATION :
Two Linux hosts with same OS version, but different build behaviour. On one host build is ok, on another - build breaks.
Windows host - behaviour is broken build.

A DESCRIPTION OF THE PROBLEM :
The project containing around ten java files grouped into several packages builds well on one host, but fails to build on others. 
I guess that the build fail somehow is the consequence of using the static import with wildcard.
I was able to reduce the test project to the ten source files minimum.
When I try to rename the classes or cut out ones, the build error disappears.
I guess it could be the unique combination of folder and/or file names which leads to this problem.
On pair with static import instruction, it leads to the build error.



STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Just try to build the source code. For this project, build is run by gradle.
command is just
./gradlew build

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Build succeeds.
It happens to be true on one host. On others it fails.
ACTUAL -
Build fails on some hosts.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
/home/user/git-src/compileErr/src/main/java/ru/yandex/market/markup/tasks/fill_params/FillParamsTaskProcessorsFactory.java:19: error: cannot find symbol
        extends TaskGenerator {
                ^
  symbol:   class TaskGenerator
  location: class FillParamsTaskProcessorsFactory

/home/user/git-src/compileErr/src/main/java/ru/yandex/market/markup/tasks/fill_params/FillParamsTaskProcessorsFactory.java:25: error: method does not override or implement a method from a supertype
        @Override
        ^


REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
I find it not very useful to copy ten source .java files into this text area.
I think it is more convenient to attach the whole project.
If the problem is of any interest, I can upload archive to this or some other site.
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
Replace line containing wildcard

import static ru.compan.market.markup.tasks.fill_params.FillParamsTaskProcessorsFactory.*;

with the full names of classes required to import


Comments
No longer reproducible in 9, presumably fixed together with JDK-7101822.
15-03-2017

A simplified reproducible test case that should work on any machine. To reproduce: 1. unpack 2. cd into "JDK-8176260" 3. fill the location to your JDK in "run.sh", variable TEST_JAVA_HOME 4. run "run.sh"
15-03-2017

Issue is reproducible with attached test case, As project is not executable on 9 and hence could not validate the same. =Result on 8u121== Compiling with JDK Java compiler API. /home/fairoz/work/Issues/8176260/src/main/java/ru/compan/market/markup/tasks/fill_params/FillParamsTaskProcessorsFactory.java:48: error: cannot find symbol public class FillParamsQualityHandler extends ResponseHandler { ^ symbol: class ResponseHandler location: class FillParamsTaskProcessorsFactory /home/fairoz/work/Issues/8176260/src/main/java/ru/compan/market/markup/tasks/fill_params/FillParamsTaskProcessorsFactory.java:35: error: cannot find symbol public class FillParamsResponseHandler extends ResponseProcessorComposite { ^ symbol: class ResponseProcessorComposite location: class FillParamsTaskProcessorsFactory /home/fairoz/work/Issues/8176260/src/main/java/ru/compan/market/markup/tasks/fill_params/FillParamsTaskProcessorsFactory.java:19: error: cannot find symbol extends TaskGenerator { ^ symbol: class TaskGenerator location: class FillParamsTaskProcessorsFactory /home/fairoz/work/Issues/8176260/src/main/java/ru/compan/market/markup/tasks/fill_params/FillParamsTaskProcessorsFactory.java:25: error: method does not override or implement a method from a supertype @Override ^ /home/fairoz/work/Issues/8176260/src/main/java/ru/compan/market/markup/tasks/fill_params/FillParamsTaskProcessorsFactory.java:30: error: method does not override or implement a method from a supertype @Override ^ /home/fairoz/work/Issues/8176260/src/main/java/ru/compan/market/markup/tasks/fill_params/FillParamsTaskProcessorsFactory.java:41: error: method does not override or implement a method from a supertype @Override ^ 6 errors :compileJava FAILED :compileJava (Thread[Daemon worker,5,main]) completed. Took 1.474 secs. FAILURE: Build failed with an exception. ==
13-03-2017

Contacting submitter to get the source files required for reproducing the issue == Could you please send the project files as attachment to this mail? ==
07-03-2017