Thread: Re: [Asterisk-java-devel] [Asterisk-java-users] I cannot start to using asterisk-java.
Brought to you by:
srt
From: Martin S. <ma...@be...> - 2008-07-24 04:44:46
|
It sounds like we may need some reading material on CLASSPATH issues so that more users can handle this issue. It might even be advisable to make the default mapping strategy something like a simple class that just stores a simple Map of String -> Class. If you're having issues (like this one, but not only this one) we'd welcome any contributions to the FAQ to help resolve them. Opinions on changing the default mapping strategy? FAQ contributions? Thanks folks, Martin -----Original Message----- From: ast...@li... on behalf of Mario Lenis Sent: Wed 7/23/2008 10:39 AM To: ast...@li... Subject: Re: [Asterisk-java-users] I cannot start to using asterisk-java. Hi Alejandro. Right now I'm at the same point where you were, I had test most of the things related in this post .. but non of them had work for me, can you give a hand with this since you could resolve it. Suggested problem: INFO org.asteriskjava.fastagi.ResourceBundleMappingStrategy - Resource bundle 'fastagi-mapping' not found. My CLASSPATH output is .:/root/JAVAKerberus mm Rest of information what you may need is at the post in another message. Thanks in advance. Mario. Alejandro Fernandez-7 wrote: > > Dear pal mail list: > > I'm trying to develop an IVR using asterisk-java, but I can't start using > it. > > First, I'm trying to implement your examples and this is driving me nut. > > I use jdk 1.6 under Linux. I compile HelloAgiScript without problems. > > In my extensions.conf: > > > exten => 100,n,Agi(agi://127.0.0.1:4573/HelloAgiScript) > I put directly the name of the class istead hello.agi > > > Under /home/qualium1 I have: > > asterisk-java.jar > commons-net-1.4.1.jar > fastagi-mapping.properties > HelloAgiScript.class > HelloAgiScript.java > log4j-1.2.14.jar > log4j.properties > start_server.sh > > > My CLASSPATH: > > > /home2/qualium1/HelloAgiScript.class:/home2/qualium1/fastagi- > mapping.properties:/home2/qualium1/HelloAgiScript.class:/home2/qualium1/perfil.properties:/usr/local/jdk1.6.0_05/jre/lib/ext/fastagi-mapping.properties::/usr/local/jdk1.6.0_05/jre/lib/ext:/usr/local/jdk1.6.0_05/lib:/usr/local/jdk1.6.0_05/jre/lib > > > I run the server as: > java -cp asterisk-java.jar:. org.asteriskjava.fastagi.DefaultAgiServer > > And it reply: > > 0 2008-03-23 12:08:47,222 [main] INFO > org.asteriskjava.fastagi.DefaultAgiServer - Thread pool started. > 60 2008-03-23 12:08:47,282 [main] INFO > org.asteriskjava.fastagi.DefaultAgiServer - Listening on *:4573. > > > When I call to extension 100 on the console I can see: > > > 71781 2008-03-23 12:09:59,003 [main] INFO > org.asteriskjava.fastagi.DefaultAgiServer - Received connection from > /127.0.0.1 > 71860 2008-03-23 12:09:59,082 [Asterisk-Java DaemonPool-1-thread-1] INFO > org.asteriskjava.fastagi.ResourceBundleMappingStrategy - Resource bundle > 'fastagi-mapping' not found. > 71861 2008-03-23 12:09:59,083 [Asterisk-Java DaemonPool-1-thread-1] ERROR > org.asteriskjava.fastagi.AbstractMappingStrategy - Unable to create > AgiScript instance of type HelloAgiScript: Class not found, make sure the > class exists and is available on the CLASSPATH > 71862 2008-03-23 12:09:59,084 [Asterisk-Java DaemonPool-1-thread-1] ERROR > org.asteriskjava.fastagi.internal.AgiConnectionHandler - No script > configured for URL 'agi://127.0.0.1:4573/HelloAgiScript' (script > 'HelloAgiScript') > > I read lots of mail from mailing list, but I cannot figure it up what's > wrong. > > Can you put some ligth? > > TIA > > -- > Lic. Alejandro Fernández Herrero > Product Manager > www.all-control.com.ar > > ------------------------------------------------------------------------- > 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 > > -- View this message in context: http://www.nabble.com/I-cannot-start-to-using-asterisk-java.-tp16236941p18612184.html Sent from the Asterisk-Java Users mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Asterisk-java-users mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Stefan R. <ste...@re...> - 2008-07-24 17:11:58
Attachments:
signature.asc
|
I am a bit surprised that our target group has so many problems with basic Java concepts like class loading. The default mapping strategy already supports using either the properties file or passing using the class name as agi script, so even without a mapping file agi URLs like agi://localhost/HelloAgi or (with packages) agi://localhost/com.example.HelloAgi will work. Maybe we can just change the tutorial to use that and stop promoting the use of the mapping file. Do you think that would help? =Stefan Martin Smith wrote: > It sounds like we may need some reading material on CLASSPATH issues > so that more users can handle this issue. It might even be advisable > to make the default mapping strategy something like a simple class > that just stores a simple Map of String -> Class. If you're having > issues (like this one, but not only this one) we'd welcome any > contributions to the FAQ to help resolve them. Opinions on changing > the default mapping strategy? FAQ contributions? > > Thanks folks, > > Martin -- reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: ste...@re... Jabber: ste...@re... WWW: http://www.reucon.com Steuernummern 215/5140/1791 USt-IdNr. DE220701760 |
From: T. L. P. T. <tom...@gm...> - 2008-07-24 17:47:31
|
On Thu, Jul 24, 2008 at 2:11 PM, Stefan Reuter <ste...@re...> wrote: > I am a bit surprised that our target group has so many problems with > basic Java concepts like class loading. > The default mapping strategy already supports using either the > properties file or passing using the class name as agi script, so even > without a mapping file agi URLs like > agi://localhost/HelloAgi or (with packages) > agi://localhost/com.example.HelloAgi will work. > Maybe we can just change the tutorial to use that and stop promoting the > use of the mapping file. > > Do you think that would help? Personally, including a "less advanced Java" approach in the tutorial could be a good idea. Even that the concept of .properties files is a powerfull and flexible one, could result a little strange for the Java newbie. Maybe we could update the tutorial with a more direct approach ( how to map and AGI URL to a Class or package name) and leave the .property file for the advanced Java developer. That would reduce the number of headches when running your "Hello world!" AGI application. Best regards, Tomás. > > > =Stefan > > Martin Smith wrote: > > It sounds like we may need some reading material on CLASSPATH issues > > so that more users can handle this issue. It might even be advisable > > to make the default mapping strategy something like a simple class > > that just stores a simple Map of String -> Class. If you're having > > issues (like this one, but not only this one) we'd welcome any > > contributions to the FAQ to help resolve them. Opinions on changing > > the default mapping strategy? FAQ contributions? > > > > Thanks folks, > > > > Martin > > > -- > reuter network consulting > Neusser Str. 110 > 50760 Koeln > Germany > Telefon: +49 221 1305699-0 > Telefax: +49 221 1305699-90 > E-Mail: ste...@re... > Jabber: ste...@re... > WWW: http://www.reucon.com > > Steuernummern 215/5140/1791 USt-IdNr. DE220701760 > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Asterisk-java-devel mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-devel > > |
From: Stefan R. <ste...@re...> - 2008-07-31 19:36:18
Attachments:
signature.asc
|
Hi devs, Another thing i've fixed today are classpath issues that arise when the asterisk-java jar is put in $JAVA_HOME/lib/ext. The implementation up to 0.3.1 uses the classloader that loaded the Asterisk-Java classes (in that case the extension classloader) to search for the mapping file and AGI script classes. For 1.0.0 Asterisk-Java will use the context classpath of the current Thread (which should be the system classpath), so Asterisk-Java's AGIServer will also work when the jar file is put into $JAVA_HOME/lib/ext. I've not yet tested the change, so it would be great if somebody would like to verify this. =Stefan |