Re: [Asterisk-java-users] classpath not found error
Brought to you by:
srt
From: Gopal k. <gop...@pe...> - 2008-01-25 08:12:37
|
Hi Martin / William, 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. Thank you very much for your help. On Jan 24, 2008 8:40 PM, Martin Smith <ma...@be...> wrote: > Manager != Agi. A manager program cannot be an agi script. They are > totally distinct ways of interacting with Asterisk (right now, anyway). > > You cannot call a manager script through AGI; Manager scripts are event > driven, and require a main method to setup an event processing loop. > > 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. > > Let us know if you're still stuck. > > > Martin Smith, Systems Developer > ma...@be... > Bureau of Economic and Business Research > University of Florida > (352) 392-0171 Ext. 221 > > > ------------------------------ > *From:* ast...@li... [mailto: > ast...@li...] *On Behalf Of *Gopal > krishnan > *Sent:* Thursday, January 24, 2008 12:31 AM > *To:* ast...@li... > *Subject:* Re: [Asterisk-java-users] classpath not found error > > Hi Martin / William, > > thanks for the reply. > The example "Public class HelloAgiScript extends BaseAgiScript" is > working fine and we are getting the output in the command line > "$ java -cp asterisk-java.jar: . org.asteriskjava.fastagi.DefaultAgiServer > " > by initiating the call with "exten => > 1300,1,Agi(agi://localhost/hello.agi)" > > For the manager script I am initiating the Java program like this > "exten => 1300,1,Agi(agi://localhost/hello.agi)" and in the command line > interface we are getting the error > > "Error: SEVERE: Unable to create AgiScript instance of type > HelloManager: Class does not implement the AgiScript interface" > > Since we tested both examples given in the site > http://asterisk-java.org/development/tutorial.html HelloManager and > HelloEvent > > I think that I need to run the manager script in different manner, since > we need to login in Asterisk console. > > Please let me know how I need to run the manager script. > > On Jan 23, 2008 9:49 PM, Martin Smith <ma...@be...> wrote: > > > Does your Hello class extend the Base class or implement the correct > > interface? > > > > The example has: "public class HelloAgiScript extends BaseAgiScript" > > > > Does yours? If yes, can we see it? Also, how do you run the Manager > > script? > > > > Your error: "Error: SEVERE: Unable to create AgiScript instance of type > > HelloManager: Class does not implement the AgiScript interface" > > > > Like the tutorial says, you should be using a command line for the Agi > > script like: > > $ java -cp asterisk-java.jar:. org.asteriskjava.fastagi.DefaultAgiServer > > > > AND for the Manager one, with a main method of your own design. > > > > Please give us more information. > > > > > > Martin Smith, Systems Developer > > ma...@be... > > Bureau of Economic and Business Research > > University of Florida > > (352) 392-0171 Ext. 221 > > > > > > > > > > ________________________________ > > > > From: ast...@li... > > [mailto:ast...@li... ] On Behalf Of > > Gopal krishnan > > Sent: Wednesday, January 23, 2008 7:41 AM > > To: ast...@li... > > Subject: [Asterisk-java-users] classpath not found error > > > > > > Hi, > > > > I am using asteriskjava 0.3.1, when I tried the HelloAgi > > example in the url http://asterisk-java.org/development/tutorial.html it > > was working fine, in the same page Manager API programs are there, > > HelloManager, HelloEvents, I tried both of them, but i am getting the > > following error in fastagi console, > > > > Error: > > SEVERE: Unable to create AgiScript instance of type > > HelloManager: Class > > does not implement the AgiScript interface > > Jan 23, 2008 4:13:24 PM > > org.asteriskjava.fastagi.AbstractMappingStrategy > > createA giScriptInstance > > SEVERE: Unable to create AgiScript instance of type hello.agi: > > Class not > > found, make sure the class exists and is available on the > > CLASSPATH > > Jan 23, 2008 4:13:24 PM > > org.asteriskjava.fastagi.internal.AgiConnectionHandler r un > > SEVERE: No script configured for URL > > 'agi://localhost/hello.agi?user=5101' > > (scri pt 'hello.agi') > > > > Can you please help me on this. > > > > -- > > Thank you with regards, > > Gopal, > > PeopleTech Systems Private Limited > > www.peopletech.co.in > > > > > > ------------------------------------------------------------------------- > > > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > _______________________________________________ > > Asterisk-java-users mailing list > > Ast...@li... > > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > > -- > Thank you with regards, > Gopal, > PeopleTech Systems Private Limited > www.peopletech.co.in > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > -- Thank you with regards, Gopal, PeopleTech Systems Private Limited www.peopletech.co.in |