Hi, I have a problem in my server jvoice xml ,
here it is my client_code:
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.Hashtable;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.rmi.server.UnicastRemoteObject;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NameClassPair;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import org.jvoicexml.ConnectionInformation;
import org.jvoicexml.JVoiceXml;
import org.jvoicexml.Session;
import org.jvoicexml.client.BasicConnectionInformation;
import org.jvoicexml.event.ErrorEvent; // JVoiceXML Imports from User Library
class Policy {
@SuppressWarnings("unused")
ClassLoader cl = null;
@SuppressWarnings("unused")
URL policyURL = null;
Policy() {
final ClassLoader cl = getClass().getClassLoader();
final URL policyURL = cl.getResource("policy/jvoicexml.policy");
System.err.println("policyURL = " + policyURL);
// this policy file must be created in this case in the config folder
System.setProperty("java.security.policy", policyURL.toString());
}
}
public class JVoiceXML_Client {
public static void main(final String[] args) {
final Policy p = new Policy();
Context context = null;
final Hashtable<Object, Object> env = new Hashtable<>();
env.put("java.naming.factory.initial", "com.sun.jndi.rmi.registry.RegistryContextFactory");
env.put("java.naming.provider.url", "rmi://localhost:1099");
env.put("java.naming.rmi.security.manager", "true");
try {
context = new InitialContext(env);
final NamingEnumeration<NameClassPair> list = context.list("");
while (list.hasMore()) {
System.out.println(list.next().getName());
}
} catch (final NamingException e) {
e.printStackTrace();
System.exit(-1);
}
JVoiceXml jvxml = null;
try {
jvxml = (JVoiceXml) context.lookup("JVoiceXml");
final ConnectionInformation info = new BasicConnectionInformation("dummy", "jsapi10", "jsapi10");
final Session session = jvxml.createSession(info);
final URI uri = new URI("file:///C://Users//A693819//eclipse-workspace//test//helloword.vxml");
session.call(uri);
session.waitSessionEnd();
session.hangup();
} catch (final NamingException e) {
e.printStackTrace();
System.exit(-1);
} catch (final ErrorEvent e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (final URISyntaxException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
and here is the error that I get in the client side :
policyURL = file:/C:/Users/A693819/eclipse-workspace/test/bin/policy/jvoicexml.policy
Session.f9862a32-cbe1-456d-9ab9-179f77cd65d3
Application.daed8b56-d4ad-41a0-a326-9ade874037e8
Session.593e3d68-6512-4497-840e-ce629e966b7e
RemoteJVoiceXml
Application.0e458245-5f39-4bb6-ac24-a33e53fe679c
RemoteApplication.caea841a-d85e-471b-9bb3-4d8b2da54449
RemoteMappedDocumentRepository
RemoteSession.caea841a-d85e-471b-9bb3-4d8b2da54449
Session.57ff5f52-2f7b-40fa-b66e-21bbe8949c88
MappedDocumentRepository
RemoteApplication.593e3d68-6512-4497-840e-ce629e966b7e
RemoteSession.daed8b56-d4ad-41a0-a326-9ade874037e8
RemoteSession.f9862a32-cbe1-456d-9ab9-179f77cd65d3
Session.1f6a91b9-617f-479a-afd7-d5f7477199d0
Application.caea841a-d85e-471b-9bb3-4d8b2da54449
RemoteSession.0e458245-5f39-4bb6-ac24-a33e53fe679c
Session.9dc6112f-e9fb-44cf-8a20-4d9bca0e3186
Application.f9862a32-cbe1-456d-9ab9-179f77cd65d3
Application.593e3d68-6512-4497-840e-ce629e966b7e
RemoteApplication.57ff5f52-2f7b-40fa-b66e-21bbe8949c88
JVoiceXml
RemoteApplication.1f6a91b9-617f-479a-afd7-d5f7477199d0
Application.57ff5f52-2f7b-40fa-b66e-21bbe8949c88
RemoteSession.593e3d68-6512-4497-840e-ce629e966b7e
Session.daed8b56-d4ad-41a0-a326-9ade874037e8
Session.0e458245-5f39-4bb6-ac24-a33e53fe679c
RemoteSession.57ff5f52-2f7b-40fa-b66e-21bbe8949c88
RemoteSession.1f6a91b9-617f-479a-afd7-d5f7477199d0
RemoteApplication.daed8b56-d4ad-41a0-a326-9ade874037e8
RemoteApplication.f9862a32-cbe1-456d-9ab9-179f77cd65d3
RemoteSession.9dc6112f-e9fb-44cf-8a20-4d9bca0e3186
Session.caea841a-d85e-471b-9bb3-4d8b2da54449
RemoteApplication.0e458245-5f39-4bb6-ac24-a33e53fe679c
Application.1f6a91b9-617f-479a-afd7-d5f7477199d0
org.jvoicexml.event.error.NoresourceError: error.noresource: Pool of type 'dummy' is unknown!
at org.jvoicexml.implementation.pool.KeyedResourcePool.borrowObject(KeyedResourcePool.java:106)
at org.jvoicexml.implementation.jvxml.JVoiceXmlImplementationPlatform.getExternalResourceFromPool(JVoiceXmlImplementationPlatform.java:710)
at org.jvoicexml.implementation.jvxml.JVoiceXmlImplementationPlatform.getCallControl(JVoiceXmlImplementationPlatform.java:479)
at org.jvoicexml.implementation.jvxml.JVoiceXmlPromptAccumulator.renderPrompts(JVoiceXmlPromptAccumulator.java:119)
at org.jvoicexml.implementation.jvxml.JVoiceXmlImplementationPlatform.renderPrompts(JVoiceXmlImplementationPlatform.java:1055)
at org.jvoicexml.profile.vxml21.tagstrategy.TextStrategy.execute(TextStrategy.java:121)
at org.jvoicexml.profile.TagStrategyExecutor.executeTagStrategy(TagStrategyExecutor.java:206)
at org.jvoicexml.profile.TagStrategyExecutor.executeChildNodes(TagStrategyExecutor.java:178)
at org.jvoicexml.profile.TagStrategyExecutor.executeChildNodes(TagStrategyExecutor.java:82)
at
org.jvoicexml.interpreter.FormInterpretationAlgorithm.visitBlockFormItem(FormInterpretationAlgorithm.java:1164)
at org.jvoicexml.interpreter.formitem.BlockFormItem.accept(BlockFormItem.java:107)
at org.jvoicexml.interpreter.FormInterpretationAlgorithm.collect(FormInterpretationAlgorithm.java:639)
at
org.jvoicexml.interpreter.FormInterpretationAlgorithm.mainLoop(FormInterpretationAlgorithm.java:421)
at org.jvoicexml.interpreter.VoiceXmlInterpreter.process(VoiceXmlInterpreter.java:258)
at org.jvoicexml.interpreter.VoiceXmlInterpreterContext.interpret(VoiceXmlInterpreterContext.java:817)
at org.jvoicexml.interpreter.VoiceXmlInterpreterContext.process(VoiceXmlInterpreterContext.java:543)
at org.jvoicexml.interpreter.JVoiceXmlSession.run(JVoiceXmlSession.java:396)
my jvoice_xml implementation file is this:
<beans:bean
class="org.jvoicexml.implementation.jvxml.DummyTelephonySupportFactory">
<beans:property name="instances" value="1" />
</beans:bean>
and on the server side the error is this:
1367907 [ion(37)-192.168.56.1] ERROR jvoicexml.jndi.SessionSkeleton ( 171) [] error.noresource: Pool of type 'dummy' is unknown!
org.jvoicexml.event.error.NoresourceError: error.noresource: Pool of type 'dummy' is unknown!
at org.jvoicexml.implementation.pool.KeyedResourcePool.borrowObject(KeyedResourcePool.java:106) ~[org.jvoicexml-0.7.8-SNAPSHOT.jar:0.7.8-SNAPSHOT]
at org.jvoicexml.implementation.jvxml.JVoiceXmlImplementationPlatform.getExternalResourceFromPool(JVoiceXmlImplementationPlatform.java:710) ~[org.jvoicexml-0.7.8-SNAPSHOT.jar:0.7.8-SNAPSHOT]
at org.jvoicexml.implementation.jvxml.JVoiceXmlImplementationPlatform.getCallControl(JVoiceXmlImplementationPlatform.java:479) ~[org.jvoicexml-0.7.8-SNAPSHOT.jar:0.7.8-SNAPSHOT]
at org.jvoicexml.implementation.jvxml.JVoiceXmlPromptAccumulator.renderPrompts(JVoiceXmlPromptAccumulator.java:119) ~[org.jvoicexml-0.7.8-SNAPSHOT.jar:0.7.8-SNAPSHOT]
at org.jvoicexml.implementation.jvxml.JVoiceXmlImplementationPlatform.renderPrompts(JVoiceXmlImplementationPlatform.java:1055) ~[org.jvoicexml-0.7.8-SNAPSHOT.jar:0.7.8-SNAPSHOT]
at org.jvoicexml.profile.vxml21.tagstrategy.TextStrategy.execute(TextStrategy.java:121) ~[?:?]
at org.jvoicexml.profile.TagStrategyExecutor.executeTagStrategy(TagStrategyExecutor.java:206) ~[org.jvoicexml-0.7.8-SNAPSHOT.jar:0.7.8-SNAPSHOT]
at org.jvoicexml.profile.TagStrategyExecutor.executeChildNodes(TagStrategyExecutor.java:178) ~[org.jvoicexml-0.7.8-SNAPSHOT.jar:0.7.8-SNAPSHOT]
at org.jvoicexml.profile.TagStrategyExecutor.executeChildNodes(TagStrategyExecutor.java:82) ~[org.jvoicexml-0.7.8-SNAPSHOT.jar:0.7.8-SNAPSHOT]
at org.jvoicexml.interpreter.FormInterpretationAlgorithm.visitBlockFormItem(FormInterpretationAlgorithm.java:1164) ~[org.jvoicexml-0.7.8-SNAPSHOT.jar:0.7.8-SNAPSHOT]
at org.jvoicexml.interpreter.formitem.BlockFormItem.accept(BlockFormItem.java:107) ~[org.jvoicexml-0.7.8-SNAPSHOT.jar:0.7.8-SNAPSHOT]
at org.jvoicexml.interpreter.FormInterpretationAlgorithm.collect(FormInterpretationAlgorithm.java:639) ~[org.jvoicexml-0.7.8-SNAPSHOT.jar:0.7.8-SNAPSHOT]
at org.jvoicexml.interpreter.FormInterpretationAlgorithm.mainLoop(FormInterpretationAlgorithm.java:421) ~[org.jvoicexml-0.7.8-SNAPSHOT.jar:0.7.8-SNAPSHOT]
at org.jvoicexml.interpreter.VoiceXmlInterpreter.process(VoiceXmlInterpreter.java:258) ~[org.jvoicexml-0.7.8-SNAPSHOT.jar:0.7.8-SNAPSHOT]
at org.jvoicexml.interpreter.VoiceXmlInterpreterContext.interpret(VoiceXmlInterpreterContext.java:817) ~[org.jvoicexml-0.7.8-SNAPSHOT.jar:0.7.8-SNAPSHOT]
at org.jvoicexml.interpreter.VoiceXmlInterpreterContext.process(VoiceXmlInterpreterContext.java:543) ~[org.jvoicexml-0.7.8-SNAPSHOT.jar:0.7.8-SNAPSHOT]
at org.jvoicexml.interpreter.JVoiceXmlSession.run(JVoiceXmlSession.java:396) ~[org.jvoicexml-0.7.8-SNAPSHOT.jar:0.7.8-SNAPSHOT]
Anne