Solved

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

Posted on 2006-10-19
2
927 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
JAVA part two 5 57
Java. Convert method from recursion based to iteration based ( loop based ) 6 75
eclipse shortcuts 9 45
expectj telnet failing 5 19
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

914 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

18 Experts available now in Live!

Get 1:1 Help Now