Skip to content

line 1: export: `hdfs_fdw.jvmpath=/usr/lib/jvm/java-17-openjdk-amd64/lib/server/': not a valid identifier #77

Description

@Prakashckesavan

Hi,

I am trying to add hdfs_fdw to my Postgres (17) image.

image used -

https://hub.docker.com/layers/bitnami/postgresql/17.4.0-debian-12-r11/images/sha256-294bbb12a00af1597d6459c60139c86d871b971dd86265f37edcc8aee2678ffd

steps used in Docker file:

RUN set -x \
  && export JAVA_HOME="$(readlink -f /usr/bin/java | sed "s:bin/java::")" \
  && export JDK_INCLUDE="${JAVA_HOME}/include" \
  && export LD_LIBRARY_PATH="/usr/lib/jvm/java-17-openjdk-amd64/lib/server/" \
  && cd /tmp\
  && git clone https://github.com/EnterpriseDB/hdfs_fdw \
  && cd hdfs_fdw/libhive \
  && make USE_PGXS=1 \
  && make USE_PGXS=1 install \
  && cd jdbc \
  && javac MsgBuf.java \
  && javac HiveJdbcClient.java \
  && jar cf HiveJdbcClient-1.0.jar *.class \
  && cp HiveJdbcClient-1.0.jar ${INSTALL_DIR} \
  && cd ../.. \
  && make USE_PGXS=1 \
  && make USE_PGXS=1 install

I am getting error when i try to create extensions. I am using flyway for running the sqls.

sql used

CREATE EXTENSION IF NOT EXISTS hdfs_fdw;

ERROR:

--------------------------
SQL State  : XX000
Error Code : 0
Message    : ERROR: could not load JVM
  Hint: Add path of libjvm.so to hdfs_fdw.jvmpath.
Location   : /flyway/sql/V1__init.sql (/flyway/sql/V1__init.sql)
Line       : 12
Statement  : Run Flyway with -X option to see the actual statement causing the problem
Caused by: Script V1__init.sql failed
--------------------------
SQL State  : XX000
Error Code : 0
Message    : ERROR: could not load JVM
  Hint: Add path of libjvm.so to hdfs_fdw.jvmpath.
Location   : /flyway/sql/V1__init.sql (/flyway/sql/V1__init.sql)
Line       : 12
Statement  : Run Flyway with -X option to see the actual statement causing the problem
Caused by: org.postgresql.util.PSQLException: ERROR: could not load JVM
  Hint: Add path of libjvm.so to hdfs_fdw.jvmpath.

I tried to add the path like this to Docker file
Ref: https://github.com/EnterpriseDB/hdfs_fdw

export hdfs_fdw.jvmpath="/usr/lib/jvm/java-17-openjdk-amd64/lib/server/" \

I am getting this error: path (/usr/lib/jvm/java-17-openjdk-amd64/lib/server/) exists in the image.

line 1: export: `hdfs_fdw.jvmpath=/usr/lib/jvm/java-17-openjdk-amd64/lib/server/': not a valid identifier

Not sure what I am doing wrong here. Please help to solve this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions