Solved

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

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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This video teaches viewers about errors in exception handling.
Suggested Courses

734 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