Solved

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

Posted on 2006-10-19
2
940 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Suggested Courses

628 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