java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils
On 12 Jun 2018, at 22:23, Gert van Dijk <gert...@gmail.com> wrote:Hi,I've upgraded my Gerrit with Gitiles plugin (both master, from gerrit-ci)
, but it seems I'm running into the issue caused by 183330: Bazel: Remove unused commons-lang3 (gerrit), which I think is catched by 183331: Add dependency on commons-lang3 (gitiles).Server errors include:java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtilsHowever, the latter change is still open pending a test. Could someone please point me out quickly how to build the Gitiles plugin with this change? (I'm familiar with Docker and the Jenkins slave image, but not Bazel and stuff). I would volunteer to test this change then. :)Thanks,Gert
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Running Gerrit master then?I've retriggered the build of the Gitiles plugin and it succeeded.See below:
cd gitilesgit fetch https://gerrit.googlesource.com/plugins/gitiles refs/changes/31/183331/2 && git checkout FETCH_HEADbazel build gitiles.jarThen the plugin will be in bazel-genfiles/gitiles.jar. That builds for stable-2.14. If you want a build for "master", you can rungit pull origin masterbazel build gitiles.jarexcept the "git pull" produces conflicts. Hm.Thanks and hope that helps,Jonathan
Hi,I've upgraded my Gerrit with Gitiles plugin (both master, from gerrit-ci), but it seems I'm running into the issue caused by 183330: Bazel: Remove unused commons-lang3 (gerrit), which I think is catched by 183331: Add dependency on commons-lang3 (gitiles).
Server errors include:java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtilsHowever, the latter change is still open pending a test.
Could someone please point me out quickly how to build the Gitiles plugin with this change? (I'm familiar with Docker and the Jenkins slave image, but not Bazel and stuff). I would volunteer to test this change then. :)Thanks,Gert
--
On Wed, Jun 13, 2018 at 6:23 AM Gert van Dijk <gert...@gmail.com> wrote:Hi,I've upgraded my Gerrit with Gitiles plugin (both master, from gerrit-ci), but it seems I'm running into the issue caused by 183330: Bazel: Remove unused commons-lang3 (gerrit), which I think is catched by 183331: Add dependency on commons-lang3 (gitiles).This should not be causing a problem on master. The removal of commons-lang3 was reverted during the merge up from stable-2.15:
However, the latter change is still open pending a test.
I've just confirmed that change on gerrit's latest stable-2.14 and submitted it.
On Wednesday, 13 June 2018 02:05:19 UTC+2, David Pursehouse wrote:On Wed, Jun 13, 2018 at 6:23 AM Gert van Dijk <gert...@gmail.com> wrote:Hi,I've upgraded my Gerrit with Gitiles plugin (both master, from gerrit-ci), but it seems I'm running into the issue caused by 183330: Bazel: Remove unused commons-lang3 (gerrit), which I think is catched by 183331: Add dependency on commons-lang3 (gitiles).This should not be causing a problem on master. The removal of commons-lang3 was reverted during the merge up from stable-2.15:Oh, interesting. Why do I see this error when using Gitiles master on Gerrit master? I should not. Am I running into something else? Full traceback here: http://paste.openstack.org/show/723368/
(I also noticed that the release.war has shrunk from 83MB -> 69MB.)
However, the latter change is still open pending a test.I've just confirmed that change on gerrit's latest stable-2.14 and submitted it.Thanks :)
Oh, interesting. Why do I see this error when using Gitiles master on Gerrit master? I should not. Am I running into something else? Full traceback here: http://paste.openstack.org/show/723368/Not sure what's going on there. Have you tried locally building the plugin's master branch?
root@e0398daf1868:~/gitiles# bazel build gitiles.jar
Extracting Bazel installation...
...........
ERROR: /root/.cache/bazel/_bazel_root/9dbf83323c06dcaacb6289a72ed0dfd9/external/com_googlesource_gerrit_bazlets/gerrit_api_maven_local.bzl:37:3: no such package '@gerrit_plugin_api//jar': failed /usr/bin/python /root/.cache/bazel/_bazel_root/9dbf83323c06dcaacb6289a72ed0dfd9/external/com_googlesource_gerrit_bazlets/tools/download_file.py -o /root/.cache/bazel/_bazel_root/9dbf83323c06dcaacb6289a72ed0dfd9/external/gerrit_plugin_api/jar/gerrit-plugin-api-2.16-SNAPSHOT.jar -u MAVEN_LOCAL:/com/google/gerrit/gerrit-plugin-api/2.16-SNAPSHOT/gerrit-plugin-api-2.16-SNAPSHOT.jar: Download file:///root/.m2/repository/com/google/gerrit/gerrit-plugin-api/2.16-SNAPSHOT/gerrit-plugin-api-2.16-SNAPSHOT.jar
error using curl: Command '['curl', '--proxy-anyauth', '-ksfo', '/root/.gerritcodereview/bazel-cache/downloaded-artifacts/gerrit-plugin-api-2.16-SNAPSHOT.jar-a6cf043c8712b39b43739ffe82e53a1923b81630', 'file:///root/.m2/repository/com/google/gerrit/gerrit-plugin-api/2.16-SNAPSHOT/gerrit-plugin-api-2.16-SNAPSHOT.jar']' returned non-zero exit status 37
and referenced by '//external:gerrit-plugin-api-neverlink'
ERROR: Analysis of target '//:gitiles.jar' failed; build aborted: Loading failed
INFO: Elapsed time: 4.041s
FAILED: Build did NOT complete successfully (11 packages loaded)
root@e0398daf1868:~/gitiles# git rev-parse HEAD
fd51b3f2b95d392b54da9d0c87c302c851ef78b2
root@e0398daf1868:~/gerrit# bazel version
Build label: 0.7.0
root@12fffeb88959:~/gitiles# bazel build gitiles.jar
Starting local Bazel server and connecting to it...
........
ERROR: /root/.cache/bazel/_bazel_root/9dbf83323c06dcaacb6289a72ed0dfd9/external/com_googlesource_gerrit_bazlets/gerrit_api_maven_local.bzl:37:3: no such package '@gerrit_plugin_api//jar': failed /usr/bin/python /root/.cache/bazel/_bazel_root/9dbf83323c06dcaacb6289a72ed0dfd9/external/com_googlesource_gerrit_bazlets/tools/download_file.py -o /root/.cache/bazel/_bazel_root/9dbf83323c06dcaacb6289a72ed0dfd9/external/gerrit_plugin_api/jar/gerrit-plugin-api-2.16-SNAPSHOT.jar -u MAVEN_LOCAL:/com/google/gerrit/gerrit-plugin-api/2.16-SNAPSHOT/gerrit-plugin-api-2.16-SNAPSHOT.jar: Download file:///root/.m2/repository/com/google/gerrit/gerrit-plugin-api/2.16-SNAPSHOT/gerrit-plugin-api-2.16-SNAPSHOT.jar
error using curl: Command '['curl', '--proxy-anyauth', '-ksfo', '/root/.gerritcodereview/bazel-cache/downloaded-artifacts/gerrit-plugin-api-2.16-SNAPSHOT.jar-a6cf043c8712b39b43739ffe82e53a1923b81630', 'file:///root/.m2/repository/com/google/gerrit/gerrit-plugin-api/2.16-SNAPSHOT/gerrit-plugin-api-2.16-SNAPSHOT.jar']' returned non-zero exit status 37
and referenced by '//external:gerrit-plugin-api-neverlink'
ERROR: Analysis of target '//:gitiles.jar' failed; build aborted: Loading failed
INFO: Elapsed time: 2.934s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (7 packages loaded)
currently loading: @bazel_tools//tools/jdk
root@12fffeb88959:~/gitiles# bazel version
Build label: 0.14.0
But still, all Markdown formatting fails with the same traceback. I should file an issue I guess?
On Wednesday, 13 June 2018 09:30:08 UTC+2, David Pursehouse wrote:Oh, interesting. Why do I see this error when using Gitiles master on Gerrit master? I should not. Am I running into something else? Full traceback here: http://paste.openstack.org/show/723368/Not sure what's going on there. Have you tried locally building the plugin's master branch?One more clue here: Gitiles is working pretty OK *until* it has to format Markdown and I have enabled three extensions in my configuration: blocknote, multicolumn, namedanchor. This causes all repositories with a README.md/navbar.md to fail currently.I've tried building locally and it fails for me (output below) for I guess this is the "standalone" build approach from here.
NoClassDefFoundError: org/apache/commons/lang3/StringUtils
We don't publish SNAPSHOTs for a while. So to build against snapshot,
you would need to publish the snapshot first to your local Maven
repository while building gerrit core, e.g.:
$ tools/maven/api.sh install
Regarding toNoClassDefFoundError: org/apache/commons/lang3/StringUtils
are you actually sure and double checked you are using gerrit master and not
2-15.2 releases, where commons-lang3 was in fact removed? But re-added
later? See also https://github.com/google/gitiles/issues/140 and discussion
on the this mailing list in another thread.
You are right, sorry for confusion. commons-lang3 was only used intests on master and thus plugins must ship it in plugin jar. gitiles pluginshould be fixed now.