Getting the below error when trying to initiate call.
<SIP/xx.xxx.xxx.xx-00000000>AGI Rx << VERBOSE "No script configured for URL 'AGI://localhost/xxx.agi' (script 'xxx.agi')" 1
Can anyone help me to resolve this error.
Thanks
This is already old, but still i got stucked yesterday with same issue, and found the solution.
A lot of people saying about the classpath where your properties file should be, and they are right.
As long as you running the asterisk jar in terms to run the test script, it doesn't have the properties file inside with YOUR script pointed there. So you need to direct it.
Try to use this command, but modify it with your path:
java -cp /home/your user/folder with project/src/main/java/:/home/your user/folder with jar file placed/asterisk-java-2.0.2.jar org.asteriskjava.fastagi.DefaultAgiServer
org.asteriskjava.fastagi.DefaultAgiServer - this is the path which you use to run a server. Even if you will write something like:
java -jar asterisk-java-2.0.2.jar
it will call the DefaultAgiServer anyway.
So my point is, that the classpath here is a keyword, and command above will solve this problem for sure =)
UPD: Although it fix the issue with classpath of .properties file, that doesn't mean that it will solve this problem, in case if your script placed in additional packages =)
If path to your script is something like
com.yourcompany.yourpackage.YourScript
that mean that you need write down the same thing in a properties. Something like:
hello.agi = com.yourcompany.yourpackage.YourScript
Hope this will help somebody ;)
This error is writed by your java code. See java code for more info about how to do call. Most likly need do something like
AGI://localhost/xxx.agi?function=func
Related
Struggling to create a desktop shortcut for a jar file.
Found a solution which created a .url file aka
[InternetShortcut]
URL=D:/test.jar
which worked pretty well. But then the stakes went higher and now i need to run in from a certain JRE. Basically, what i'w tried, was to fix the URL to %javapath%/java.exe -jre d:/test.jar, but Win7 started to treat it as a web-url, adding a "http://" at the start of the url when looking through file properties.
Is there a way to make this work? Or maybe a freeware library that can create urls in a more graceful way?
Upd: Finally struck on an answer(and yes, i found in on stockoverflow) - Creating a shortcut file from Java
If someone gets here, looking for the answer:
ShellLink sl = ShellLink.createLink("C:/Program Files (x86)/Java/jre1.8.0_121/bin/javaw.exe");
sl.setCMDArgs("-jar D:/Test1.jar");
I am trying to run the google closure compiler fuzzer, but it's asking for a config file.
In the /build/classes/ directory I run
java -cp ../compiler.jar com.google.javascript.jscomp.fuzzing.Driver --number_of_runs 5 --config
It returns
Option "--config" takes an operand
Can anyone tell me what the config is supposed to look like or where I can find it? Thanks.
Solved. There is a missing json file that will be changed soon.
I'm a java n00b, so please excuse any ignorance.
I'm trying to run a TestNG test in IntelliJ on OSX, but when I do, I get the following file not found error:
File: src/test/resources/manager/MemberTest/testCreating.csv not found.
However, when my colleagues run this on their Windows machines, the test completes and they do not get the same error. One such colleague's file was located at
D:\trunk_QA\src\test\resources\manager\MemberTest\testCreating.csv
Mine is located at
/Users/username/QA Materials/Automation/Framework/trunk_QA/src/test/resources/manager/MemberTest/testCreating.csv
The dataSourcePath seems to be correctly laid out as a relative path:
private static String dataSourcePath = "src/test/resources/";
And when run with that dataSourcePath, I get the error.
If I update it to use my local absolute path:
private static String dataSourcePath = "/Users/username/QA Materials/Automation/Framework/trunk_QA/src/test/resources/";
The test then passes. However, I can't check this in because outside of being a poor practice to use absolute links, it will break the test on my coworkers' machines.
What am I doing wrong? Do I need to define a system variable such as CLASSPATH?
To begin with I would suggest using File.separator instead of slashes as they will be guaranteed to be cross-platform.
If that doesn't make it work you could try this:
System.out.println(new File(".").getCanonicalPath());
That will print the actual directory you are in. Perhaps you are not where you think you are?
I figured it out. I had to edit the working directory under Run>Edit Configurations>TestNG. When I imported the project, it set that working directory all on its own, and to the wrong thing!
The reason it wasn't printing the user.dir when the dataSourcePath was set to src/test/resources/ is that it was erroring out before it hit that chunk of code.
Overall, a pretty simple solution if you know what you're doing with setting up IntelliJ.
Thank you to everyone for your help! I learned all sorts of new stuff.
I'm a total Java noob so please understand =) I need a quick advice on how to fix the issue.
I cloned the official selenium git repo, changed the code a bit (need to dump the page into some specified dirs), and tried to rebuilt it:
./go //java/server/src/org/openqa/selenium/remote/server:server:uber //java/client/src/org/openqa/selenium:client-combined:uber
It was successful but when I tried to execute it I got this:
$ java -jar build/java/server/src/org/openqa/selenium/remote/server/server-standalone.jar
Failed to load Main-Class manifest attribute from
build/java/server/src/org/openqa/selenium/remote/server/server-standalone.jar
Tried to check classpath, CLASS_PATH and CLASSPATH env variables (as a friend of mine suggested) - I simply don't have any.
At the same time, the pre-compiled standalone server from the official downloads works out of the box.
The official docs didn't help. There's nothing about it there.
So - I need a quick advice how to compile it? Thanks.
P.S. JDK 8 (latest), Mac OS 10.7
P.P.S. That friend of mine tried to build it by himself and he was lucky - he got a new build/dist folder where the target big file was. But in my case, the build folder is created, but there's not 'dist' folder in it.
Finally found the answer: I should have built it like that:
./go clean release
it's really strange that all the docs state I need to use these long /bla/bla/:uber things to get a whole single 'uber' server.
This question was already asked here on Stack Overflow, BTW even after reading the answer provided, I do not manage to add MyOwnAnalyzer, so that I can use it directly from Luke.
Please can someone help me on the right way to do, that is how and what to do so that MyOwnAnalyzer can be usable directly from Luke?
Can I do this (it did not work, may be my included jar are incomplete?):
java -cp .;d:\java\mylibs\MyOwnAnalyzer.jar -jar lukeall-3.5.0.jar
(MyOwnAnalyzer.jar was built from Eclipse and contains : MyOwnAnalyzer.java, MyOwnTokenizer.java, and MyOwnToken.java inside a subdirectory com.MyCompany... Eclipse added META-INF and manifest.mf for me)
Maybe I am wrong in adding classpath and MyOwnAnalyzer.jar with my command line?
Or must I build Luke from source including MyOwnAnalyzer somewhere in its directory?
Or is there something else to include/write so that my analyzer can be usable and imported from Luke? (looks like there is a mechanism to detect all classes that subclasses Analyzer - MyOwnAnalyzer is already declared as "extends Analyzer" )
BTW, even if it not really the same question but still in the same topic of using a custom analyzer from Luke... si I have an Error when using the tab Analyzer Tool I get Error analyzing:com/google/common/io/CharStreams , this lib is included in a jar, where I included a main that do a sample analysis to check and everything work fine when using it alone. If I use it as explained by JPountz, from Luke, I can see MyOwnAnalyzer from all the Luke tabs, but it did not work!
from the Luke code source, I think what throw the exception this is located somewhere inside the method analyze.
Note: The call to CharStreams.toString(input); is to transform the Reader input to a String inside MyOwnTokenizer.
Java ignores the -cp option when the -jar option is also used. You need to run Luke this way:
java -cp lukeall-3.5.0.jar;MyOwnAnalyzer.jar org.getopt.luke.Luke