UnsupportedAudioFileException when applet runs served by servlet

I have spent the better part of two days sorting through this. I developed an applet, using several examples found here and elsewhere, that will play, pause and stop playing an MP3 file. It is very simple and purposely designed that way. I use Eclipse as my development environment and when I run the applet directly from the IDE it runs fine. When I jar the files, sign the jar and deploy the applet through a servlet I get the following:
javax.sound.sampled.UnsupportedAudioFileException: could not get audio input stream from input URL
     at javax.sound.sampled.AudioSystem.getAudioInputStream(Unknown Source)
     at org.myorg.applet.MP3JLayerApplet.playMP3(MP3JLayerApplet.java:158)
     at org.myorg.applet.MP3JLayerApplet$PlayerThread.run(MP3JLayerApplet.java:116)
So I am assuming that there is something in the classpath missing that is causing the heartburn to the applet (running in FF5 in Windows 7). Where do I start unpacking the issue? I have the Java Control Panel Console in trace mode but it doesn't show which classes/jars are being accessed as the applet loads. Is there a way to see each class as it is loaded and where (like the -verbose switch) ?
The segment of code that is running is as follows:
               URL url = null;
               if (classID!=null)
                    try
                         url = new URL(audioURL);          
                         System.out.println(url);     
                    catch (Exception ex)
                         System.err.println(ex);     
          try {
               AudioInputStream in = AudioSystem.getAudioInputStream(url);
The audioURL is a string with the following value:
http://localhost:9080/BSFDocs/lectureFiles/717/lecture.mp3
If the URL is used directly in the browser, the mp3 is downloaded and would play in Media player with no problems.
Again, if the applet is run directly in from Eclipse using the Run as --> Java Applet option, it works perfectly. If run from the servlet it fails.
Suggestions?
Thanks

FYI,
I didn't have to download and install any plug-ins before to have this work. It would work with the Browser's VM but now doesn't seem to.

Similar Messages

  • VerifyError caught when class run in a Servlet.

    I am getting the following Error. The API does not adequately explain what this is or what to do about it. Can anyone help me figure this out?
    java.lang.VerifyError: (class: com/BizTech4ALL/forms/FormParameters, method: signature: (Ljava/lang/String;)V) Register 2 contains wrong type
    When I put a main in the FormParameters class above, it run fine. When I create a "stub" program class to call the FormParameters, it also runs fine. I only get this problem when I run as a servlet.
    Thanks,
    Tom

    I get this problem too, and no-one replied to my post either...
    Please help us!!!!
    Andrew Dalgleish.

  • I have got error while "running server"

    I am using Win xp and jdk1.4
    My home directory is "c:\Documents and settings\ssss"
    I am saving my RMI programs in "Radha" folder on "desktop"
    To execute RMI program ,I followed following steps:
    Execution steps:
    1. c:\documents and settings\ssss\desktop\radha>c:\jdk1.4\bin\javac AccountServer.java (for interface)
    c:\documents and settings\ssss\desktop\radha>c:\jdk1.4\bin\javac AccountServerImp.java (for server)
    c:\documents and settings\ssss\desktop\radha>c:\jdk1.4\bin\javac AccountClientImp.java (for client)
    2.c:\documents and settings\ssss\desktop\radha>c:\jdk1.4\bin\rmic AccountServerImp
    3.c:\documents and settings\ssss\desktop\radha>c:\jdk1.4\bin\policyTool
    (to set all permission I have not written anything in codeBase box)
    4.c:\>jdk1.4>bin>start rmiregistry
    (this will start one blank window, I minimised it)
    5.In the same command prompt I run my server program by using
    c:\documents and settings\ssss\desktop\radha>c:\jdk1.4\bin\java AccountServerImp
    But ,when I run "server program" it gives me an error as stated below :--
    " java.rmi.ServerException :RemoteException occured in server thread; nested exception is:
    java.rmi.UnmarshalException : error Unmarshalling arguments; nested exception is:
    java.lang.classNotFoundException : AccountServerImp_Stub "
    I am new to RMI; Would any one help me to solve this problem!!
    Waiting eagerly for reply...........

    You forgot to include the current directory in the classpath.
    I.e.
    c:\jdk1.4\bin\java -classpath . AccountServerImp

  • When to use servlets / when applets

    hi there,
    building a web application when do I use servlet technology and when applets? What are the arguments to let me choose between them? Or combine both servlets and applets? Any ideas/URLs are welcome.
    greetings

    is it a matter how powerful my servermachine is?
    No, not really, but an applet will use the processor on the client and the servlet will use the server's cpu, so that could potentially be an issue for you.
    or a matter of security or whatever?
    There are security issues with Applets, as they cannot access system resources, but neither can Servlets, so I think that's a non issue.
    What exactly do you need to do with the data once you get it out of the database? THAT is the real question! If you want to fetch data and then display the data as text or HTML in a browser, use a servlet. If you need the client to interact with the data in a more sophisticated way, use an Applet. With an Applet, you can put buttons and sliders and whatever and control things, and interact with the application. But a Servlet is not an application, nor is it interactive. A Servlet is called, it gets parameters from an HTTP client, and then it responds, and it's done. An Applet has runtime, and stays running, to interact with the client indefinitely.
    I'll give you a real world example. With a Servlet, you might output a web page to a browser, and show an advertisement somewhere on the page. However, an Applet could show an advertisement, and update that ad every few seconds or so, and show one after another, like a slideshow. Even better, an Applet could go get a BRAND NEW ad that was just put in the database and get the new ad at runtime, showing up to the minute results. An Applet could do a stock ticker program, Servlet cannot. Get the difference?

  • Opening a text file in server from an applet running in the client

    Friends,
    I want to open a text file in the server(The server machine uses tomcat 4.1.12 server)from an applet running in the client machine;
    The applet invokes a servlet that opens the text file;this text file is opened in the server machine; but I want it to be opened in the client machine where the applet is running.
    Plese help me to get around this.

    You can open the textfile on the servlet and then send the information to the client (applet) as stirngs. The must then applet convert the stirngs into some object or simply display the information in someway. But then the text file that you are opening must be stored in some relevant tomcat directory e.g. on the server. If you want to open a file on the clients computer, you get into signed applets.

  • Getting error 404 when iam running a simple login servlet in tomcat

    hi
    this is my Login.java
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class Login extends HttpServlet
         public void doPost(HttpServletRequest rq, HttpServletResponse rs)
              String username =rq.getParameter("username");
              String password =rq.getParameter("password");
    try{
              rs.setContentType("text/html");
              PrintWriter out=rs.getWriter();
              out.println("<html><body>");
              out.println("thank u, " + username + "you r logged sucessfully");
              out.println("</body></html>");
              out.close();
              }catch(Exception e){
                   e.printStackTrace();
    i have saved in the form ofC:\Program Files\apache-tomcat-4.1\webapps\sravan\WEB-INF\classes\Login.class
    where sravan is my folder
    step 2: Login.html
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title>login page</title></head>
    <body>
    <h1> WELCOME TO THE SERVLET HOME PAGE</h1>
    ENTER UR USERNAME AND PASSWORD
    <form action="/sravan/Login" method="Post">
         username<input type="text" name="username" >
         password<input type="password" name="password" >
         <input type="submit" value="submit"></form>
         </body>
    </html>
    i have saved in the form C:\Program Files\apache-tomcat-4.1\webapps\sravan\Login.html
    step3:
    my web.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <display-name>beginning j2ee</display-name>
    <servlet>
    <servlet-name>Login</servlet-name>
    <servlet-class>Login</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>Login</servlet-name>
    <url-pattern>Login</url-pattern>
    </servlet-mapping>
    </web-app>
    i have saved in C:\Program Files\apache-tomcat-4.1\webapps\sravan\WEB-INF\web.xml
    step4:
    here is my server.xml
    <Context path="/sravan" docBase="sravan" debug="0" reloadable="true" privileged="true"/>
    saved in C:\Program Files\apache-tomcat-4.1\webapps\sravan\WEB-INF\server.xml
    everything is fine....program is compiled ...but when iam running the servlet in tomcat iam getting error 404 Login.html not found....
    so plz kindly help me this my first servlet .....

    There seems not to be any '.html' in your url-pattern
    <url-pattern>Login</url-pattern>- so i presume you should use
    http://yourhost/Logininstead.

  • Please help me to write a file from applet to server with a servlet.

    In an applet the client elaborates a string and stores it in the variable of the name "line"
    I would Like to write the string "line" in the file myfile.txt on the server.
    I am in an applet trying to make the URLconnection to a servlet.
    The part of the applet which calls the servlet is the following:
    private void writeToSer(String line)
    try
    URL u = new URL("http://192.168.1.103:8180/servlet/ScriviFileServletFor1?stringa="+line);
    HttpURLConnection urlConn = (HttpURLConnection)u.openConnection();
    catch(IOException ioe)
    JOptionPane.showMessageDialog(null,"IO Exception ","attenzione",JOptionPane.ERROR_MESSAGE );
    the code of the servlet is the following:
    import java.io.*;
    import java.io.File;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class ScriviFileServletFor1 extends HttpServlet {
    public void doGet (HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    //read the parameters
    String string = request.getParameter("stringa");
    try {
    File file = new File("/home/icurrado/myfile.txt");
    FileWriter out = new FileWriter(file);
    out.write(string);
    out.close();
    catch (Exception e) {
    e.printStackTrace();
    When I call the servlet from the bar of the URL with :
    http://localhost:8180/servlet/ScriviFileServletFor1?stringa=prova
    It works and writes the string "prova" in the file "/home/icurrado/myfile.txt".
    When I call the servlet from the applet it doesn't work and it doesn't write the string in the file.
    What is wrong or is missing ?
    Please help me.

    You dont need to go through the URL mechanism.
    From an Applet you can directly save the file on the server at destinated location.
    You can look for "Uploader Applet" in google.

  • How to run server application on that talks to applet in embeded in webpage

    i have a client(applet) and server application that are designed to communicate via sockets. the applet will run from a webpage and i know how to publish that. but the problem is the server application. i have been told that it too should run on my host, but how can i specify that and how to find out whether or not my host allows such a thing.
    any clarifying reply would be highly appreciated.
    sam

    If thinking about a Java solution, look at JSP/Servlet technology. (i.e. http://jakarta.apache.org)
    In short, servlets a classes that run in a container accesible by HTTP.
    There is also J2EE, wich uses RMI to perform this task.

  • How to terminate the "process" running in weblogic server by servlet

    hi all !!
    i have executed a external command from servlet but i am not getting the output untill i logoff the weblogic server.
    now i want to kill the process running in my server by servlet code.how could i do this? here is my code ,it is executing the command but not giving output untill i logoff the server.
                     Runtime rt = Runtime.getRuntime();
                     Process proc = rt.exec("var.bat");
                     proc.wait(60);
                     proc.destroy();Thanks and Regards
    Allwyn

    hey !
    anybody is here?????

  • Is there a way to remove "Applet running..." when launching Applet in JWS?

    Is there any way to remove the "Applet running..." message at the bottom of the applet when launch in JWS? I have searched in the forum and bug database and cannot find a reference in how to remove it.
    I remember in the old applet days (JDK 1.1, 1.2?), everybody are mad at the yellow warning message when launching a new frame from an applet window. It is hard to believe this issue reappears in JDK 1.4.
    FYI, all the jar files are signed. And I am using JDK 1.4.1.
    Thanks,
    Nelson Fong

    Dietz,
    Thanks for your response. Unfortunately, our application requested all-permission in the jnlp file, and all jar files are signed as well.
    In fact, the warning is more like a status bar. The message was changed from "Initializing Applet..." to "Applet running...." during init() method.
    Any help would be appreciated. Thanks

  • Getting an Error When Running Server 2012 R2 adprep /forest prep on a 2012 DC

    I am getting an error when running adprep /forest prep on a Server 2012 domain controller. The main parts of my domain are as follows:
    2 - Domain Controllers running Server 2012
    1 - Exchange Server 2013 running on Server 2012
    I am trying to either do an in-place upgrade to my domain controllers to Server 2012 R2 or even introduce a Server 2012 R2 domain controller into the domain. The error I am getting is as follows:
    [Status/Consequence]
    The operation GUID already exists so Adprep did not attempt to rerun this operation but is continuing.
    [2014/04/05:09:12:38.873]
    Adprep was about to call the following LDAP API. ldap_search_s(). The base entry to start the search is cn=38618886-98ee-4e42-8cf1-d9a2cd9edf8b,cn=Operations,cn=ForestUpdates,CN=Configuration,DC=DOMAIN,DC=local.
    [2014/04/05:09:12:38.873]
    LDAP API ldap_search_s() finished, return code is 0x20
    [2014/04/05:09:12:38.873]
    Adprep verified the state of operation cn=38618886-98ee-4e42-8cf1-d9a2cd9edf8b,cn=Operations,cn=ForestUpdates,CN=Configuration,DC=DOMAIN,DC=local.
    [Status/Consequence]
    The operation has not run or is not currently running. It will be run next.
    [2014/04/05:09:12:38.873]
    Adprep was about to call the following LDAP API. ldap_modify_s(). The entry to modify is CN=ad://ext/AuthenticationSilo,CN=Claim Types,CN=Claims Configuration,CN=Services,CN=Configuration,DC=DOMAIN,DC=local.
    [2014/04/05:09:12:38.873]
    LDAP API ldap_modify_s() finished, return code is 0x13
    [2014/04/05:09:12:38.905]
    Adprep was unable to modify some attributes on object CN=ad://ext/AuthenticationSilo,CN=Claim Types,CN=Claims Configuration,CN=Services,CN=Configuration,DC=DOMAIN,DC=local.
    [User Action]
    Check the log file ADPrep.log in the C:\Windows\debug\adprep\logs\20140405091235 directory for more information.
    [2014/04/05:09:12:38.936]
    Adprep encountered an LDAP error.
    Error code: 0x13. Server extended error code: 0x20b1, Server error message: 000020B1: AtrErr: DSID-030F112A, #1:
     0: 000020B1: DSID-030F112A, problem 1005 (CONSTRAINT_ATT_TYPE), data 0, Att 9086f (msDS-ClaimIsValueSpaceRestricted)
    DSID Info:
    DSID: 0x181112dd
    ldap error = 0x13
    NT BUILD: 9600
    NT BUILD: 16384
    [2014/04/05:09:12:38.967]
    Adprep was unable to update forest information.
    [Status/Consequence]
    Adprep requires access to existing forest-wide information from the schema master in order to complete this operation.
    [User Action]
    Check the log file, ADPrep.log, in the C:\Windows\debug\adprep\logs\20140405091235 directory for more information.
    Any Help would be appreciated. Thanks!

    Hi,
    did you check which servers has FSMO roles?
    You can do that via command prompt: netdom query fsmo
    For forestprep you must do that on DC which have Schema Operations marter role.
    Command
    Domain controller
    Number of times to run the command
    adprep /forestprep
    Must be run on the schema operations master for the forest.
    Once for the entire forest
    adprep /domainprep
    Must be run on the infrastructure operations master for the domain.
    Once in each domain where you plan to install an additional domain controller that runs a later version of Windows Server than the latest version that is running in the domain.
    Note
    Domains where you will not add a new domain controller will be affected by adprep /forestprep, but they do not require you to run adprep /domainprep.
    http://technet.microsoft.com/en-us/library/dd464018(v=ws.10).aspx

  • Error when I run report RSCMST to test the content server.

    when I run report "RSCMST" to test the my content server.    I get the error:
    header        HTTP/1.1 401 Authorization Required
                  date: Fri, 05 Dec 2008 20:20:45 GMT
                  server: Apache/1.3.41 (Unix) SAPCS/640
                  x-servertime: 20:20:45
                  x-query: create&pVersion=0046&contRep=ZTEST001&docId=020D3949CA03445AE10000000A14022B&compId=data&docPro ..
                  t=rud&accessMode=c&authId=CN%3DCPJ&expiration=20081205142027&secKey=MIH3BgkqhkiG9w0BBwKggekwgeYC
                  x-serverdate: 2008-12-05
                  x-pversion: 0046
                  x-errordescription: URI signature has expired
                  x-serverid: server="content01.ivo.com.cn";serverPort="1090"
                  x-servertype: SAP HTTP Content Server
                  content-length: 752
                  connection: close
                  content-type: text/plain
                  ~remote_addr:
                  ~uri_scheme_expanded: NONE
    want                 201
    bad           401
    time              17.974
    It seems that the "bad 401" means a http error.    I do not know how to configure it ?
    my content server uses the maxdb,  and http is apache, they are all running on redhat linux ese 5
    who can give me some advices?  thanks

    Victor,
            Looks like a web server authentication issue. I suggest you raise this issue in a basis/ web application server forum,
    Sojan

  • Installed hotfix for error 3241 when you run RESTORE FILELISTONLY statement in SQL Server 2008 R2. But still get same errormessage.

    I ran into erro 3241 when you run RESTORE FILELISTONLY statement in SQL Server 2008 R2.
    Found the hotfix 
    Cumulative Update 13 for SQL Server 2008 R2 SP1.
    I have installed this hotfix, now running 10.50.2876.0
    But I still get the same error when trying to restore a backup.
    What else do I need to do?

    second to what bodo said Instead of installing SQL server 2012 SP1 CU13 it would be better to install
    SQL Server 2008 r2 Sp2 SP's are more throughly tested and would include all fixes for CU and Sp1
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Articles

  • CR Server: Login loop when I run a report

    Post Author: Marcotte
    CA Forum: General
    I have CR Server XI installed on my server.  I can log into the Central Management Console and Infoview from the client.  I can load objects and run the sample reports.  I can set up users and security.  I can basically do everything, except run a report on my database. When I run the report, I get a prompt to log into the database, similar to the prompt I get when I run/refresh the report in CR XI.  When I type in my username and password (same ones I used to create the report), I just get another login prompt.  No matter how many times I type in a user name and password, I still get the login prompt.  If I enter an invalid username or password, I do not get an error message, I just get another prompt.Server OS = Windows Server 2003Client OS = Windows XP Pro (SP 2)Database = Informix: on a Linux (Redhat) box.Browser = IE 7 on client and IE 6 on server.  I have set up a ODBC link (under system DSN) on the Server (and the client) to connect to the database (the name of the link is the same on the server and the clients).  All tests I've run (from within the Informix SDK software) indicate that the link is valid and working.  I have run through the process on a couple clients, have gotten the same positive test results, and been able to query the database from the clients either through Crystal or MS Query.When I look at the report Object in the CMC, under the Process -> Database tab, I have "Use original database logon information from the report" selected.  The server and database fields are grayed out, but the values are what they should be (I guess).  The name and password are black, and I can change them.  Re-entering my user name and password results in the same error.Under the same tab, at the bottom it has "When viewing the report:"  I have "Prompt the user for database logon" selected.  If I change this to "Use same database logon as when report is run" then when I run the report I get "The database logon information for this report is
    either incomplete or incorrect."Please help, and TIA. Marcotte

    Hi,
    Did you managed to find a solution to this issue? I'm experiencing the same problem, and BO/SAPsupport have not been able to resolve it.
    Thanks.

  • [svn:bz-trunk] 14330: BLZ-476 : Getting different error message in server' s servlet log and console log when class is not of expected type.

    Revision: 14330
    Revision: 14330
    Author:   [email protected]
    Date:     2010-02-22 10:03:03 -0800 (Mon, 22 Feb 2010)
    Log Message:
    BLZ-476 : Getting different error message in server's servlet log and console log when class is not of expected type.
    QA: no
    Doc: no
    checkin test : pass
    Ticket Links:
        http://bugs.adobe.com/jira/browse/BLZ-476
    Modified Paths:
        blazeds/trunk/modules/core/src/flex/messaging/MessageBrokerServlet.java

    Hi, wbracken ,
    As known, there are 2 different questions I raised.
    Regarding the reply for the second one (Nothing to do with Chinese), I noticed there are several similar issues found in this forum, and it seems no response could solve my that problem. The related methods and classes were also well check, as well as the parameters put.
    Any way, your reponse was appreciated.
    Thank you for the help.

Maybe you are looking for

  • Error while doing GR against PO

    Hi I am doing a third party scenario. I created a sales order with item category as TAS. I created PO against the PR. When I am doing GR against PO, I am getting a error " Purchase order 4500018781 has no items" . What could be the reason ? Is this p

  • Problem printing Lightroom 5.4 on OSX 10.9, Mavericks to Epson Stylus Photo R2400

    When I print, only the lower left 3rd of the page has any ink on it and it is only a window into the middle of the image. The quality of the print is fine and it prints normally in Photoshop CS6. What's up with LR 5.4? I have tried everything from re

  • All music is gone

    I had several hundred songs accumulated. after upgrading to 7.2, I openned itunes and got an error message stating all of my drivers are missing and I need to reinstall i-tunes. My library is completely empty. If I re-install i-tunes will my songs re

  • How to dump .mod directly into iMovie without having to convert to .m4v?

    I cannot dump my video directly into iMovie 9 from Canon FS200. It goes to a document which I then have to laboriously convert - one clip at a time - to .m4v using Handbrake. Only then will iMovie take them. How do I bypass that conversion and get vi

  • How can I change the language of photoshop cs6 from english to german?

    Hello! My company has several CS6 (master collection) licenses. On my PC and Mac (both) I have an english version installed. I would like to change the language to german without reinstalling everything. I do have the install media of the german vers