Git Product home page Git Product logo

Comments (4)

ai-republic avatar ai-republic commented on June 2, 2024

Hi Todor,
it looks like you don't have a Java 17 or newer installed on your PI.
You can download the latest version (JDK 21) and choose your target architecture linux/aarch64.
Then unpack it to e.g. /usr/lib/jvm using sudo tar xvf openjdk-21_linux-aarch64_bin.tar.gz -C /usr/lib/jvm and run the following commands to update the default Java runtime:

sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-21/bin/java 1000
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk-21/bin/javac 1000

Then you need to select the new Java 21 Runtime and Compiler:
sudo update-alternatives --config java
sudo update-alternatives --config javac

Its quite well described here.

from bms-to-inverter.

ai-republic avatar ai-republic commented on June 2, 2024

I think I can close this issue

from bms-to-inverter.

sanitariu avatar sanitariu commented on June 2, 2024

dri@dri ~/bms-to-inverter $ mvn -v
Apache Maven 3.9.5 (57804ffe001d7215b5e7bcb531cf83df38f93546)
Maven home: /usr/share/maven-bin-3.9
Java version: 1.8.0_252, vendor: IcedTea, runtime: /opt/icedtea-bin-3.16.0/jre
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux", version: "5.10.128-gentoo", arch: "amd64", family: "unix"

This is my mvn version. Trying to build gave me error flag --release, so i commented out stuff in pom.xml and run again.
Now i have another error:
[INFO] Compiling 19 source files to /home/dri/bms-to-inverter/core-api/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/dri/bms-to-inverter/core-api/src/main/java/com/airepublic/bmstoinverter/core/EnergyStorageProducer.java:[13,33] cannot access jakarta.enterprise.inject.Produces
bad class file: /home/dri/.m2/repository/jakarta/enterprise/jakarta.enterprise.cdi-api/4.0.1/jakarta.enterprise.cdi-api-4.0.1.jar(jakarta/enterprise/inject/Produces.class)
class file has wrong version 55.0, should be 52.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for bms-to-inverter-parent 0.0.1-SNAPSHOT:
[INFO]
[INFO] bms-to-inverter-parent ............................. SUCCESS [ 0.373 s]
[INFO] core-api-0.0.1-SNAPSHOT ............................ FAILURE [ 2.370 s]
[INFO] protocol-rs485-0.0.1-SNAPSHOT ...................... SKIPPED
[INFO] protocol-can-0.0.1-SNAPSHOT ........................ SKIPPED
[INFO] bms-daly-common-0.0.1-SNAPSHOT ..................... SKIPPED
[INFO] bms-daly-rs485-0.0.1-SNAPSHOT ...................... SKIPPED
[INFO] bms-daly-can-0.0.1-SNAPSHOT ........................ SKIPPED
[INFO] inverter-sma-can-0.0.1-SNAPSHOT .................... SKIPPED
[INFO] service-mqtt-broker-0.0.1-SNAPSHOT ................. SKIPPED
[INFO] service-mqtt-client-0.0.1-SNAPSHOT ................. SKIPPED
[INFO] bms-to-inverter-main-0.0.1-SNAPSHOT ................ SKIPPED
[INFO] webserver-0.0.1-SNAPSHOT ........................... SKIPPED
[INFO] protocol-modbus-0.0.1-SNAPSHOT ..................... SKIPPED
[INFO] inverter-growatt-rs485-0.0.1-SNAPSHOT .............. SKIPPED
[INFO] inverter-growatt-can-0.0.1-SNAPSHOT ................ SKIPPED
[INFO] bms-jk-can-0.0.1-SNAPSHOT .......................... SKIPPED
[INFO] bms-seplos-can-0.0.1-SNAPSHOT ...................... SKIPPED
[INFO] inverter-deye-can-0.0.1-SNAPSHOT ................... SKIPPED
[INFO] inverter-solark-can-0.0.1-SNAPSHOT ................. SKIPPED
[INFO] bms-pylon-can-0.0.1-SNAPSHOT ....................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.648 s
[INFO] Finished at: 2023-11-20T15:46:34+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project core-api: Compilation failure
[ERROR] /home/dri/bms-to-inverter/core-api/src/main/java/com/airepublic/bmstoinverter/core/EnergyStorageProducer.java:[13,33] cannot access jakarta.enterprise.inject.Produces
[ERROR] bad class file: /home/dri/.m2/repository/jakarta/enterprise/jakarta.enterprise.cdi-api/4.0.1/jakarta.enterprise.cdi-api-4.0.1.jar(jakarta/enterprise/inject/Produces.class)
[ERROR] class file has wrong version 55.0, should be 52.0
[ERROR] Please remove or make sure it appears in the correct subdirectory of the classpath.
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :core-api

dri@dri ~/bms-to-inverter $ java -version
openjdk version "1.8.0_252"
OpenJDK Runtime Environment (IcedTea 3.16.0) (Gentoo icedtea-3.16.0)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)

Can you tell me the OS you build the zip file and i will install the same ?

from bms-to-inverter.

sanitariu avatar sanitariu commented on June 2, 2024

Ok i build it finally :) Now setting up MQQT

from bms-to-inverter.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.