Not getting the environment variables on java spring app

Hi, im builded an java spring api and while trying to deploy is giving this error

#10 15.64 Caused by: org.postgresql.util.PSQLException: FATAL: Tenant or user not found

i dont know why but it seems the app is not getting the environment variables, yes it is already set and the names are the same on the, and when i run the app locally it is working.

The issue is from your environment variables.
Example: If you are using jdbc url to connect to database, but you also have username and password variables setup, it will assume that the url you passed needs the username and password to set it up.

So, if you are using just the url, remove the username or password. But if the url only contains the database name and its port, set the username and the password

1 Like

i just edit the url on env and now works, thanks for that but the problem now is about this

 Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project demo: Fatal error compiling: error: release version 17 not supported -> [Help 1]

i try everything i could, changing the versions on java, on the maven compiler, resetting the JAVA_HOME path and still giving this error.

The error message indicates that the version of Java you are using to compile your Maven project is not supported by the Maven Compiler Plugin.

You can try any of these:

  1. Upgrade Maven Compiler Plugin: Check if there is a newer version of the Maven Compiler Plugin available that supports Java 17. You can update the plugin version in your project’s pom.xml file.
  2. Use a Supported Java Version: If there are no compatible versions of the Maven Compiler Plugin available, you can switch to a Java version that is supported by the plugin. You may need to downgrade your Java version to a supported release.
  3. Configure Maven Compiler Plugin: If you must use Java 17 and there are no compatible versions of the Maven Compiler Plugin available, you can configure the plugin to use a different Java version. You can specify the Java version in the <configuration> section of the plugin configuration in your pom.xml file.

You can configure the Maven Compiler like this:

                <!-- Other configuration options -->
1 Like

Thanks for the help, i passed days trying to figure it out how to fix it.

1 Like