Open GoogleCodeExporter opened 9 years ago
Did anyone find a solution to this
Original comment by jkard...@gmail.com
on 16 May 2012 at 4:45
same for me =(
Original comment by nonameden
on 17 May 2012 at 9:12
No one solve this problem?
Original comment by xmarc...@gmail.com
on 21 Jun 2012 at 4:59
[deleted comment]
There are packages starting with "javax" in the source code. Renaming them may
allow to compile. But it seems to be quite a tedious task.
Original comment by theedge...@gmail.com
on 14 Oct 2012 at 8:48
1. clean project
2. delete folder "bin/classes" from explorer (if using windows)
Original comment by semirxar...@gmail.com
on 5 Nov 2012 at 7:46
Hm, tried to clean and remove bin/classes, now I can compile, but I immediately
get a RuntimeException:
01-06 16:48:22.015: E/AndroidRuntime(3469): FATAL EXCEPTION: main
01-06 16:48:22.015: E/AndroidRuntime(3469): java.lang.RuntimeException: Unable
to instantiate activity
ComponentInfo{de.tinysip.sipdemo/de.tinysip.sipdemo.TinySipDemoActivity}:
java.lang.ClassNotFoundException: de.tinysip.sipdemo.TinySipDemoActivity in
loader dalvik.system.PathClassLoader[/data/app/de.tinysip.sipdemo-2.apk]
01-06 16:48:22.015: E/AndroidRuntime(3469): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1569)
01-06 16:48:22.015: E/AndroidRuntime(3469): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
01-06 16:48:22.015: E/AndroidRuntime(3469): at
android.app.ActivityThread.access$1500(ActivityThread.java:117)
01-06 16:48:22.015: E/AndroidRuntime(3469): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
01-06 16:48:22.015: E/AndroidRuntime(3469): at
android.os.Handler.dispatchMessage(Handler.java:99)
01-06 16:48:22.015: E/AndroidRuntime(3469): at
android.os.Looper.loop(Looper.java:130)
01-06 16:48:22.015: E/AndroidRuntime(3469): at
android.app.ActivityThread.main(ActivityThread.java:3683)
01-06 16:48:22.015: E/AndroidRuntime(3469): at
java.lang.reflect.Method.invokeNative(Native Method)
01-06 16:48:22.015: E/AndroidRuntime(3469): at
java.lang.reflect.Method.invoke(Method.java:507)
01-06 16:48:22.015: E/AndroidRuntime(3469): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
01-06 16:48:22.015: E/AndroidRuntime(3469): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
01-06 16:48:22.015: E/AndroidRuntime(3469): at
dalvik.system.NativeStart.main(Native Method)
01-06 16:48:22.015: E/AndroidRuntime(3469): Caused by:
java.lang.ClassNotFoundException: de.tinysip.sipdemo.TinySipDemoActivity in
loader dalvik.system.PathClassLoader[/data/app/de.tinysip.sipdemo-2.apk]
01-06 16:48:22.015: E/AndroidRuntime(3469): at
dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
01-06 16:48:22.015: E/AndroidRuntime(3469): at
java.lang.ClassLoader.loadClass(ClassLoader.java:551)
01-06 16:48:22.015: E/AndroidRuntime(3469): at
java.lang.ClassLoader.loadClass(ClassLoader.java:511)
01-06 16:48:22.015: E/AndroidRuntime(3469): at
android.app.Instrumentation.newActivity(Instrumentation.java:1021)
01-06 16:48:22.015: E/AndroidRuntime(3469): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)
01-06 16:48:22.015: E/AndroidRuntime(3469): ... 11 more
Original comment by armincom...@gmail.com
on 5 Nov 2012 at 8:20
The class not found error is due to all the classes not being included when
building the .apk, its due to the classes folder being deleted and not being
remade correctly. cleaning the project and deleting the classes folded is not
a workable solution unfortunately. The only way to get this project to work is
to repackage the JAIN library. I am trying to do that right now, but running
into problems, see issue 7
Original comment by crysi...@googlemail.com
on 12 Nov 2012 at 10:12
It is late but, I think I've managed to refactor JAIN libraries. You may want
to check this out.
Original comment by alim.gok...@gmail.com
on 27 May 2013 at 8:37
Attachments:
Hi, thank you for the modified Version, this one finally compiles and starts
correctly. As soon as I find some time, I will test it for good! Thanks again!
Original comment by armincom...@gmail.com
on 27 May 2013 at 11:31
I didn't test it with making calls, because I've given up after I find out that
it is not a tiny task to add RTP support. I am looking for other libraries
right now.
I hope my version is useful for anyone
Original comment by alim.gok...@gmail.com
on 27 May 2013 at 1:40
Did anyone find a solution to this
Original comment by shak...@adodis.com
on 13 Mar 2014 at 5:24
I finally managed to make this project run. As someone said here, the
"Conversion to Dalvik format failed with error 1" issue is caused because the
built-in android sip stack (which is not reliable) was built using JAIN-SIP so
classnames collide. To solve this problem we need to rename the packages. I did
the following steps:
1) Using eclipse's refactor -> rename feature, I renamed all javax.* packages
to android.javax.* and gov.nist.* to android.gov.nist.*. To do this check the
first two options ("Update references" and "Rename subpackages") but don't
check the third option ("Update textual occurrences in comments and strings
(forces preview)") because this can introduce more problems.
After this you will be able to run the project but you will get a
NullPointerException, the problem stated in issue #7. This happens because we
still need some renaming (so the reflection in JAIN-SIP works) and the
SipManager's constructor has a try/catch block that hides the problem and does
not initialize its class members correctly due to the exception (which I think
was a bad desing). To debug the problem I printed the stack trace inside the
catch block . The other steps are:
2) Inside SipMessageHandler's constructor you need to call setPathName in the
SipFactory instance:
// Create SipFactory
SipFactory sipFactory = SipFactory.getInstance();
sipFactory.setPathName("android.gov.nist");
3) After this you will have another exception complaining that
org.apache.log4j.Logger was not found. This happens because this project is old
and still uses a folder called assets to store the libraries. Rename the folder
assets to libs (I suggest removing all libraries from the build path before
doing this to avoid problems).
4) Inside SipStackImpl's constructor rename the default path for the router:
/** Retrieve the router path */
String routerPath = configurationProperties.getProperty("javax.sip.ROUTER_PATH");
if (routerPath == null)
routerPath = "android.gov.nist.javax.sip.stack.DefaultRouter";
A better way to do this and not change the JAIN-SIP is to set the property
inside SipMessageHandler's constructor:
// Create unique name properties for SipStack
Properties properties = new Properties();
properties.setProperty("javax.sip.STACK_NAME", "tinysip");
properties.setProperty("javax.sip.ROUTER_PATH", "android.gov.nist.javax.sip.stack.DefaultRouter");
These are all the necessary steps.
Another option is to use JAIN-SIP as a 3rd party library
https://jsip.java.net/
The renaming for Android is already available in the section "Android builds".
I don't know why de-tiny-sip included JAIN-SIP as its source instead of using
it as a jar. For this option (which is quicker) do the following steps:
1) Remove the folders gov and javax from src and add "android-sip-stack.jar" to
the libs folder (Do step 3 of the other solution, that is, rename assets to
libs)
2) Update the imports to android.* (Just check the errors eclipse will point
out)
3) Update the STACK_NAME property inside SipMessageHandler's constructor to use
the android prefix:
// Create unique name properties for SipStack
Properties properties = new Properties();
properties.setProperty("android.javax.sip.STACK_NAME", "tinysip");
4) Do step 2 of the other solution (setPathName)
That's it. The advantage of this approach is that we use the newest JAIN-SIP
implementation.
Unfortunately, either way the final result is not so good. First, in fact issue
#1 happens. And second, I was able to make calls only to locally registered
accounts (e.g. something@192.168.14.1). If I try an account with a domain name
(e.g. something@ekiga.net) the application gets stuck. So far I could conclude
that the STUN discovery works but the app gets stuck when trying to create a
SipManager instance. Console keeps showing messages like this:
11-14 12:08:46.709: D/dalvikvm(2357): GC_FOR_ALLOC freed 510K, 18% free
3032K/3656K, paused 17ms, total 17ms
If somebody is able to solve this problem, please share. I hope this helps.
Regards.
Original comment by diego.cd...@gmail.com
on 14 Nov 2014 at 6:41
Original issue reported on code.google.com by
armincom...@gmail.com
on 30 Mar 2012 at 9:17