Re: [Asterisk-java-users] classpath not found error
Brought to you by:
srt
From: <dwi...@aa...> - 2008-01-27 01:00:10
|
<html><body>Gopal,<br><br>Look man, you'd be saving everyone alot of time and headache if you would just post the code<br>as it is in the file.<br><br>It is alot easier to fix things if we see how you have it.. not just your reference to the example on the website.<br><br>Best Regards,<br>Danny Williams JR<br>Act As One Technologies.<br><br><br> <blockquote webmail="1" style="border-left: 2px solid blue; margin-left: 8px; padding-left: 8px;"> -------- Original Message --------<br> Subject: Re: [Asterisk-java-users] classpath not found error<br> From: "Gopal krishnan" <gop...@pe...><br> Date: Fri, January 25, 2008 1:12 am<br> To: ast...@li...<br> <br> Hi Martin / William,<br><br> The code is working by initiating the program with the java -classpath command with the root path of the java program. So thanks for your updates. I will get back to you with customized code if any error i am facing. <br> <br> Thank you very much for your help.<br><br><div class="gmail_quote">On Jan 24, 2008 8:40 PM, Martin Smith <<a href="mailto:ma...@be..." target="_blank" _onclick="Popup.composeWindow('pcompose.php?sendto=martins%40bebr.ufl.edu');; return false;">ma...@be...</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div> <div dir="ltr" align="left"><span><font face="Arial" size="2">Manager != Agi. A manager program cannot be an agi script. They are totally distinct ways of interacting with Asterisk (right now, anyway).</font></span></div> <div dir="ltr" align="left"><span><font face="Arial" size="2"></font></span> </div> <div dir="ltr" align="left"><span><font face="Arial" size="2">You cannot call a manager script through AGI; Manager scripts are event driven, and require a main method to setup an event processing loop.</font></span></div> <div dir="ltr" align="left"><span><font face="Arial" size="2"></font></span> </div> <div dir="ltr" align="left"><span><font face="Arial" size="2">The example of a manager script clearly contains a main() method and is not initiated from AGI. Please re-check the manager example and make a main method. Manager script connections to Asterisk are initiated BY the manager script, and AGI script connections to Asterisk are initiated BY the dialplan inside Asterisk.</font></span></div> <div dir="ltr" align="left"><span><font face="Arial" size="2"></font></span> </div> <div dir="ltr" align="left"><span><font face="Arial" size="2">Let us know if you're still stuck.</font></span></div><div class="Ih2E3d"> <div> </div> <div align="left"><font size="2">Martin Smith, Systems Developer<br><a href="mailto:ma...@be..." _onclick="Popup.composeWindow('pcompose.php?sendto=martins%40bebr.ufl.edu');; return false;" target="_blank">ma...@be...</a><br>Bureau of Economic and Business Research<br>University of Florida<br>(352) 392-0171 Ext. 221</font> </div> <div> </div><br> </div><blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-left: 5px; margin-left: 5px; margin-right: 0px;"> <div dir="ltr" align="left" lang="en-us"> <hr> <font face="Tahoma" size="2"><div class="Ih2E3d"><b>From:</b> <a href="mailto:ast...@li..." _onclick="Popup.composeWindow('pcompose.php?sendto=asterisk-java-users-bounces%40lists.sourceforge.net');; return false;" target="_blank">ast...@li...</a> [mailto:<a href="mailto:ast...@li..." _onclick="Popup.composeWindow('pcompose.php?sendto=asterisk-java-users-bounces%40lists.sourceforge.net');; return false;" target="_blank">ast...@li...</a>] <b>On Behalf Of </b>Gopal krishnan<br></div><b>Sent:</b> Thursday, January 24, 2008 12:31 AM<div class="Ih2E3d"><br><b>To:</b> <a href="mailto:ast...@li..." _onclick="Popup.composeWindow('pcompose.php?sendto=asterisk-java-users%40lists.sourceforge.net');; return false;" target="_blank">ast...@li...</a><br></div><b>Subject:</b> Re: [Asterisk-java-users] classpath not found error<br></font><br></div><div><div></div><div class="Wj3C7c"> <div></div>Hi Martin / William,<br><br> thanks for the reply.<br> The example "Public class HelloAgiScript extends BaseAgiScript" is working fine and we are getting the output in the command line <br>"$ java -cp asterisk-java.jar: . org.asteriskjava.fastagi.DefaultAgiServer"<br> by initiating the call with "exten => 1300,1,Agi(agi://localhost/hello.agi)"<br><br> For the manager script I am initiating the Java program like this<br>"exten => 1300,1,Agi(agi://localhost/hello.agi)" and in the command line interface we are getting the error<br><br>"Error: SEVERE: Unable to create AgiScript instance of type<br>HelloManager: Class does not implement the AgiScript interface" <br><br>Since we tested both examples given in the site <a href="http://asterisk-java.org/development/tutorial.html" target="_blank">http://asterisk-java.org/development/tutorial.html</a> HelloManager and HelloEvent<br><br> I think that I need to run the manager script in different manner, since we need to login in Asterisk console. <br><br> Please let me know how I need to run the manager script.<br><br> <div class="gmail_quote">On Jan 23, 2008 9:49 PM, Martin Smith <<a href="mailto:ma...@be..." _onclick="Popup.composeWindow('pcompose.php?sendto=martins%40bebr.ufl.edu');; return false;" target="_blank">ma...@be...</a>> wrote:<br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Does your Hello class extend the Base class or implement the correct<br>interface?<br><br>The example has: "public class HelloAgiScript extends BaseAgiScript"<br><br>Does yours? If yes, can we see it? Also, how do you run the Manager <br>script?<br><br>Your error: "Error: SEVERE: Unable to create AgiScript instance of type<br> <div>HelloManager: Class does not implement the AgiScript interface"<br><br></div>Like the tutorial says, you should be using a command line for the Agi <br>script like:<br>$ java -cp asterisk-java.jar:. org.asteriskjava.fastagi.DefaultAgiServer<br><br>AND for the Manager one, with a main method of your own design.<br><br>Please give us more information.<br><br><br>Martin Smith, Systems Developer <br><a href="mailto:ma...@be..." _onclick="Popup.composeWindow('pcompose.php?sendto=martins%40bebr.ufl.edu');; return false;" target="_blank">ma...@be...</a><br>Bureau of Economic and Business Research<br>University of Florida<br>(352) 392-0171 Ext. 221<br><br><br><br><br>________________________________<br><br> From: <a href="mailto:ast...@li..." _onclick="Popup.composeWindow('pcompose.php?sendto=asterisk-java-users-bounces%40lists.sourceforge.net');; return false;" target="_blank">ast...@li...</a><br>[mailto:<a href="mailto:ast...@li..." _onclick="Popup.composeWindow('pcompose.php?sendto=asterisk-java-users-bounces%40lists.sourceforge.net');; return false;" target="_blank">ast...@li... </a>] On Behalf Of<br>Gopal krishnan<br> Sent: Wednesday, January 23, 2008 7:41 AM<br> <div> To: <a href="mailto:ast...@li..." _onclick="Popup.composeWindow('pcompose.php?sendto=asterisk-java-users%40lists.sourceforge.net');; return false;" target="_blank">ast...@li... </a><br></div> <div> Subject: [Asterisk-java-users] classpath not found error<br><br><br></div> <div> <div></div> <div> Hi,<br><br> I am using asteriskjava 0.3.1, when I tried the HelloAgi <br>example in the url <a href="http://asterisk-java.org/development/tutorial.html" target="_blank">http://asterisk-java.org/development/tutorial.html</a> it<br>was working fine, in the same page Manager API programs are there, <br>HelloManager, HelloEvents, I tried both of them, but i am getting the<br>following error in fastagi console,<br><br> Error:<br> SEVERE: Unable to create AgiScript instance of type<br>HelloManager: Class<br> does not implement the AgiScript interface<br> Jan 23, 2008 4:13:24 PM<br>org.asteriskjava.fastagi.AbstractMappingStrategy<br> createA giScriptInstance<br> SEVERE: Unable to create AgiScript instance of type hello.agi:<br>Class not<br> found, make sure the class exists and is available on the<br>CLASSPATH<br> Jan 23, 2008 4:13:24 PM<br> org.asteriskjava.fastagi.internal.AgiConnectionHandler r un<br> SEVERE: No script configured for URL <br>'agi://localhost/hello.agi?user=5101'<br> (scri pt 'hello.agi')<br><br> Can you please help me on this.<br><br> --<br> Thank you with regards,<br> Gopal,<br> PeopleTech Systems Private Limited <br> <a href="http://www.peopletech.co.in" target="_blank">www.peopletech.co.in</a><br><br><br></div></div> <div> <div></div> <div>------------------------------------------------------------------------- <br>This SF.net email is sponsored by: Microsoft<br>Defy all challenges. Microsoft(R) Visual Studio 2008.<br><a href="http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/" target="_blank">http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ </a><br>_______________________________________________<br>Asterisk-java-users mailing list<br><a href="mailto:Ast...@li..." _onclick="Popup.composeWindow('pcompose.php?sendto=Asterisk-java-users%40lists.sourceforge.net');; return false;" target="_blank">Ast...@li...</a><br><a href="https://lists.sourceforge.net/lists/listinfo/asterisk-java-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/asterisk-java-users</a><br> </div></div></blockquote></div><br><br clear="all"><br>-- <br>Thank you with regards,<br>Gopal,<br>PeopleTech Systems Private Limited<br><a href="http://www.peopletech.co.in" target="_blank">www.peopletech.co.in</a> </div></div></blockquote></div> <br>-------------------------------------------------------------------------<br>This SF.net email is sponsored by: Microsoft<br>Defy all challenges. Microsoft(R) Visual Studio 2008.<br><a href="http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/" target="_blank">http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/</a><br> _______________________________________________<br>Asterisk-java-users mailing list<br><a href="mailto:Ast...@li..." target="_blank" _onclick="Popup.composeWindow('pcompose.php?sendto=Asterisk-java-users%40lists.sourceforge.net');; return false;">Ast...@li...</a><br><a href="https://lists.sourceforge.net/lists/listinfo/asterisk-java-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/asterisk-java-users</a><br> <br></blockquote></div><br><br clear="all"><br>-- <br>Thank you with regards,<br>Gopal,<br>PeopleTech Systems Private Limited<br><a href="http://www.peopletech.co.in" target="_blank">www.peopletech.co.in</a> <hr>-------------------------------------------------------------------------<br> This SF.net email is sponsored by: Microsoft<br> Defy all challenges. Microsoft(R) Visual Studio 2008.<br> <a href="http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/" target="_blank">http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/</a><hr>_______________________________________________<br> Asterisk-java-users mailing list<br> <a href="http://email.secureserver.net/pcompose.php#Compose" onclick="Popup.composeWindow('pcompose.php?sendto=Asterisk-java-users%40lists.sourceforge.net'); return false;">Asterisk-java-users<b></b>@lists.sourceforge.net</a><br> <a href="https://lists.sourceforge.net/lists/listinfo/asterisk-java-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/asterisk-java-users</a><br> </blockquote></body></html> |