SwitchEV / RISE-V2G

The only fully-featured reference implementation of the Vehicle-2-Grid communication interface ISO 15118
MIT License
220 stars 92 forks source link

Error in starting EVCC #67

Closed SubhamoyS closed 2 years ago

SubhamoyS commented 3 years ago

As I do not intend to change the source code and do not otherwise use Eclipse or IntelliJ idea, I tried to configure, build and run the project from Linux command line.

Inside RISE-V2G-PARENT, I called mvn compile. When maven complained about missing xml bind modules (I am using openjdk-11), I added the following dependencies in the pom.xml of RISE-V2G-Shared:

  <dependency>
   <groupId>jakarta.xml.bind</groupId>
   <artifactId>jakarta.xml.bind-api</artifactId>
   <version>2.3.2</version>
  </dependency>

  <dependency>
   <groupId>org.glassfish.jaxb</groupId>
   <artifactId>jaxb-runtime</artifactId>
   <version>2.3.2</version>
  </dependency>

This made the compilation go through. I also did mvn package.

Inside RISE-V2G-EVCC, I then did the following:

java -jar rise-v2g-evcc-1.2.6.jar

I get the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/logging/log4j/util/StackLocator$FqcnCallerLocator
 at org.apache.logging.log4j.util.StackLocator.<clinit>(StackLocator.java:37)
 at org.apache.logging.log4j.util.StackLocatorUtil.<clinit>(StackLocatorUtil.java:33)
 at org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.getContext(ClassLoaderContextSelector.java:133)
 at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:228)
 at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
 at org.apache.logging.log4j.LogManager.getContext(LogManager.java:174)
 at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:669)
 at com.v2gclarity.risev2g.shared.utils.ByteUtils.<clinit>(ByteUtils.java:40)
 at com.v2gclarity.risev2g.shared.enumerations.GlobalValues.<clinit>(GlobalValues.java:75)
 at com.v2gclarity.risev2g.evcc.main.StartEVCC.main(StartEVCC.java:33)
Caused by: java.lang.ClassNotFoundException: org.apache.logging.log4j.util.StackLocator$FqcnCallerLocator
 at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
 at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
 at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)

I am using Ubuntu 21.04.

Any help/suggestion would be deeply appreciated.

osbren commented 3 years ago

I got this to work by using an older version 2.11.2 of log4j-core and log4j-api Hope this works A better method would be helpful though

jessekerkhoven commented 2 years ago

Fixed with #76