Hi,
Due to some requirements we are building 4.7.2 from source. When I try to do a ./gradlew clean build , one of the tests is failing and thus the build is failing. The test is : testDeserializationBackwardCompatibility The test file is : agent/org.linkedin.glu.agent-impl/src/test/groovy/test/agent/impl/TestScriptFactories.groovy The line that is causing issue is (379) : new FileSystemImpl(new File("/export/content/glu/org.linkedin.glu.packaging-all-4.5.2/agent-server/data/tmp/sample/i001")) And finally here is the stack trace : Directory /export/content/glu/org.linkedin.glu.packaging-all-4.5.2/agent-server/data/tmp/sample/i001 creation was not successful for an unknown reason at org.apache.tools.ant.taskdefs.Mkdir.execute(Mkdir.java:70) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.dispatch.DispatchUtils$execute.call(Unknown Source) at org.linkedin.groovy.util.ant.AntBuilder6068.performTask(AntBuilder6068.groovy:264) at org.linkedin.groovy.util.ant.AntBuilder6068.this$4$performTask(AntBuilder6068.groovy) at org.linkedin.groovy.util.ant.AntBuilder6068$this$4$performTask.callCurrent(Unknown Source) at org.linkedin.groovy.util.ant.AntBuilder6068.nodeCompleted(AntBuilder6068.groovy:220) at groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:147) at org.linkedin.groovy.util.ant.AntBuilder6068.super$3$doInvokeMethod(AntBuilder6068.groovy) at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1082) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:128) at org.linkedin.groovy.util.ant.AntBuilder6068.doInvokeMethod(AntBuilder6068.groovy:168) at groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:64) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at org.linkedin.groovy.util.ant.AntUtils$_mkdirs_closure1.doCall(AntUtils.groovy:61) at sun.reflect.GeneratedMethodAccessor25.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:906) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:39) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at org.linkedin.groovy.util.ant.AntUtils.withBuilder(AntUtils.groovy:45) at org.linkedin.groovy.util.ant.AntUtils$withBuilder.call(Unknown Source) at org.linkedin.groovy.util.ant.AntUtils.mkdirs(AntUtils.groovy:61) at org.linkedin.groovy.util.ant.AntUtils$mkdirs.call(Unknown Source) at org.linkedin.groovy.util.io.fs.FileSystemImpl.<init>(FileSystemImpl.groovy:44) at org.linkedin.groovy.util.io.fs.FileSystemImpl.<init>(FileSystemImpl.groovy:39) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77) at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:57) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190) at test.agent.impl.TestScriptFactories.testDeserializationBackwardCompatibility(TestScriptFactories.groovy:379) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at junit.framework.TestCase.runTest(TestCase.java:168) at junit.framework.TestCase.runBare(TestCase.java:134) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:124) at junit.framework.TestSuite.runTest(TestSuite.java:243) at junit.framework.TestSuite.run(TestSuite.java:238) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83) at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.runTestClass(JUnitTestClassExecuter.java:55) at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:42) at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:71) at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:49) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35) at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) at org.gradle.messaging.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32) at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93) at com.sun.proxy.$Proxy2.processTestClass(Unknown Source) at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:103) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35) at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) at org.gradle.messaging.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:355) at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) What is the reason for this?? Any help is appreciated, thanks. |
In fact, there are a number of tests failing. Is there a pre-requisite for building glu from source? I'm using the gradle wrapper too.
|
just wondering if ant is setup in your system....also check if user has sufficient privileges to create directory.
|
Administrator
|
In reply to this post by wuzoku
The comment in the test is wrong:
// note that although this path may not exist, it does not matter as it is only used // to create a Resource which may or may not actually exist!
The new FileSystemImpl() invocation actually tries to create this folder (https://github.com/pongasoft/utils-misc/blob/master/org.linkedin.util-groovy/src/main/groovy/org/linkedin/groovy/util/io/fs/FileSystemImpl.groovy#L46)
I suppose you do not have the rights to create the folder. The test would need to be modified to not use FileSystemImpl but create the file resource directly (L 389). Otherwise you could always create a /export folder on your system.
I think doing this: def fs_4_5_2 = FileResource.create(new File("/export/content/glu/org.linkedin.glu.packaging-all-4.5.2/agent-server/data/tmp/sample/i001")) then.... localScriptFile: new SerializableFileResource(fs_4_5_2.createRelative('/__tmp618015841Dir/JettyGluScript.groovy')) should work
glu is built and testes on Mac OS X. Unclear which platform you use for build/test Yan |
In reply to this post by wuzoku
Yeah that test is actually failing because of the permissions. After fixing there is another test that is failing. This is actually an assertion failed. More than one tests are failing for me. Im trying to build on Fedora 19 with java 1.7.0_40 .
Below are the tests that are failing : 1. testMountPointResource java.lang.AssertionError: Closure test.agent.rest.client.TestAgentRestClient$_testMountPointResource_closure7_closure14@59677282 should have failed with an exception of type org.linkedin.glu.agent.api.NoSuchMountPointException, instead got Exception java.lang.IncompatibleClassChangeError: the number of constructors during runtime and compile time for java.lang.Exception do not match. Expected 4 but got 5 at org.junit.Assert.fail(Assert.java:93) at groovy.test.GroovyAssert.shouldFail(GroovyAssert.java:71) at groovy.util.GroovyTestCase.shouldFail(GroovyTestCase.java:231) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:361) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:906) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:145) at test.agent.rest.client.TestAgentRestClient$_testMountPointResource_closure7.doCall(TestAgentRestClient.groovy:174) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:906) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:39) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at org.linkedin.glu.agent.rest.client.AgentFactoryImpl$_withRemoteAgent_closure2.doCall(AgentFactoryImpl.groovy:64) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:906) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:39) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at org.linkedin.glu.agent.rest.client.RestClientFactoryImpl.withRestClient(RestClientFactoryImpl.groovy:85) at org.linkedin.glu.agent.rest.client.RestClientFactory$withRestClient.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120) at org.linkedin.glu.agent.rest.client.AgentFactoryImpl.withRemoteAgent(AgentFactoryImpl.groovy:55) at org.linkedin.glu.agent.rest.client.AgentFactory$withRemoteAgent.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120) at test.agent.rest.client.TestAgentRestClient.testMountPointResource(TestAgentRestClient.groovy:165) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at junit.framework.TestCase.runTest(TestCase.java:168) at junit.framework.TestCase.runBare(TestCase.java:134) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:124) at junit.framework.TestSuite.runTest(TestSuite.java:243) at junit.framework.TestSuite.run(TestSuite.java:238) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83) at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.runTestClass(JUnitTestClassExecuter.java:55) at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:42) at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:71) at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:49) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35) at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) at org.gradle.messaging.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32) at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93) at com.sun.proxy.$Proxy2.processTestClass(Unknown Source) at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:103) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35) at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) at org.gradle.messaging.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:355) at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) 2. testClientAuth junit.framework.AssertionFailedError at junit.framework.Assert.fail(Assert.java:48) at junit.framework.Assert.assertTrue(Assert.java:20) at junit.framework.Assert.assertTrue(Assert.java:27) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1336) at org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.callStatic(StaticMetaClassSite.java:62) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:53) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:157) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:165) at test.agent.server.TestAgentSecurity.testClientAuth(TestAgentSecurity.groovy:36) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at junit.framework.TestCase.runTest(TestCase.java:168) at junit.framework.TestCase.runBare(TestCase.java:134) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:124) at junit.framework.TestSuite.runTest(TestSuite.java:243) at junit.framework.TestSuite.run(TestSuite.java:238) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83) at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.runTestClass(JUnitTestClassExecuter.java:55) at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:42) at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:71) at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:49) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35) at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) at org.gradle.messaging.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32) at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93) at com.sun.proxy.$Proxy2.processTestClass(Unknown Source) at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:103) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35) at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) at org.gradle.messaging.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:355) at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) And some more. I will try to figure out if its something on my end. |
Administrator
|
this exception:
java.lang.AssertionError: Closure test.agent.rest.client.TestAgentRestClient$_testMountPointResource_closure7_closure14@59677282 should have failed with an exception of type org.linkedin.glu.agent.api.NoSuchMountPointException, instead got Exception java.lang.IncompatibleClassChangeError: the number of constructors during runtime and compile time for java.lang.Exception do not match. Expected 4 but got 5 is showing that you are building with java 1.6 and executing with 1.7
Make sure you build with 1.7 Yan |
Hi Yan,
Thanks for all the help, appreciate it. I've been trying to figure out what you said. The thing is i dont have jdk 1.6 installed. My JAVA_HOME is pointing to a jdk1.7 installation. So while i get why the tests are running with jdk1.7 i dont get why they are building with jdk1.6. I tried using the sourceCompatibility and targetCompatibility properties for the java plugin, and setting them to 1.7. That didnt help. Also, how am i building with 1.6 when i dont have it installed? |
Administrator
|
glu 4.7.2 is supposed to be built with java 1.6 but can run with java 1.7.
glu 5.0.0+ must be built with 1.7 I don't think I ever ran the tests per se for glu 4.7.2 with java 1.7
As can be seen on this commit: https://github.com/pongasoft/glu/commit/defa095647891787a047e8364d6c436fee3ea075
I introduced a workaround for this constructor issue. You can see in this commit: https://github.com/pongasoft/glu/commit/e51afa2c45acf735a76e2873281594c76c4e1419 when the workaround was removed and hence where it was being applied...
The issue is that the workaround needs to be in place when the application start (under jdk1.7) => all clients/servers have it in their init procedure. But the workaround is NOT put in place for tests hence you get the same issue when running the tests.
I would recommend building and running tests with jdk1.6 for glu 4.7.2 not jdk 1.7 Yan |
(for who might be trying to build from source) So there were a few things to keep in mind :
Like Yan mentioned, build and run tests with jdk 1.6. Have a /export directory with write privileges and also have the "unlimited strength" policy jars for jdk 1.6 : (http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html) download and unzip into $JAVA_HOME/jre/lib/security/ Thanks for the help guys! But the build output is a bunch of wars and jars for console, agent etc. I was expecting a tarball of the format org.linkedin.glu.packaging-all-4.7.2.tgz as the output. The reason for all this is that we want to back port the fix for glu-242 to 4.7.x line and upgrade to that version in all our environments. This is because we are still on 4.3.1 and need to do this before we can get on 5.x line. And glu-242 is a blocker for that. So I have done the patch, and built the source. But we create rpm packages and apply environment specific configuration via the rpm package depending on the environment. And our rpm uses org.linkedin.glu.packaging-all-4.7.2.tgz as a source. Is there a way to get that from the gradle build. Already checked all the tasks, and there doesn't seem to be one related to creating the tarball from all the outputs. Am i missing something? Or is this usually something that you do not using the build script? Thank you. |
Administrator
|
I build and package glu using gradle. It is described here: http://pongasoft.github.io/glu/docs/latest/html/dev-setup.html
But at the root, simply run: ./gradlew -Prelease=true clean test release -Prelease=true => not a snapshot
clean and test are for obvious reasons release create the tar ball and copy it into the release folder (which is configurable)
This is what my $HOME/.userConfig.properties looks like top.build.dir="/Volumes/Disk2/deployment/${userConfig.project.name}"
top.install.dir="/export/content/${userConfig.project.name}" top.release.dir="/export/content/repositories/release"
top.publish.dir="/export/content/repositories/publish" In the end the module for packaging is packaging/org.linkedin.glu.packaging-all
and you can go in there and simply do ../../gradlew -Prelease=true package // or release see http://pongasoft.github.io/glu/docs/latest/html/dev-setup.html for the details of the commands you can run and what they do
Yan |
This post was updated on .
Hi Yan,
I am able to modify and test changes in IDEA but now I want to test those changes outside to the IDEA. For that I need to build following jar files: - org.linkedin.util-groovy-2.0.2.jar - org.linkedin.util-core-2.0.2 - org.linkedin.glu.utils-5.4.1 As I am new to gradle, can you please give some direction how to build artifacts individually? which command to run and location of generated artifacts etc......... When I am running this command C:\git\glu\glu-master>..\gradle-1.10\bin\gradle -Prelease=true clean test release Then it is asking for ====> Please enter bintray.apiKey: is apiKey an artifact name? am I running correct command? Note: I have gradle (gradle-1.10) installed at the same level where glu-master is, I am not using gradlw(wrapper). Please assist. Thanks! Bhagat |
Administrator
|
I would suggest doing the following in order to make sure that you are building your own: a) change the version number you produce to be yours in the project-spec.groovy file (ex for util: 2.0.2-bs) (https://github.com/pongasoft/utils-misc/blob/master/project-spec.groovy#L21) especially if you have made changes to the source files, you should definitely not build them with the same version number (it is a recipe for big headaches later...)
b) change the version number you consume to be the one you generated.. as well in the project-spec.groovy file (ex: utilsMisc: '2.0.2-bs) (https://github.com/pongasoft/glu/blob/master/project-spec.groovy#L29)
Then run the same command at the root of the project (for utils-misc): ./gradlew -Prelease=true clean test release Make sure you define a $HOME/.userConfig.properties looks like top.release.dir="/export/content/repositories/release"
bintray.apiKey='xxx' With a "central" place for top.release.dir (otherwise each project will have its own and that will not work across projects).
This way when you build utils-misc it will "release" the artifacts in top.release.dir and then when you build glu it will consume the artifacts from the same release folder, so you don't have to do anything special.
Note that you should most likely build utils-zookeeper as well... otherwise you will have multiple versions of utils-misc. For the bintray key, since you are not publishing to bintray simply add a dummy key in the $HOME/.userConfig.properties file
Note that I would not recommend to use gradle 10 since the reason for the built-in gradlew is to make sure it is built the proper way. This is an unsupported way of building and you do it at your own risks. Very unclear why you are doing it this way but this may lead to unforeseen issues during the build/package process.
Yan |
Thanks Yan.
Quick Question: "For the bintray key, since you are not publishing to bintray simply add a dummy key in the $HOME/.userConfig.properties file" can I add bintray.apiKey='test' in .userConfig.properties file or is there any specific format for bintray.apiKey? I got an error when I ran ./gradlew -Prelease=true clean test release command after making changes per your suggestion: C:\git\glu\utils-misc-master>gradlew -stacktrace -Prelease=true clean test release Working in release mode: 2.0.2-bs FAILURE: Could not determine which tasks to execute. * What went wrong: Task 'release' not found in root project 'utils-misc-master'. * Try: Run gradlew tasks to get a list of available tasks. * Exception is: org.gradle.execution.TaskSelectionException: Task 'release' not found in root project 'utils-misc-master'. at org.gradle.execution.TaskSelector.getSelection(TaskSelector.java:69) at org.gradle.execution.commandline.CommandLineTaskParser.parseTasks(CommandLineTaskParser.java:38) at org.gradle.execution.TaskNameResolvingBuildConfigurationAction.doSelect(TaskNameResolvingBuildConfigurationAction.java:65) at org.gradle.execution.TaskNameResolvingBuildConfigurationAction.configure(TaskNameResolvingBuildConfigurationAction.java:47) at org.gradle.execution.DefaultBuildExecuter.configure(DefaultBuildExecuter.java:42) at org.gradle.execution.DefaultBuildExecuter.access$100(DefaultBuildExecuter.java:23) at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:48) at org.gradle.execution.ExcludedTaskFilteringBuildConfigurationAction.configure(ExcludedTaskFilteringBuildConfigurationAction.java:46) at org.gradle.execution.DefaultBuildExecuter.configure(DefaultBuildExecuter.java:42) at org.gradle.execution.DefaultBuildExecuter.access$100(DefaultBuildExecuter.java:23) at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:48) at org.gradle.execution.DefaultTasksBuildExecutionAction.configure(DefaultTasksBuildExecutionAction.java:38) at org.gradle.execution.DefaultBuildExecuter.configure(DefaultBuildExecuter.java:42) at org.gradle.execution.DefaultBuildExecuter.select(DefaultBuildExecuter.java:35) at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:155) at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113) at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81) at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:64) at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33) at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:35) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26) at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50) at org.gradle.api.internal.Actions$RunnableActionAdapter.execute(Actions.java:171) at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201) at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22) at org.gradle.launcher.Main.doAction(Main.java:46) at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45) at org.gradle.launcher.Main.main(Main.java:37) at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50) at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32) at org.gradle.launcher.GradleMain.main(GradleMain.java:23) at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:58) BUILD FAILED Total time: 5.594 secs |
Administrator
|
I am not sure if that is the problem but I would suggest renaming the root folder to utils-misc (instead of utils-misc-master). I believe gradle use this for the project name and it may have an impact on the rest of the build.
Yan |
Thank Yan, I will do that.
I have one more question: Project glu and utils-misc have circular dependencies, so while development, do you open both of them in separate instance of IDEA or just in one instance glu as project and utils-misc as module? I used to have several maven projects and modules in my previous assignment and I used to add them as dependency wherever I need and while building it gets updated in local repo and changes get reflected without making any extra efforts. How do you manage glu or any other custom modules/projects as dependencies in your development. I am finding little disconnected in gradle world :) Thanks! Bhagat |
Administrator
|
No they do not have circular dependencies. That would obviously not compile. I am not sure why you are making this statement.
Yan |
Yeah I didn't find it now, My bad.
QQ: if I don't want to build all jar and war then how can I skip them while building artifacts? Lets say I want to build only org.linkedin.util-core-xxx.jar file, how can I skip others? |
Administrator
|
You go in the individual project (cd) and build from there ex:
cd org.linkedin.util-core ../gradlew jar
Yan
|
Great!!!
It generates jar at \utils-misc\out\build\org.linkedin.util-groovy\libs\org.linkedin.util-groovy-2.0.2-SNAPSHOT.jar If I don't want -SNAPSHOT as artifact POST FIX then what I need to do? |
This post was updated on .
I think by default it is SNAPSHOT and if you say release then only it will build jar file without SNAPSHOT .
I think this part of code take cares of it: project-spec.groovy // information about the build framework itself build: [ type: "gradle", commands: [ "snapshot": "gradlew xxx", "release": "gradlew -Prelease=true xxx" ] ] ****** It generated jar file without SNAPSHOT when I ran this command ..\gradlew -Prelease=true jar |
Free forum by Nabble | Edit this page |