How to set dDATABASE_ENDPOINT when using OracleDatabase

0
I am trying to run a Mendix application in a container. When using postgreSQL as the database, I can run the following command. docker run --rm -e ADMIN_PASSWORD=XXX -p 18080:8080 -e DATABASE_ENDPOINT=postgres://USER:YYY@172.17.0.2:5432/admin --name=xsprinter xsprinter When using OracleDB for Database, how should I set DATABASE_ENDPOINT?
asked
3 answers
0

Hello, does anyone knows how to do it ? :) I also have the same issue 

answered
0

Hi Nomura,

When running a Mendix application in a container with OracleDB, you need to correctly format the DATABASE_ENDPOINT environment variable. Unlike PostgreSQL, Oracle requires a different JDBC connection format. The correct format for the Oracle connection string is oracle://USER:PASSWORD@HOST:PORT/SERVICE_NAME. For example, if your database has the username myuser, password mypassword, host 172.17.0.3, port 1521, and service name orclpdb1, the DATABASE_ENDPOINT should be set as oracle://myuser:mypassword@172.17.0.3:1521/orclpdb1. When running the container, your command would look like:

docker run --rm -e ADMIN_PASSWORD=XXX -p 18080:8080 -e DATABASE_ENDPOINT=oracle://myuser:mypassword@172.17.0.3:1521/orclpdb1 --name=xsprinter xsprinter

Additionally, if your Oracle database uses a SID instead of a Service Name, you should modify the format to oracle://USER:PASSWORD@HOST:PORT:SID. It's also essential to ensure that the Oracle JDBC driver ojdbc8.jar is available in the appropriate library folder inside the Mendix container. Without this driver, the application will not be able to connect to the Oracle database. Furthermore, networking configurations should be checked to ensure that the Mendix container can reach the Oracle database, and you may need to configure Docker networking using --network=host or a custom network. If you need assistance setting up the JDBC driver inside your container.

 

Hope it helps!!

answered
0

I also Try to use MXRUNTIME but it also not work 

     #  - name: MXRUNTIME_DatabaseJdbcUrl

              # value: "jdbc:oracle:thin:@(description=(address=(host=hostname)(protocol=tcp)(port=port))(connect_data=(sid=sid)))"

            #  value: jdbc:oracle:thin:user/password@//host:port/sid

            - name: MXRUNTIME_DatabaseUserName

              value: "user"

            - name: MXRUNTIME_DatabasePassword

              value: "pass"

            - name: MXRUNTIME_DatabaseName

              value: "sid"

            - name: MXRUNTIME_DatabaseHost

              value: "dbhost:port"

            # - name: MXRUNTIME_OracleServiceName

            #   value: "service"

            - name: MXRUNTIME_DatabaseUseSsl

              value: "true"

 

answered