Jitsi-videobridge Local setup

Hello Team,

I am trying to do a local development setup to play around jitsi-meet. The front-end part is very clear & I am able to run it without any problem. I also want to host the backend & play with the codebase. Here are my questions,

  1. I guess https://github.com/jitsi/jitsi-videobridge - this repository is meant for the JAVA backend. Please correct me if I am wrong.

  2. I have followed the maven clean package command to successfully build the project. But maven exec is throwing the below error.

It would be great if someone guides me in these aspects. Thank you guys in advance.

java.lang.Exception: The specified mainClass doesn’t contain a main method with appropriate signature.
at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:258)
at java.lang.Thread.run (Thread.java:748)
Caused by: java.lang.IllegalAccessException: no such method: org.jitsi.videobridge.Main.main(String)void/invokeStatic
at java.lang.invoke.MemberName.makeAccessException (MemberName.java:867)
at java.lang.invoke.MemberName$Factory.resolveOrFail (MemberName.java:1003)
at java.lang.invoke.MethodHandles$Lookup.resolveOrFail (MethodHandles.java:1386)
at java.lang.invoke.MethodHandles$Lookup.findStatic (MethodHandles.java:780)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:251)
at java.lang.Thread.run (Thread.java:748)
Caused by: java.lang.NoClassDefFoundError: org/jitsi/meet/OSGiBundleConfig
at java.lang.invoke.MethodHandleNatives.resolve (Native Method)
at java.lang.invoke.MemberName$Factory.resolve (MemberName.java:975)
at java.lang.invoke.MemberName$Factory.resolveOrFail (MemberName.java:1000)
at java.lang.invoke.MethodHandles$Lookup.resolveOrFail (MethodHandles.java:1386)
at java.lang.invoke.MethodHandles$Lookup.findStatic (MethodHandles.java:780)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:251)
at java.lang.Thread.run (Thread.java:748)
Caused by: java.lang.ClassNotFoundException: org.jitsi.meet.OSGiBundleConfig
at java.net.URLClassLoader.findClass (URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass (ClassLoader.java:418)
at java.lang.ClassLoader.loadClass (ClassLoader.java:351)
at java.lang.invoke.MethodHandleNatives.resolve (Native Method)
at java.lang.invoke.MemberName$Factory.resolve (MemberName.java:975)
at java.lang.invoke.MemberName$Factory.resolveOrFail (MemberName.java:1000)
at java.lang.invoke.MethodHandles$Lookup.resolveOrFail (MethodHandles.java:1386)
at java.lang.invoke.MethodHandles$Lookup.findStatic (MethodHandles.java:780)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:251)
at java.lang.Thread.run (Thread.java:748)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for jvb-parent 2.1-SNAPSHOT:
[INFO]
[INFO] jvb-parent … FAILURE [ 0.274 s]
[INFO] jvb-api-parent … SKIPPED
[INFO] jvb-api-common … SKIPPED
[INFO] jvb-api-client … SKIPPED
[INFO] jvb-api-server … SKIPPED
[INFO] jitsi-videobridge … SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.553 s
[INFO] Finished at: 2020-06-18T20:05:09+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.0.0:java (default-cli) on project jvb-parent: An exception occured while executing the Java class. The specified mainClass doesn’t contain a main method with appropriate signature.: no such method: org.jitsi.videobridge.Main.main(String)void/invokeStatic: org/jitsi/meet/OSGiBundleConfig: org.jitsi.meet.OSGiBundleConfig -> [Help 1]

1 Like

I have the same problem, did you solve it ?

Facing same problem

Error: Unable to initialize main class org.jitsi.videobridge.Main
Caused by: java.lang.NoClassDefFoundError: org/jitsi/meet/OSGiBundleConfig

What version of Java are you using?

Hi @Freddie
I am using java version 1.8.
openjdk version “1.8.0_275”

Looking for a procedure to compile and run video-bridge2 from source code.

Steps I have followed
Method 1:

git clone https://github.com/jitsi/jitsi-videobridge.git

export JVB_HOME=$PWD/jvb

mvn compile exec:exec -Dexec.executable=java -Dexec.args="-cp %classpath org.jitsi.videobridge.MainKt -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"

This command fails with following error:

Error: Could not find or load main class org.jitsi.videobridge.MainKt

Method2 (Based on community comments):
Run below command in the cloned directory

git clone https://github.com/JonathanLennox/jitsi-videobridge.git

mvn clean package -DskipTests -Dassembly.skipAssembly=false
This gave build success.
[INFO] jvb-parent … SUCCESS [ 0.238 s]
[INFO] jvb-api-parent … SUCCESS [ 0.002 s]
[INFO] jvb-api-common … SUCCESS [ 5.092 s]
[INFO] jvb-api-client … SUCCESS [ 2.123 s]
[INFO] jitsi-videobridge … SUCCESS [ 14.289 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS

then when try to run jvb.sh getting following error

./jvb.sh --host=localhost --domain=jitsi.example.com --port=5347 --secret=123111
Got below error
Error: Could not find or load main class org.jitsi.videobridge.Main

Then added CLASSPATH inside jvb.sh

cp=$SCRIPT_DIR/jitsi-videobridge.jar:$SCRIPT_DIR/lib/*:/root/j1/jitsi-videobridge/jvb/target/classes/

After that getting stuck with below error

Exception in thread “main” java.lang.NoClassDefFoundError: org/jitsi/meet/OSGiBundleConfig

This class file is not present in the system