<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Thanks Klaus,<BR>
<BR>
Tried that as well, if I use a full path for PhoneTest then I get same error as earlier.<BR>
<BR>
If I call only PhoneTest without any path (/usr/local/freeswitch/scripts/freeswitch.jar PhoneTest arg1 arg2..) then I get:<BR>
<BR>
Exception in thread "Thread-2" java.lang.ClassNotFoundException: PhoneTest<BR> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)<BR> at java.security.AccessController.doPrivileged(Native Method)<BR> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)<BR> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)<BR> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)<BR> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)<BR> at java.lang.Class.forName0(Native Method)<BR> at java.lang.Class.forName(Class.java:242)<BR> at org.freeswitch.Launcher.launch(Launcher.java:65)<BR><BR>
It's a same error message if I leave the full path off from freeswitch.jar as well. There must be something what I have not understood about the documentation here..<BR>
<BR>
N<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
You might want to specify not only the class name, but also its package name as well as the jar file that contains it.<BR> <BR><action application="java" data="/path/to/file.jar fully.qualified.class.name arg1 arg2 arg3"/><BR> <BR>Klaus.<BR><BR><BR>
<HR id=stopSpelling>
From: i.mkmo@hotmail.com<BR>To: freeswitch-users@lists.freeswitch.org<BR>Subject: Question on using java_mod<BR>Date: Sun, 9 Nov 2008 21:28:23 +0800<BR><BR>
<STYLE>
.ExternalClass .EC_hmmessage P
{padding:0px;}
.ExternalClass body.EC_hmmessage
{font-size:10pt;font-family:Verdana;}
</STYLE>
Hey,<BR> <BR>I've been testing the usage of mod_java and reading Freeswitch documentation but been having some problems <BR>which I think might even be something very simple which I've missed. Hope some could give a hint..<BR>mod_java installation has gone through successfully and mod_java.so is compiled and installed. <BR> <BR>Configuration files java.conf.xml and dialplan are configured as instructed in <A href="http://wiki.freeswitch.org/wiki/Java">http://wiki.freeswitch.org/wiki/Java</A><BR><BR>Compilation of the Java example in the same page is successful (CLASSPATH included freeswtich.jar of course). <BR>Problem comes when I try to initiate the script via dialplan - that is I'm trying to make a call to an extension which <BR>then calls this example script (dialplan says: <action application="java" data="PhoneTest arg1 arg2 arg3"/>).<BR> <BR>Error message gives me:<BR> <BR>Exception in thread "Thread-1" java.lang.ClassNotFoundException: /usr/local/freeswitch/scripts/PhoneTest <BR> at java.lang.Class.forName0(Native Method) <BR> at java.lang.Class.forName(Class.java:242) <BR> at org.freeswitch.Launcher.launch(Launcher.java:65)<BR> <BR>I presume this means that the script is called invalid manner? <BR> <BR>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? <BR> <BR>My system is running in CentOS 5, Java version JDK1.5.0_16 so the unstability described in Wiki should not be a reason.<BR> <BR> Nic <BR><BR><BR>
<HR>
Enrich your blog with Windows Live Writer. <A href="http://get.live.com/writer/overview">Windows Live Writer</A><BR><br /><hr />Make the most of what you can do on your PC and the Web, just the way you want. <a href='http://www.get.live.com/wl/all' target='_new'>Windows Live</a></body>
</html>