[Freeswitch-users] Question about usage of mod_java

damjan at ecntelecoms.com damjan at ecntelecoms.com
Sun Nov 9 21:18:35 PST 2008


>
>  Hi,I've been testing the usage of mod_java and reading Freeswitch
> documentation but been having some problems which I think might even be
> something very simple which I've missed. Hope some could give a
> hint..mod_java installation has gone through successfully and mod_java.so
> is compiled and installed. Configuration files java.conf.xml and dialplan
> are configured as instructed in
> http://wiki.freeswitch.org/wiki/JavaCompilation of the Java example in
> the same page is successful (CLASSPATH included freeswtich.jar of
> course). Problem comes when I try to initiate the script via dialplan -
> that is I'm trying to make a call to an extension which then calls this
> example script (dialplan says: <action application="java" data="PhoneTest
> arg1 arg2 arg3"/>).

Either use:

<action application="java" data="package.PhoneTest arg1 arg2"/>

where package.PhoneTest is in the classpath in java.conf.xml, or else use:

<action application="java" data="/path/to/file.jar
fully.qualified.class.name arg1 arg2"/>

which will look in a specific jar file instead of the classpath.

> Error message gives me:Exception in thread "Thread-1"
> java.lang.ClassNotFoundException: /usr/local/freeswitch/scripts/PhoneTest
>        at java.lang.Class.forName0(Native Method)        at
> java.lang.Class.forName(Class.java:242)        at
> org.freeswitch.Launcher.launch(Launcher.java:65)I presume this means that
> the script is called invalid manner? I've been trying to call the
> PhoneTest with full path, locating it together with freeswitch.jar,
> creating a directory PhoneTest just name it.Documentation does not say if
> the Java binary needs to be in certain location or not - is there
> amandatory location for it? What else am I doing wrong?      Nic <br />
>
> Chat online and in real-time with friends and family! Windows Live
> Messenger
> _________________________________________________________________
> Easily publish your photos to your Spaces with Photo Gallery.
> http://get.live.com/photogallery/overview_______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>


Bye
Damjan






More information about the FreeSWITCH-users mailing list