Help, error when trying to load sound file

When i try to load a sound file like this
AudioClip gong = getAudioClip(getDocumentBase(), "slow.wav");I get this error,
java.lang.NullPointerException
    at java.applet.Applet.getDocumentBase(Applet.java:141)
    at collision.<init>(collision.java:30)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at java.lang.Class.newInstance0(Class.java:355)
    at java.lang.Class.newInstance(Class.java:308)
    at sun.applet.AppletPanel.createApplet(AppletPanel.java:786)
    at sun.applet.AppletPanel.runLoader(AppletPanel.java:715)
    at sun.applet.AppletPanel.run(AppletPanel.java:369)
    at java.lang.Thread.run(Thread.java:619)I don't know why i'm getting this error.
Btw, the rest of my code is on the Maze game help thread.

I am using the newest version of Java. I reverted it back to update 7, and it still didnt work.
And for the API, i cant find out why it may return null, all it says is
getDocumentBase
public URL getDocumentBase()Gets the URL of the document in which this applet is embedded. For example, suppose an applet is contained within the document:
    http://java.sun.com/products/jdk/1.2/index.html
The document base is:
    http://java.sun.com/products/jdk/1.2/index.html
Returns:
the URL of the document that contains this applet.
See Also:
getCodeBase()

Similar Messages

  • Error when trying to load jar file (loadjava)

    I have been struggling with this issue for a few days. I read all the old threads and solutions online but none of them worked. I wrote some java stored procedures and have been trying to load the required jar files. The error message I keep getting is this:
    ORA-29532: Java call terminated by uncaught Java exception: oracle.aurora.server.tools.loadjava.ToolsError: Error during loadjava: Failures occurred during processing. Check trace file for details
    I have tried to load them using Enterprise Manager Console and the following:
    call dbms_java.loadjava(' -force -resolve
    c:\javacog\cognosClient.jar', ' -resolver "((* PUBLIC) (*
    SYS) )"')
    Any ideas? We are using Oracle 10gr2, and trying to load Cognos 8.3 SDK jar files. According to Cognos, Java 1.4 is supported.
    Edited by: user10406501 on Oct 8, 2008 2:26 PM

    Sorry to respond to an old message, I was just looking for the solution for the totally different problem.
    Key word 'Cognos' got me here.
    I've menage to load Cognos SDK onto Oracle 10.2.0.2 on Windows XP.
    I've used simple loadjava script. After that it requires some additional GRANTs, and it works.
    If you still are looking for the solution for this problem, respond to this message, and I'll post the scripts.
    Thomas

  • Error when trying to save a file

    I get this error when trying to save any file (newly created or not) word document in MS word 2010:"You are attempting to save a file type (plain text files) that has been blocked by your File Block settings in the Trust Center".
    I followed the directions given by the Microsoft Knowledge Base article 922850, but I am still having this issue. I can still save files as PDF but not in any kind of word format. 
    I also tried opening another file copy and pasting under a different name and it doesn't help.
    Please Help.
    Bruce

    Hi,
    Please try the following methods:
    Using Administrative Template files and the Office Customization Tool to disable the restriction
    Use a trusted location, or create an exempt location
    Quote from:
    http://support.microsoft.com/kb/922849/en-us
    Regards,
    George Zhao
    TechNet Community Support

  • Currently using Flash Pro CS5,  getting error when trying to open CS4 file.  Error is "Slides and Forms documents are not supported in this version of Flash. Please open in previous version.

    Currently using Flash Pro CS5,  getting error when trying to open CS4 file.  Error is "Slides and Forms documents are not supported in this version of Flash. Please open in previous version.  Has there been a fix or patch to this issue or do I have to convert back to CS4 to open the file?

    Having the same problem in CS6.  I can tell you that converting back to CS4 will NOT solve the problem.  It seems when support for backward compatibility is discontinued, there's just no way to get
    any help at all?  Absolute failure to provide any user support so far...

  • CName Error When Trying to Attach Particular File

    I am using custom buttons to attach, view and remove attachment files to my LiveCycle form. Most files attach without any problem. I have a particular file named, "RECN-TrackingLog.xlsm" that I receive the following error when trying to attach this file to the form. If I copy the file to my desktop, it attaches to the form without any problem. It is named exactly the same. Any idea what is causing this error? I have included the script for the "Attach" button below.
    var myDoc = event.target;
    var sFile = "myFile"+Math.round(Math.random()*10000000000000);//Randomly generated number
    myDoc.importDataObject({cName: sFile});
    var myDataObject = myDoc.getDataObject(sFile);
    var sFileName = myDataObject.path;
    ListBox1.addItem(sFileName,sFile);
    NumericField1.rawValue = NumericField1.rawValue + 1;

    This error turned out to be caused because someone else had that networked file open at the time I was trying to attach the file. That's why when I dragged and dropped a copy onto my desktop, that "version" of the file was not open and would attach without any problem.

  • Error when trying to load data from ODS to CUBE

    hi,
      Iam getting a short dump  when trying to load data from ODS to CUBE. The Run time error is 'TYPELOAD_NEW_VERSION' and the short text is 'A newer version of data type "/BIC/AZODS_CA00" was found than one required.please help me out.

    Hi,
    Check this thread.........Ajeet Singh  has given a good solution here.........
    Re: Error With Data Load-Getting Canceled Right Away
    Also check SAP note: 382480..................for ur reference............
    Symptom
    A DART extraction job terminates with runtime error TYPELOAD_NEW_VERSION and error message:
    Data type "TXW_INDEX" was found in a newer version than required.
    The termination occurs in the ABAP/4 program "SAPLTXW2 " in "TXW_SEGMENT_RECORD_EXPORT".
    Additional key words
    RTXWCF01, LTXW2U01, TXW_INDEX
    Cause and prerequisites
    This problem seems to happen when several DART extraction jobs are running in parallel, and both jobs access table TXW_INDEX.
    Solution
    If possible, avoid running DART extractions in parallel.
    If you do plan to run such jobs in parallel, please consider the following points:
    In the DART Extract configuration, increase the value of the parameter "Maximum memory allocation for index (MB)" if possible. You can estimate reasonable values with the "File size worksheet" utility.
    Run parallel DART jobs on different application servers.
    As an alternative, please apply note 400195.
    It may help u.........
    Regards,
    Debjani.......

  • Error when trying to convert excel files to pdf

    I'm getting the following error when trying to convert .xls and .xlsx files to pdf, using the "Create PDF" option:
    Error message from the primary converter:
    ALC-PDG-010-012-PDFMaker reported an error while printing the document.
    Word, Powerpoint and Text files convert without any issues. Also I'm able to opent the excel files and convert them to pdf using the acrobat option in excel.
    Livecycle Version: 10.0.2, GM
    MS Office Version: 2007
    Any help would be appreciated. Thanks in advance.
    Regards,
    Suhail N.

    It is always difficult when you need to convert multiple xls files to pdf or multiple sheets to pdf. If you have a single file to convert then the best method would be to copy your data to doc file and then convert it into PDF . If you have multiple files to convert then it is really difficult to convert all the files manually. Then the better method would be to use converter tool to convert excel to pdf . By doing this you can convert many files in just few seconds.

  • Error when trying to create class file

    I am getting this error when I try to create file
    clobsearch.java:246: not a statement ex;
    protected Element getDocumentRoot(Clob c)
    Element root;
    Reader read = c.getCharacterStream();
    String s = convertClob(read, 8192);
    SAXReader sread = new SAXReader("org.dom4j.io.aelfred.SAXDriver");
    sread.setMergeAdjacentText(true);
    sread.setStripWhitespaceText(true);
    Document doc = sread.read(new StringReader(s));
    root = doc.getRootElement();
    return root;
    Exception ex;
    ex; <--- this is line 246
    System.out.println(ex.getMessage());
    return null;
    any help would be appricated
    thanks
    robert

    The guy who wrote this code is no longer with the company
    the server IP got changed and he had an IP coded in the program
    i managed to uncompile the code
    i changed the IP to the new one
    when I tryed to create the class file i get the error
    so as far as what is happenning with the ex I am not sure
    here is another piece of code that might help
    really all i need to do is get the class file created again...
    protected Element getDocumentRoot(Clob c)
    Element root;
    Reader read = c.getCharacterStream();
    String s = convertClob(read, 8192);
    SAXReader sread = new SAXReader("org.dom4j.io.aelfred.SAXDriver");
    sread.setMergeAdjacentText(true);
    sread.setStripWhitespaceText(true);
    Document doc = sread.read(new StringReader(s));
    root = doc.getRootElement();
    return root;
    Exception ex;
    ex;
    System.out.println(ex.getMessage());
    return null;
    protected double toDouble(String s)
    double d = 0.0D;
    try
    d = Double.parseDouble(s);
    catch(NumberFormatException ne) { }
    return d;
    protected String convertClob(Reader in, int blen)
    StringWriter sw = new StringWriter(32768);
    char buf[] = new char[blen];
    int len = 0;
    try
    while((len = in.read(buf)) != -1)
    sw.write(buf, 0, len);
    in.close();
    sw.close();
    catch(IOException ioe)
    len = 1;
    return null;
    String s = sw.toString();
    int q = s.indexOf("<Quote");
    int end = 0;
    if(q == 0)
    end = s.indexOf("</Quote>") + 8;
    } else
    q = s.indexOf("<Project");
    if(q == 0)
    end = s.indexOf("</Project>") + 10;
    else
    end = s.indexOf("</Order>") + 8;
    return s.substring(0, end);
    public static void main(String args[])
    if(args.length < 2)
    System.out.println("Usage: clobsearch tablename [searchpattern] [datesql]");
    System.out.println("Where: searchpattern like \"Geodesic Dome\" and datesql like \" where quotedate >= to_date('01/01/2004', 'MM/DD/YYYY')\"");
    System.out.println("OR: clobsearch tablename searchpattern -data idfile [idcolname]");
    System.out.println("Where: searchpattern as above, idfile is a one per line file of quote or order numbers, idcol=column name for id col");
    System.exit(1);
    clobsearch cs = new clobsearch(args);
    }

  • Error When trying to load master data 0material

    Hi,
    I got the following error when trying to laod 0MATERIAL master data
    "value '000000000004343434 ' for characteristic 0MATERIAL is in external format     "
    "0MATERIAL : Data record 1 ('000000000004343434 '): Version '000000000004343434 ' is not valid
    Can anybody help me in resolving this issue.
    Regards

    Hi,
    Run transaction OMSL.
    Create an entry for MATCONV in the overview screen.
    Double click on this line and set the length parameter for MATCONV.
    the same transaction exists in the r/3 OLTP system compare the 2 systems to set the right values in the details screen in BW.
    Hope this helps
    Provide points if it does.
    Regards
    Lalan

  • Bw problem/error when trying to load data

    hi experts i suddenly have this issue when trying to load data anywhere in my bw system (psa,ods,infocubes) i get the following abap runtime error:
    SNAP_NO_NEW_ENTRY
    runntime error,short dump could not be written
    and bellow that it generally says that SNAP is full and i need to create more free space
    any suggestions what i should do?
    ps.i ve tried the re-organize option and no luck, i need to take more drastic measures
    thanks

    check the below thread...
    [SNAP_NO_NEW_ENTRY;

  • "Resource Unavailable" error when trying to download a file.

    We're running the latest version of OS:X - 10.4.3 (recently upgraded from 10.3.9) and I've found that with the latest version of Safari we can no longer download files off certain websites of ours. Typically we have a link off a page which spawns a javascript window, which then contains the download link. When trying to "Download Linked File" to our desktop we get a "resource unavailable" error in the Downloads window.
    Oddly enough it doesn't affect all of Tiger installations. We noticed that those machines that were formatted first, then had Tiger installed did not have this problem, only the machines we upgraded from 10.3.9. I've tried re-installing the 10.4.3 combo updater to no avail. And JFYI, Firefox works without a hitch, but my fear is that we're going to run into problems where some of our clients are unable to grab files they require.
    Unfortunately, I cannot provide a link as they are to client files but I can try to provide any additional information needed to get to the bottom of this...
    Thanks,
    MJX.
    G4   Mac OS X (10.4.3)  

    Reworked some of the javascript for our webserver and fixed the problem.

  • Your profile option does not allow automatic numbering error when trying to load BSA

    We are getting this error while trying to load BSAs. The profile option is set to always at the responsibility level,
    The same code and settings were tested in lower instances and it went through fine
    Document sequence is set correctly.
    Any inputs to resolve this issue would be greatly appreciated. It has stopped out production Data conversi
    Thanks
    R

    Hi Winsky,
    Ensure Profile: Sequential Numbering must be set to: 'Partially Used' at app level
    Refer the following note and check whether it helps:
    I Get The Error: Your Profile Option Does Not Allow Automatic Numbering. [ID 560388.1]
    In Order Import stuck record with error "Your Profile Option Does Not Allow Automatic Numbering" [ID 1083645.1]
    Best Regards,

  • BIP Error when trying to produce txt file

    Hi all !
    I'm getting the follwing error when trying to generate a text output from a eText template in BIP:
    oracle.apps.xdo.servlet.scheduler.ProcessingException: oracle.apps.xdo.servlet.data.DataException: Invalid format requested: txt
         at oracle.apps.xdo.servlet.scheduler.XDOJob.generateReport(XDOJob.java:959)
         at oracle.apps.xdo.servlet.scheduler.XDOJob.execute(XDOJob.java:404)
         at org.quartz.core.JobRunShell.run(JobRunShell.java:195)
         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
    Caused by: oracle.apps.xdo.servlet.data.DataException: Invalid format requested: txt
         at oracle.apps.xdo.servlet.ReportException.fillInStackTrace(ReportException.java:124)
         at oracle.apps.xdo.servlet.data.DataException.fillInStackTrace(DataException.java:127)
         at java.lang.Throwable.<init>(Throwable.java:196)
         at java.lang.Exception.<init>(Exception.java:41)
         at oracle.apps.xdo.servlet.ReportException.<init>(ReportException.java:36)
         at oracle.apps.xdo.servlet.data.DataException.<init>(DataException.java:39)
         at oracle.apps.xdo.servlet.ReportImpl.renderScheduledJob(ReportImpl.java:328)
         at oracle.apps.xdo.servlet.scheduler.XDOJob.generateReport(XDOJob.java:953)
    The report execution is started from a BIP web service call (ScheduleRequest). It works fine for pdf, rtf, csv, html and xml formats, but i can't a text file containing only eText formatted data (fixed positions, mainframe like file). Here's a code sample:
    BI_WS.ReportRequest BIreportRequest = new BI_WS.ReportRequest();
    BIreportRequest.attributeLocale = "en-US";
    BIreportRequest.reportAbsolutePath = "/~user/toto/TEST_WS_BI.xdo";
    string reportFileExtension;
    if(reportType.Equals("flat")){
    BIreportRequest.attributeTemplate = "flattest.rtf";
    reportFileExtension = "txt";
    BIreportRequest*.attributeFormat = "txt";*
    }else{
    BIreportRequest.attributeTemplate = "doc1.rtf";
    reportFileExtension = "pdf";
    BIreportRequest.attributeFormat = "pdf";
    So the question is:
    What "attributeFormat" value (other than pdf, rtf, csv, html, xml) should i use to get a text ONLY file with the format specified in the eText template ?
    Does anyone have an idea on this ? Thank you in advance.
    ED
    Edited by: Edmundo2 on Aug 26, 2010 9:55 AM

    Just found the solution:
    You can't have a normal rtf template AND a eText template for a single report. In my case, i need two types of output, a "rich" one and a "flat text" one. So i'll make 2 separate reports for each output type. Thank you.
    Edited by: Edmundo2 on Aug 26, 2010 11:26 AM

  • Error when trying to load a flash file in to a dreamweaver document

    Every time I try to add flash content to my html site in
    dreamweaver (both version 8) I keep getting an error:
    "While executing onClick in Object Options.htm, the following
    javascript error occured:
    at line 55 of file "C:\program
    files\...\configuration\commands\object options.js":
    cannot find the file C:\program
    files\...\configuration\shared\common\cached\empty.htm.
    At line 55 of file "C:\program
    files\...\configuration\commands\object options.js":
    getDocumentDOM: Argument number 1 is invalid.
    Can anyone make any sense of this?
    I'm fairly new to web development, and new to dreamweaver and
    flash as a whole. Thank you in advance for any help!

    Hi Ravens Fan,
    Thanks again for your valuable input. I replaced the string manipulation functions with a path control. I think it works coz I can see the waveform data, rms values etc. And then you said if it works, do a Path to String on that...and I'm not exactly sure how to do that. I attached a snippet of the modified vi. you may refer the original vi snippet in my previous email.
    I appreciate it if you could help me again.
    Thanks.
    Attachments:
    read from spreadsheet2.png ‏283 KB

  • I get aq run time error when trying to load the latest version of iTunes. Help.

    I get a run time error when attempting to install the latest version of iTunes & now cannot access iTunes. Can anyone help me?

    Hi jalbany,
    Thanks for using Apple Support Communities.  This article has steps you can take for the error you're seeing:
    iTunes 11.1.4 for Windows: Unable to install or open
    http://support.apple.com/kb/TS5376
    Cheers,
    - Ari

Maybe you are looking for