Problem with building jitsi-videobridge on Ubuntu 20.04 openjdk 11.0.7

Hi all,
I’m currently trying to build JVB on Ubuntu 20.04 and facing some problems.
mvn clean package and mvn install look successful.

I seted an $JVB_HOME as recommendedt to place where I clone a repo,
and running this command

mvn compile exec:exec -Dexec.executable=java -Dexec.args="-cp %classpath org.jitsi.videobridge.Main -Djava.library.path=$JVB_HOME/lib/native/linux-64 -Djava.util.logging.config.file=$JVB_HOME/lib/logging.properties -Dnet.java.sip.communicator.SC_HOME_DIR_NAME=.jitsi-videobridge "

I’m getting this exception as a result:

    Error: Unable to initialize main class org.jitsi.videobridge.Main
Caused by: java.lang.NoClassDefFoundError: org/jitsi/meet/OSGiBundleConfig
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
    at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404)
    at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166)
    at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:982)
    at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:929)
    at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:457)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

Kind of out of ideas for a moment will appreciate any help.
What looks suspicion - this path $JVB_HOME/lib/native/linux-64 does not exist on my cloned repo, I suspect something changed recently?

Having the same issue in OSX

There is one(and a half) workaround that I found.
build a fat jar

  1. mvn clean compile package -DskipTests=true -P buildFatJar
  2. cd target
  3. java -classpath jitsi-videobridge-2.1-SNAPSHOT-jar-with-dependencies.jar org.jitsi.videobridge.Main --apis=rest -Dorg.jitsi.videobridge.rest.private.jetty.host=localhost -Dorg.jitsi.videobridge.rest.private.jetty.port=8080

Other possible way will include setup local jitsi-meet and replacing a bundled jar with a new build.

We no longer have native libs in jvb directly, where did you find that command? It’s probably a doc that is out of date.

Also, just an FYI, java 11 is not officially supported.

Initial recommendation is from here


Probably require some update to avoid such confusions.

Thanks…yep that’s out of date now.

Does it work for you if you get rid of the -Djava.library.path=$JVB_HOME/lib/native/linux-64 part?

@ bbaldino
On Manjaro with openjdk version “1.8.0_252”

[INFO] — exec-maven-plugin:3.0.0:exec (default-cli) @ jvb-parent —
Error: Could not find or load main class org.jitsi.videobridge.Main
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)

mvn compile exec:exec -Dexec.executable=java -Dexec.args="-cp %classpath org.jitsi.videobridge.Main -Djava.util.logging.config.file=$JVB_HOME/lib/logging.properties -Dnet.java.sip.communicator.SC_HOME_DIR_NAME=.jitsi-videobridge "

echo $JVB_HOME
/home/blablabla/Workspaces/rtc/jitsi-videobridge