Solved

MSTAPI - javax.telephony.ProviderUnavailableException: Error loading raw provider: MSTAPI

Posted on 2006-10-19
2
922 Views
Last Modified: 2012-08-13
I refer to Q_21470963.html but I got the following error

Can't get Provider: javax.telephony.ProviderUnavailableException: Error loading raw provider: MSTAPI


Please advise

My Program
========
  public static final void main(String args[]) {
    /*
     * Create a provider by first obtaining the default implementation of
     * JTAPI and then the default provider of that implementation.
     */

        Provider provider = null;
    try {
     
      JtapiPeer peer = JtapiPeerFactory.getJtapiPeer(null);
     //   JtapiPeer peer = JtapiPeerFactory.getJtapiPeer("net.xtapi.XJtapiPeer");


     
      // provider = peer.getProvider(null);
     provider = peer.getProvider("MSTAPI");
    } catch (Exception excp) {
      System.out.println("Can't get Provider: " + excp.toString());
      System.exit(0);
    }
 
    /*
     * Get the terminal we wish to monitor and add a call observer to that
     * Terminal. This will place a call observer on all call which come to
     * that terminal. We are assuming that Terminals are named after some
     * primary telephone number on them.
     */
    try {
      Terminal terminal = provider.getTerminal("0123485");
      terminal.addCallObserver(new MyInCallObserver());
    } catch (Exception excp) {
      System.out.println("Can't get Terminal: " + excp.toString());
      System.exit(0);
    }
  }
0
Comment
Question by:LeanMoreTryMore
2 Comments
 
LVL 20

Accepted Solution

by:
Venabili earned 500 total points
ID: 17772229
This is because it does not exist in your system...Do you have mstapisp.jar in your classpath?xtapi.jar and jtapi-1.3.1.jar are also here as far as I see)

This:
 JtapiPeer peer = JtapiPeerFactory.getJtapiPeer("net.xtapi.XJtapiPeer");
myprovider = peer.getProvider("MSTAPI");

seems to be working ok with the proper classpath
But if you want the default provider, it should be myprovider = peer.getProvider(null);
0
 

Author Comment

by:LeanMoreTryMore
ID: 17847567
you are the only one giving me an answer. thankyou anyway.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
countAbc challenge 9 50
base64 decode encode 12 100
advertisement module in core php 4 94
github account with ecipse 1 20
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now