Developing new functionality to store call record


i’m an italian developer. Usually I write code in c# but during university studies I learn java se. Now i downloaded and open in eclipse the project and I want insert two new functionality.

  1. automatic start a registration when a call is starting
  2. send call record to ftp server

I make a new package under src and it have a and a config.json file. manipulate config.json file.

When I run project after deploy-and-run from ant it call me an error because ConfigEditor is not found.
How can I resolve it?


You are talking about Jitsi Desktop? If your answer is yes, then search the archive, there are multiple threads about it. Jitsi Desktop is OSGi based, and everything is bundles, you either didn’t integrated in a bundle or you are using it from another bundle without exporting and importing the package.


I not found it…
Today, build success but when i run project it tell me that my class is not found.

If I post code can you help me?


How can I edit code to introduce for example a line of code like:

import org.json.simple.JSONObject;
JSONObject obj = new JSONObject();

I insert this line in manifest file of package that I edited:


When I run code it give me an error:

org.osgi.framework.BundleException: Unable to resolve [138](R 138.0): missing requirement [ [138](R 138.0)] osgi.wiring.package; (osgi.wiring.package=org.json.simple.JSONObject) Unresolved requirements: [[ [138](R 138.0)] osgi.wiring.package; (osgi.wiring.package=org.json.simple.JSONObject)]
at org.apache.felix.framework.Felix.resolveBundleRevision(
at org.apache.felix.framework.Felix.startBundle(
at org.apache.felix.framework.Felix.setActiveStartLevel(
at org.apache.felix.framework.util.SecureAction.startActivator(
at org.apache.felix.framework.Felix.activateBundle(
at org.apache.felix.framework.Felix.startBundle(
at org.apache.felix.framework.Felix.setActiveStartLevel(

There is a tutorial on how to edit code? Thanks!


Is there a bundle that exports it (the json package)?
There are couple of examples here:


Is there a bundle that exports it (the json package)?
I think no…
How can achive that?


There are multiple libraries in the project, check the lib/installer-exclude folder. And see in the build.xml how it is done. If the library is already OSGi compatible its just a matter of copy the lib and start it in, if it is not, you also need to create a manifest file and re-pack the jar file before the copy operation.


I can’t run.

This is what I have or I do:
I maked manifest for the library using a wizard procedure of Eclipse and put inside lib/installer-exclude manifest file that I rename
This is the body of file:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: 1
Bundle-SymbolicName: json-simple-1.1.1
Bundle-Version: 1.0.0
Bundle-ClassPath: json-simple-1.1.1.jar
Export-Package: org.json.simple,
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Automatic-Module-Name: json-simple-1.1.1

In lib I have a file named but i not edit this.

In src\net\java\sip\communicator\impl\neomedia\ at the end of function loadValues i write this code:

String configPath = “C:\Users\pier\git\jitsi\src\itaca\solution\utils\config.json”;
Object obj = new JSONParser().parse(new FileReader(configPath));
JSONObject jo = (JSONObject) obj;
Boolean autoRecording = (Boolean) jo.get(“auto_recording”);
Map ftp = ((Map)jo.get(“ftp”));
String ftp_user = (String) ftp.get(“user”);
String ftp_password = (String) ftp.get(“password”);
String ftp_url = (String) ftp.get(“url”);
String ftp_directory = (String) ftp.get(“directory”);
catch(Exception e)

When I run project it give me this error:
Caused by: java.lang.ClassNotFoundException: org.json.simple.parser.JSONParser not found by [138]

What I miss? How can i check if a library is OSGi compatible?


Have you looked how bundles are created in build.xml, as I have suggested?

Create one for your lib and add it to the list of bundles tasks:

You should activate your new bundle in

Those steps are already described in the development documentation:


again classNotFound exception.

This is what I do. In jitsi/build.xml I write the following:

		<!-- Creates a bundle containing the json-simple-1.1.1 lib.-->
		<jar compress="false" destfile="${bundles.dest}/json-simple-1.1.1.jar"
			<zipfileset src="${lib.noinst}/json-simple-1.1.1.jar" prefix=""/>

Yet in build xml I add targetName where required:

<target name="bundles"
    bundle-history,bundle-history-slick,bundle-messagehistory, bundle-msghistory-slick,
    bundle-callhistory, bundle-callhistory-slick, bundle-popupmessagehandler-slick,

I have a question so I start to understand something. The changes you made me make in build.xml only allow to make a bundle?

jitsi/lib/ I write the following:

What’s the number 80?

Now I run “make-and-deploy” with ant, run with debug configuration like suggested in tutorial to run in Eclipse and i got classNotFound exception.


You have an error, missing \.

This is the start lavel for the bundles:


I have backslash in my code. I think when i copy and paste it was deleted.
What are we forgetting?


@damencho can you help me to solve this problem?


If you send fork with your changes, I may take a look over the weekend …


@damencho This is what i did:

  1. fork in my git hub account original repository of jitsi.
  2. create a new project that is referred to:
  3. do edit to various files
  4. right click on project -> team -> commit
  5. you can find new update project in:


How do you repro the problem, just start jitsi?

One recommendation, when pushing changes for someone to review them, do not push formatting changes as you did in build.xml:

Basically this is beyond reviewable :slight_smile:


And make sure it at least builds:

/Users/damencho/dev/tmp/jitsi/build.xml:2144: Manifest file: /Users/damencho/dev/tmp/jitsi/src/itaca/solution/utils/ does not exist.

Total time: 19 seconds


these are old bundles that I maked only for test. I forgot to delete them.

New commit is available.


And how do you repro the problem? What are the steps?


Your error is:

     [java] java.lang.NoClassDefFoundError: org/json/simple/parser/JSONParser
     [java] 	at

Just add org.json.simple.parser in neomedia manifest.

$ git diff
diff --git a/src/net/java/sip/communicator/impl/neomedia/ b/src/net/java/sip/communicator/impl/neomedia/
index 5cf537fea..228ba26c9 100644
--- a/src/net/java/sip/communicator/impl/neomedia/
+++ b/src/net/java/sip/communicator/impl/neomedia/
@@ -68,6 +68,7 @@ Import-Package: apple.awt,
+ org.json.simple.parser,