Compiling Jitsi-videobridge problem

We are trying to compile our own version of the videobridge in order to incorporate the following PR: https://github.com/jitsi/jitsi-videobridge/pull/1114 as we are using the LastN feature.

I have installed openjdk 8 and maven 3.6.3

$ javac -version
javac 1.8.0_242
$ mvn -version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /Users/fischer/bin/apache-maven-3.6.3
Java version: 1.8.0_242, vendor: AdoptOpenJDK, runtime: /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre
Default locale: en_CH, platform encoding: UTF-8
OS name: "mac os x", version: "10.14.6", arch: "x86_64", family: "mac"

I am compiling the videobridge with the following commands mvn package -DskipTests and I get two JARs in target:

-rw-r--r--  1 fischer  peta    31M Mar 21 17:28 jitsi-videobridge-2.1-SNAPSHOT-archive.zip
-rw-r--r--  1 fischer  peta   586K Mar 21 17:27 jitsi-videobridge-2.1-SNAPSHOT.jar

When I try to deploy that jar on our videobridge servers in /usr/share/jitsi-videobridge (replacing the jar that came from the nightly package) I get the following error when I try to restart the service I see this error in /var/log/jitsi/jvb.log:

Exception in thread "main" java.lang.NoClassDefFoundError: org/jitsi/config/JitsiConfig
	at org.jitsi.videobridge.Main.main(Main.java:140)
Caused by: java.lang.ClassNotFoundException: org.jitsi.config.JitsiConfig
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
	... 1 more

I know what that error means :slight_smile: but I have no clue how to fix it. My guess is that the compilatiion step (mvn package) isn’t correct, but I’m not a Java developer.

Also I noted that the filesizes of the two jars are widely different:

-rw-r--r--   1 root root  385444 Mar 22 17:04 jitsi-videobridge.jar
-rw-r--r--   1 root root  599791 Mar 21 17:24 jitsi-videobridge.jar_nightly

Any ideas on how to fix this?

/jc

Are you replacing the jar in installed latest jvb2 version?

yes