Closed facundofarias closed 9 years ago
Hi @facundofarias,
I don't think we ever tested the build on OSX, could you try to rerun the command
./gradlew clean --debug --stacktrace
so we can extract more informations ?
Sure, here you have part of the output:
12:46:57.457 [INFO] [nl.javadude.gradle.plugins.license.LicensePlugin] Adding license extension
12:46:57.498 [INFO] [nl.javadude.gradle.plugins.license.LicensePlugin] Adding download licenses extension
12:46:57.516 [INFO] [nl.javadude.gradle.plugins.license.LicensePlugin] Adding license extension rule
12:46:57.584 [INFO] [org.gradle.api.Task] Applying defaults to download task: :downloadLicenses
12:46:58.097 [INFO] [nl.javadude.gradle.plugins.license.LicensePlugin] Adding license tasks for sourceSet licenseMain
12:46:58.160 [INFO] [org.gradle.api.Task] Applying license defaults to task: :licenseMain
12:46:58.186 [INFO] [org.gradle.api.Task] Applying license defaults to task: :licenseFormatMain
12:46:58.198 [INFO] [nl.javadude.gradle.plugins.license.LicensePlugin] Adding license tasks for sourceSet licenseTest
12:46:58.202 [INFO] [org.gradle.api.Task] Applying license defaults to task: :licenseTest
12:46:58.215 [INFO] [org.gradle.api.Task] Applying license defaults to task: :licenseFormatTest
12:46:58.868 [DEBUG] [org.gradle.testing.jacoco.plugins.JacocoPluginExtension_Decorated] Applying Jacoco to test
12:46:59.195 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on no_buildscript class cache for build file '/Users/devcyf/Repos/github/alf.io/build.gradle' (/Users/devcyf/.gradle/caches/2.2/scripts/build_6gb30n80lza8dw8rl472zraeb/ProjectScript/no_buildscript).
12:46:59.196 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
12:47:00.450 [DEBUG] [org.gradle.configuration.project.BuildScriptProcessor] Timing: Running the build script took 5.897 secs
12:47:00.480 [INFO] [org.gradle.api.Project] Configuring agent
12:47:00.483 [DEBUG] [org.gradle.api.Project] Agent: null
12:47:00.500 [ERROR] [org.gradle.BuildExceptionReporter]
12:47:00.503 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
12:47:00.504 [ERROR] [org.gradle.BuildExceptionReporter]
12:47:00.505 [ERROR] [org.gradle.BuildExceptionReporter] * Where:
12:47:00.505 [ERROR] [org.gradle.BuildExceptionReporter] Build file '/Users/devcyf/Repos/github/alf.io/build.gradle' line: 163
12:47:00.506 [ERROR] [org.gradle.BuildExceptionReporter]
12:47:00.506 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
12:47:00.507 [ERROR] [org.gradle.BuildExceptionReporter] A problem occurred evaluating root project 'alfio'.
12:47:00.507 [ERROR] [org.gradle.BuildExceptionReporter] > Could not find property 'java' on nl.javadude.gradle.plugins.license.LicenseExtension_Decorated@4e407261.
12:47:00.509 [ERROR] [org.gradle.BuildExceptionReporter]
12:47:00.509 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
12:47:00.511 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'alfio'.
12:47:00.512 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:54)
12:47:00.512 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:148)
12:47:00.513 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:39)
12:47:00.514 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:26)
12:47:00.515 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.java:34)
12:47:00.515 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:59)
12:47:00.517 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:504)
12:47:00.518 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:83)
12:47:00.518 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:42)
12:47:00.519 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:35)
12:47:00.520 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:129)
12:47:00.521 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106)
12:47:00.521 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86)
12:47:00.523 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:80)
12:47:00.524 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
12:47:00.525 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
12:47:00.526 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:36)
12:47:00.526 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
12:47:00.527 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:51)
12:47:00.528 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
12:47:00.528 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
12:47:00.529 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
12:47:00.530 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
12:47:00.530 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
12:47:00.531 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
12:47:00.532 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
12:47:00.532 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
12:47:00.547 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
12:47:00.548 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.Main.doAction(Main.java:33)
12:47:00.549 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
12:47:00.549 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
12:47:00.550 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
12:47:00.551 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
12:47:00.551 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
12:47:00.552 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)
12:47:00.553 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:56)
12:47:00.553 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: groovy.lang.MissingPropertyException: Could not find property 'java' on nl.javadude.gradle.plugins.license.LicenseExtension_Decorated@4e407261.
12:47:00.554 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractDynamicObject.propertyMissingException(AbstractDynamicObject.java:43)
12:47:00.555 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractDynamicObject.getProperty(AbstractDynamicObject.java:35)
12:47:00.555 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.CompositeDynamicObject.getProperty(CompositeDynamicObject.java:94)
12:47:00.556 [ERROR] [org.gradle.BuildExceptionReporter] at nl.javadude.gradle.plugins.license.LicenseExtension_Decorated.getProperty(Unknown Source)
12:47:00.557 [ERROR] [org.gradle.BuildExceptionReporter] at build_6gb30n80lza8dw8rl472zraeb$_run_closure10.doCall(/Users/devcyf/Repos/github/alf.io/build.gradle:163)
12:47:00.558 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:63)
12:47:00.559 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.ExtensionsStorage$ExtensionHolder.configure(ExtensionsStorage.java:145)
12:47:00.559 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.ExtensionsStorage.configureExtension(ExtensionsStorage.java:69)
12:47:00.560 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultConvention$ExtensionsDynamicObject.invokeMethod(DefaultConvention.java:207)
12:47:00.561 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:147)
12:47:00.561 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.groovy.scripts.BasicScript.methodMissing(BasicScript.java:79)
12:47:00.562 [ERROR] [org.gradle.BuildExceptionReporter] at build_6gb30n80lza8dw8rl472zraeb.run(/Users/devcyf/Repos/github/alf.io/build.gradle:155)
12:47:00.563 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:52)
12:47:00.564 [ERROR] [org.gradle.BuildExceptionReporter] ... 35 more
12:47:00.565 [ERROR] [org.gradle.BuildExceptionReporter]
12:47:00.565 [LIFECYCLE] [org.gradle.BuildResultLogger]
12:47:00.566 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
12:47:00.567 [LIFECYCLE] [org.gradle.BuildResultLogger]
12:47:00.568 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 8.81 secs
12:47:00.571 [DEBUG] [org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonManager] Stopping 0 compiler daemon(s).
12:47:00.571 [INFO] [org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonManager] Stopped 0 compiler daemon(s).
Not sure if it is something on my environment :/
Hi @facundofarias, thank you for pointing it out.
yes, there is something wrong with your environment. The build process is complaining because it cannot find the java.time.Year, which have been added since Java 8. Actually, alf.io requires java8 to build and run. Can you retry after installing the latest version?
In the meantime, I'll modify the readme in order to state the minimum java version
Alright, so I haven't seen the properties before (sourceCompatibility=1.8 / targetCompatibility=1.8). Maybe we can add this to the docs? I will try to do it with Java8. Thanks!
Alright, so I managed to install Java 8, and tried again. Now I am getting a different issue:
:compileJava
/Users/facundofarias/Repos/github/alf.io/src/main/java/alfio/manager/FileUploadManager.java:70: error: reference to query is ambiguous
jdbc.query(repository.fileContent(id), param, rs -> {
^
both method <T>query(String,SqlParameterSource,ResultSetExtractor<T>) in NamedParameterJdbcTemplate and method query(String,SqlParameterSource,RowCallbackHandler) in NamedParameterJdbcTemplate match
where T is a type-variable:
T extends Object declared in method <T>query(String,SqlParameterSource,ResultSetExtractor<T>)
/Users/facundofarias/Repos/github/alf.io/src/main/java/alfio/manager/FileUploadManager.java:70: error: incompatible types: cannot infer type-variable(s) T
jdbc.query(repository.fileContent(id), param, rs -> {
^
(argument mismatch; bad return type in lambda expression
missing return value)
where T is a type-variable:
T extends Object declared in method <T>query(String,SqlParameterSource,ResultSetExtractor<T>)
2 errors
:compileJava FAILED
My JVM is jdk1.8.0_05 on OSX 10.10.3
Thanks
Hi @facundofarias,
thank you very much for your test!
As far as I'm concerned, your Mac OS version should be the last one (Yosemite), right? If so, you should download and install the latest version of oracle's jdk (I'm unable to find an openjdk version for mac) from here: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Your problem is related to a known bug in the compiler of older jdk 8 versions. It had serious troubles with type inference during compilation. As you can see, since jdk 1.8.0_31 https://travis-ci.org/exteso/alf.io the problem has been resolved.
Could you please install the latest version and retry?
I think that we should move this discussion to our "support" mailing list. It could be helpful for people having the same configuration. Do you agree? If yes, could you please try to post a message to alfio[at]googlegroups.com ?
Thank you very much!
P.S.: in order to avoid future compilation problems, I'll insert a "minimum java version" check into the build script.
Should be solved now
It is. Thanks :+1:
Following the docs, I did:
But I am getting an error:
Seems to be that it is failing when it is trying to solve this line of the build.gradle:
Any ideas? Should I use a hardcoded value in here? (I am using Java 7, on OSX 10.9.5)