Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

errors in generate-synthea.sh: Cannot find Java binary #13

@sdeoras

Description

@sdeoras

Hi, My Ubuntu 20.04 system info is as follows:

$ uname -a
Linux <hostname> 5.10.0-1038-oem #40-Ubuntu SMP Fri Jul 16 15:08:30 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

$ java --version
openjdk 11.0.11 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)

$ bazel --version
bazel 4.2.0

I am encountering following errors. Any pointers on how to get resolve these? Thanks.

└─ $ ▶ ./generate-synthea.sh $WORKSPACE
~/fhirdata ~/gocode/github.com/google/fhir-examples
Cloning into 'synthea'...

<redacted... lots of lines in between>

BUILD SUCCESSFUL in 1m 20s
4 actionable tasks: 4 executed
~/gocode/github.com/google/fhir-examples
Finished generating Synthea dataset.  Running SplitBundle...
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
ERROR: /home/<username>/.cache/bazel/_bazel_<username>/2884ccfba9ba71fca71c9c77a412dd89/external/local_jdk/BUILD.bazel:3:10: in fail_rule rule @local_jdk//:jdk:
Traceback (most recent call last):
        File "/home/<username>/.cache/bazel/_bazel_<username>/2884ccfba9ba71fca71c9c77a412dd89/external/bazel_tools/tools/jdk/fail_rule.bzl", line 19, column 13, in _fail_rule_impl
                fail("%s %s" % (ctx.attr.header, ctx.attr.message))
Error in fail: Auto-Configuration Error: Cannot find Java binary bin/java in /home/<username>/.cache/bazel/_bazel_<username>/install/96e7556c3bbfa3fa31016b638fdff086/embedded_tools/tools/jdk/nosystemjdk; either correct your JAVA_HOME, PATH or specify embedded Java (e.g. --javabase=@bazel_tools//tools/jdk:remote_jdk11)
INFO: Repository rules_proto instantiated at:
  /home/<username>/gocode/github.com/google/fhir-examples/WORKSPACE:14:23: in <toplevel>
  /home/<username>/.cache/bazel/_bazel_<username>/2884ccfba9ba71fca71c9c77a412dd89/external/com_google_fhir/bazel/dependencies.bzl:37:17: in fhirproto_dependencies
Repository rule http_archive defined at:
  /home/<username>/.cache/bazel/_bazel_<username>/2884ccfba9ba71fca71c9c77a412dd89/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
INFO: Repository remote_java_tools_linux instantiated at:
  /DEFAULT.WORKSPACE.SUFFIX:223:6: in <toplevel>
  /home/<username>/.cache/bazel/_bazel_<username>/2884ccfba9ba71fca71c9c77a412dd89/external/bazel_tools/tools/build_defs/repo/utils.bzl:201:18: in maybe
Repository rule http_archive defined at:
  /home/<username>/.cache/bazel/_bazel_<username>/2884ccfba9ba71fca71c9c77a412dd89/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
INFO: Repository maven instantiated at:
  /home/<username>/gocode/github.com/google/fhir-examples/WORKSPACE:20:20: in <toplevel>
  /home/<username>/.cache/bazel/_bazel_<username>/2884ccfba9ba71fca71c9c77a412dd89/external/com_google_fhir/bazel/workspace.bzl:8:18: in fhirproto_workspace
  /home/<username>/.cache/bazel/_bazel_<username>/2884ccfba9ba71fca71c9c77a412dd89/external/rules_jvm_external/defs.bzl:36:19: in maven_install
Repository rule coursier_fetch defined at:
  /home/<username>/.cache/bazel/_bazel_<username>/2884ccfba9ba71fca71c9c77a412dd89/external/rules_jvm_external/coursier.bzl:559:33: in <toplevel>
ERROR: Analysis of target '@com_google_fhir//java/com/google/fhir/examples:SplitBundle' failed; build aborted: Analysis of target '@local_jdk//:jdk' failed
INFO: Elapsed time: 42.634s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (21 packages loaded, 191 targets configured)
    currently loading: @com_google_fhir//proto/google/fhir/proto/r4/core/resources ... (2 packages)
./generate-synthea.sh: line 42: bazel-bin/external/com_google_fhir/java/com/google/fhir/examples/SplitBundle: No such file or directory
mv: cannot stat '/home/<username>/fhirdata/ndjson/*.schema.json': No such file or directory
mv: cannot stat '/home/<username>/fhirdata/ndjson/*.analytic.ndjson': No such file or directory
Done

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions