Replace Unknown Source in EcmaError (JSR223) with actual file name

Hopefully someone here knows how to do this:
In my code, all of the scripts are contained in .js files. Whenever one of the scripts contains an error, I get this:
javax.script.ScriptException: sun.org.mozilla.javascript.internal.EcmaError: ReferenceError: "nonexistant" is not defined. (<Unknown source>#5) in <Unknown source> at line number 5
What bugs me is the <Unknown Source>. Multiple files are in one ScriptContext, and it can be hard to track down an error. It also looks horrible.
Is there a way to replace <Unknown Source> with the actual file name? None of the methods I see support passing a File object, so I'm really confused here.
Cross posted (and unanswered) at:
http://stackoverflow.com/questions/2885120/replace-unknown-source-in-java-rhino-jsr223-with-actual-file-name
http://www.javaprogrammingforums.com/exceptions/4465-replace-unknown-source-ecmaerror-jsr223-actual-file-name.html
http://groups.google.com/group/mozilla.dev.tech.js-engine.rhino
http://mozilla-xp.com/mozilla.dev.tech.js-engine.rhino/Replace-Unknown-Source-with-Script-file-name

You may need to set compile debug option set to true.
I am not sure if my tip is useful for you, anyway good luck.

Similar Messages

  • I just order 8 calendars from iPhoto and they came to me fine. Now I need to order two more but when I go thru the process I get a message  saying:unable to assemble calendar. There is a probleme with the photo with the file name"(Null)"   more........ .

    Would someone be able to explain to me the following issue with Iphoto?
    I ordered 8 same calendars for my soccer team and received them fine. Although a couple of pictures on it are a little off (out of focus). I need to order two more of the same calendars but when I go thru the process ireceive an error message saying:
    "Unable to to assemble  calendar" There is a problem with the photo with the file name "(Null)" The full resolution version of this photo either cannot be located or is corrupt. Please replace this photo or delete it from your calendar.
    How can  I fine this "corrupt" photo? How did it go thru with the first batch of calendars but won't go thru now?
    Thank you for your help.   

    Apply the two fixes below in order as needed:
    Fix #1
    Launch iPhoto with the Command+Option keys held down and rebuild the library.
    Since only one option can be run at a time start
    with Option #4 and then #1 as needed.
    Fix #2
    Using iPhoto Library Manager  to Rebuild Your iPhoto Library
    1 - download iPhoto Library Manager and launch.
    2 - click on the Add Library button, navigate to your Home/Pictures folder and select your iPhoto Library folder.
    3 - Now that the library is listed in the left hand pane of iPLM, click on your library and go to the File ➙ Rebuild Library menu option.
    4 - In the next  window name the new library and select the location you want it to be placed.
    5 - Click on the Create button.
    Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments.  However, books, calendars, cards and slideshows will be lost. The original library will be left untouched for further attempts at fixing the problem or in case the rebuilt library is not satisfactory.
    OT

  • File name in msdb.dbo.backupset no longer matches the actual file name on the storage media. Error 3013 Restore Database is terminating abnormally.

    Thanks in advance for taking the time to read this and comment. Platform: Windows Server 2008 R2 Enterprise Edition SP1 (X64) Microsoft SQL Server 2008 R2 (SP1) - 10.50.2500.0 (X64) Jun 17 2011 00:54:03 Copyright (c) Microsoft Corporation
     Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)Problem Description: The file name recorded in the msdb.dbo.backupset (sans the extension) no longer matches the actual file name written to the backup media which is
    in this case a NETAPP NAS storage share. Example:
    Mohave_backup_2014_03_14_233001_1158878.bak      (from NETAPP NAS filer)
    Mohave_backup_2014_03_16_233001_4167237             (from MSDB.dbo.backupset), as you can see, the last 7 digits (chars) of the file name are different, although the date and time are identical. The
    file names had previously been matching perfectly. The first occurance of this problem occured on 03/13/2014 at 5:00 AM MST. The error generated by the job was:
    Date  3/14/2014 10:29:23 AM
    Log  Job History (Refresh - Restore Mohave_93_DEV AD HOC)
    Step ID  1
    Server  OurDevServer
    Job Name  Refresh - Restore Mohave_93_DEV AD HOC
    Step Name  Restore Mohave_93_DEV
    Duration  00:00:01
    Sql Severity  0
    Sql Message ID  50000
    Operator Emailed  
    Operator Net sent  
    Operator Paged  
    Retries Attempted  0
    Message
    Executed as user: OurDomain\OurNetworkServiceLogin. Restore Mohave Prod to Mohave_93_DEV - ERROR: 3013 RESTORE DATABASE is terminating abnormally. [SQLSTATE 01000] (Message 50000).  The step succeeded.

    Olaf:
    Thanks for your reply. Sorry, my bad. I inadvertently copied wrong [name] form the msdb.dbo.backupset. On 3/13 and 3/14, the two file names did not match. In trying to select another example to show you this morning, I found that the names are now matching!
    What I was doing was to create dynamic t-sql to retrieve the latest prod backup of the database, and then restore it with move to the development server. This is an ad-hoc job that the developers can run by themselves whenever they require a refresh. Unfortunately,
    we only keep 3 days worth of backups for these databases, so the original disk file I was trying to use to restore no longer exists. Researching the original error, one of the error descriptions was that the restore could not find the file requested.
    I thought this very strange since I get the file name directly from the backupset table. Further research did indeed show that the file names were different, but unfortunately, I failed to save the details of the file names. Anyway, in looking for a new example
    to show you this morning, I have found that the file names are indeed matching exactly again. If this error pops up again, I will be sure to save all details and re-post.
    Thanks, regards and best wishes to you and yours, 

  • I want the actual file name of my song to be edited through itunes

    Hello to all,
    I have spent a significant time of my life to keep my music folder very well organized. Then after a few years, I discovered itunes and I started to organizing and tagging my music files through itunes. Everything works well with no problems....
    Now, here is the thing.
    I know that itunes works with mp3 tagging or something similar (not an expert). So, if I copy the songs of an itunes playlist to my friends (dropbox, usb drive etc) and they are not using itunes, then the file names of the songs included in the playlist is totally crap. If they open it in itunes or other similar software is pitch perfect. But most of them they go through: "open folder"/"read file name"/"play song". So they cannot even find the songs they want....
    So, is there a magic way (i.e. not manual) that the actual file names of my songs will be edited by itunes according to my so lovely and beautiful (lol) itunes tag?
    Any help would be more than welcomed and even celebrated as well!
    Cheers
    BG

    iTunes reorganizes files stored inside the iTunes Media folder to reflect changes to tags if the advanced preference "Keep iTunes Media folder organized" is selected. If for some reason it has failed to do this turning the preference off, and then back on again normally resolves things, although iTunes won't make minor case corrections, e.g. The beatles to The Beatles. iTunes uses the structure <Artist>\<Album>\[D ]## <Name>.<Ext>
    If the files are stored outside the media folder, or that preferences is turned off, then the file & folder names are left alone when you edit the tags. Consolidating the library will bring in copies in the standard format.
    However, unless we are talking about songs you have personally composed and recorded, you have no right to give copies of your songs to your friends, they should buy their own copies (or you could buy them for them).
    tt2

  • Need to generate multiple error files with rule file names during parallel data load

    Hi,
    Is there a way that MAXL could generate multiple error files during parallel data load?
    import database AsoSamp.Sample data
      connect as TBC identified by 'password'
      using multiple rules_file 'rule1' , 'rule2'
      to load_buffer_block starting with buffer_id 100
      on error write to "error.txt";
    I want to get error files as this -  rule1.err, rule2.err (Error files with rule file name included). Is this possible in MAXL? 
    I even faced a situation , If i hard code the error file name like above, its giving me error file names as error1.err and error2.err. Is there any solution for this?
    Thanks,
    DS

    Are you saying that if you specify the error file as "error.txt" Essbase actually produces multiple error files and appends a number?
    Tim. 
    Yes its appending the way i said.
    Out of interest, though - why do you want to do this?  The load rules must be set up to select different 'chunks' of input data; is it impossible to tell which rule an error record came from if they are all in the same file?
    I have like 6 - 7 rule files using which the data will be pulled from SQL and loaded into Essbase. I dont say its impossible to track the error record.
    Regardless, the only way I can think of to have total control of the error file name is to use the 'manual' parallel load approach.  Set up a script to call multiple instances of MaxL, each performing a single load to a different buffer.  Then commit them all together.  This gives you most of the parallel load benefit, albeit with more complex scripting.
    Even i had the same thought of calling multiple instances of a Maxl using a shell script.  Could you please elaborate on this process? What sort of complexity is involved in this approach.? Did anyone tried it before?
    Thanks,
    DS

  • Help with add file name problem with Photoshop CS4

    Frustrating problem: Help with add file name problem with Photoshop CS4. What happens is this. When I am in PS CS4 or CS3 and run the following script it runs fine. When I am in Bridge and go to tools/photoshop/batch and run the same script it runs until it wants interaction with preference.rulerunits. How do I get it to quit doing this so I can run in batch mode? Any help is appreciated. HLower
    Script follows:
    // this script is another variation of the script addTimeStamp.js that is installed with PS7
    //Check if a document is open
    if ( documents.length > 0 )
    var originalRulerUnits = preferences.rulerUnits;
    preferences.rulerUnits = Units.INCHES;
    try
    var docRef = activeDocument;
    // Create a text layer at the front
    var myLayerRef = docRef.artLayers.add();
    myLayerRef.kind = LayerKind.TEXT;
    myLayerRef.name = "Filename";
    var myTextRef = myLayerRef.textItem;
    //Set your parameters below this line
    //If you wish to show the file extension, change the n to y in the line below, if not use n.
    var ShowExtension = "n";
    // Insert any text to appear before the filename, such as your name and copyright info between the quotes.
    //If you do not want extra text, delete between the quotes (but leave the quotes in).
    var TextBefore = "Lower© ";
    // Insert any text to appear after the filename between the quotes.
    //If you do not want extra text, delete between the quotes (but leave the quotes in).
    var TextAfter = " ";
    // Set font size in Points
    myTextRef.size = 10;
    //Set font - use GetFontName.jsx to get exact name
    myTextRef.font = "Arial";
    //Set text colour in RGB values
    var newColor = new SolidColor();
    newColor.rgb.red = 0;
    newColor.rgb.green = 0;
    newColor.rgb.blue = 0;
    myTextRef.color = newColor;
    // Set the position of the text - percentages from left first, then from top.
    myTextRef.position = new Array( 10, 99);
    // Set the Blend Mode of the Text Layer. The name must be in CAPITALS - ie change NORMAL to DIFFERENCE.
    myLayerRef.blendMode = BlendMode.NORMAL;
    // select opacity in percentage
    myLayerRef.opacity = 100;
    // The following code strips the extension and writes tha text layer. fname = file name only
    di=(docRef.name).indexOf(".");
    fname = (docRef.name).substr(0, di);
    //use extension if set
    if ( ShowExtension == "y" )
    fname = docRef.name
    myTextRef.contents = TextBefore + " " + fname + " " + TextAfter;
    catch( e )
    // An error occurred. Restore ruler units, then propagate the error back
    // to the user
    preferences.rulerUnits = originalRulerUnits;
    throw e;
    // Everything went Ok. Restore ruler units
    preferences.rulerUnits = originalRulerUnits;
    else
    alert( "You must have a document open to add the filename!" );

    you might want to try the scripting forum howard:
    http://www.adobeforums.com/webx?13@@.ef7f2cb

  • How do i print a photo with the file name

    This seem stupid simple but I cannot find an answer anywhere. I want to print out hardcopies of phots with the file name printed with the photo. In Windows there is a program called Picture Manager (which has been eliminated in Office 2013) where you can open a folder of images, rename them individually or in batches, resize, edit, etc, all in one lovely program. You can print out individual or contact sheets with specific information for each image. Easy, one program, easy results.
    Is there a comparable program for the Mac? I have searched the web and can only find suggestions that use multiple progams, downloads, plugins, and convoluted work arounds to do this. I have tried printing contact sheets in iPhoto but it crashed each time. Our IT guy suggested moving the images into an album and printing from there but it still crashes. And even if it worked I want large image per page but iPhoto leaves a large amount of white space.
    The quickest way I have figured out is this:
    Select the images in Finder, make a separate folder and copy the images there. (3steps)
    Locate the folder in Finder and drag it to the Bridge icon (4steps)
    Select the images in Bridge, adjust the output settings and Save as a pdf (6steps)
    Locate the pdf in Finder, open in Acrobat, select the images (again!) and print (9steps)

    GraphicConverter, from here:
    http://www.lemkesoft.com/

  • Bug:Downloading pdf file from the web,file name in dialog box populates with incorrect file name

    Hi Gurus
    When downloading any pdf file from the web using adobe Reader X the file name dialog box populates with incorrect file name
    compared to the saved file name of the document downloaded.
    Clarity
    1. Download any pdf file from the web
    2. Click File, Save as note the populated File Name
    3. Compare the populated file name with the saved file name of the documant yuo are downloading.
    4. The file Name is incorrect...
    Is there any work around on this issue?Can someone please help?..
    OS:Windows7
    Reader: Adobe Reader X
    I've tried a couple of other versions and still get the same results...

    Are you downloading the file (right-click, save link as), or just opening it by clicking it?
    If the latter, then what happens is the file is loaded to the temporary internet files folder by IE and assigned a temporary name, which is then used when you're trying to save it.
    You can test this out by going to File - Document Properties before trying to save and looking at the file's location.

  • Save As with suggested file name and folder

    I would like the user to be able to press a save button on the pdf and the "Save As dialogue box" pops up pre-populated with a file name and location choosen. The user can then choose to name the file something otherwise or select a new location. I would just like to save them the steps of copying the field data and finding the correct folder (deeply buried on server) however to place the finished document in.
    This doesn't seem to require a trusted function, but how do I suggest the file name based on a field name in the document. And how do I suggest the folder the document should be saved into?
    Thanks in adavance.

    Hi,
    you need a folder level script to use the browseForDoc method.
    http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/js_api_reference.pdf#page=10 4

  • Export with dynamic file name

    Hi everyone.
    I want to know how export oracle tables with dynamic file name on windows XP platform.
    bye.

    You'd have to generate the export command-line or par file using a script -- Windows or SQL !
    It would be easy to use SQL to generate the script.
    So you could have a BATch file that
    a. Calls the SQL to generate the export command-line or parfile
    b. Executes the export
    even possibly run in a loop.
    Hemant K Chitale

  • Issue with attachment file name

    Hi All,
    This is about an issue with attachment file name:
    we have a scenario wherein we have payload with attachments ...(attachments can be any doc ,pdf) , problem is main document is comming with messageid.sap.com and thats normal but attachments are comming with file names for example something.pdf or something.doc or something.txt ...this is failing in adapter as it expects same name as u have in main document...anybody have any idea to get through this issue...
    Regards
    kiran

    we have a scenario wherein we have payload with attachments ...(attachments can be any doc ,pdf) , problem is main document is comming with messageid.sap.com and thats normal but attachments are comming with file names for example something.pdf or something.doc or something.txt ...this is failing in adapter as it expects same name as u have in main document...anybody have any idea to get through this issue...
    - <SAP:Payload xlink:href="cid:payload-4CED452F17C601BDE10080000A492050---sap.com">
      <SAP:Name>1 .Header1.txt</SAP:Name>
    Error we are getting is
    Cannot cast 'Header' to boolean] in class com.sap.aii.mappingtool.flib7.NodeFunctions method createIf[Header, com.sap.aii.mappingtool.tf7.rt.Context---27a73bfa]
    So we have to change the File name Header1.txt to something which we can cast to creatif....(we cannot tell the sendr to change the file name as its is set already)
    Thanks for interste and assisting
    Regards
    Kiran

  • If I rename a clip in PPro, is there a command to change the actual file name like in FCP7?

    In FCP7 I could rename a clip in FCP and then use a menu command to change the actual file name to match:
    Can I do this in PPro or Prelude?
    Thanks!
    MtD

    This option is only available in the Project Manager.
    FEATURE request

  • IDoc to File with different file name and data based on the IDoc header dat

    Hi,
    I got a requirement to implement IDOC to file senario.  In this the Converted file should have the file name and file content based on IDoc Header data.  Means If one of the IDoc header field value is
    'A'  - then the file name recieved by reciever system should be 'A.txt' and with the columns A  B  C  D  F.
    'B'  - then the file name recieved by reciever system should be 'B.txt' and with the columns C  D  F.
    In both the case IDoc message type is same.
    Please suggest me what i need to do to achieve this.
    Thanks in Advance. ...
    Regards
    Sri

    Hi,
    As per my requirement, we need to create one file for each IDoc based on IDoc header data. SAP program generates 10 IDocs for each run. All 10 IDoc's message type is same.  Each IDoc has one header record with the file name. Base on the  name in the IDoc header record, file needs to be created with different columns and file name. Means..
    IDoc 01- Header Description contains 'A' - than file will be generated should have name as 'A.txt' and columns 'parent'  'child' 'descripion'.
    IDoc 02- Header Description contains 'B' - than file will be generated should have name as 'B.txt' and columns 'Name' 'Department' 'Description'.
    IDoc 10- Header Description contains 'J' - than file will be generated should have name as 'J.txt' and columns 'Order No'  'Materail' 'Description'.
    Hope this will give more clarity on my requirement. Please let me if you are still not clear on requirement.
    Thanks for your all help..
    Thanks & Regards
    Sreeni

  • Seeing actual file names on .idml files

    In indesign cc 2014 when I open .idml files I want to see the “file name.idml” instead of “untitled.idml”. like in previous versions of Indesign cs3 where you could see the file name as “filename.inx”. I’m working on multiple files and have to save them down for the customer and it just keeps the confusion down.

    Thanks for the answer - I know ID CS3 version you could see the actual file name "filename.idml" - i used to do that in CS3 all the time - but I guess IDCC got rid of that feature - I asked Indesign Facebook page and this is what they replied: "Unfortunately, the feature doesn't exist in ID at the moment but our team has received your request ^A"

  • Spotlight has stopped working properly. Even when a known file is entered (with full file name) in search, it fails to find it. Any ideas?

    Spotlight has stopped working properly. Even when a known file is entered (with full file name) in search, it fails to find it. It finds some things, but is not to be depended upon. Any ideas?

    Try reindexing spotlight: Spotlight: How to re-index folders or volumes - Apple Support
    If you still have problems, open Console app, select All Messages, then search for mds in the search field. Then search for mdworker. See if there are any messages indicating it is having problems with certain files.
    You can also delete the index altogether and cause it to reindex with a command in Terminal. I have always assumed the method above will do the same, but I'm not certain. You must run this command while  logged into an admin account. Copy the whole line and paste it into Terminal.
    sudo mdutil -E /
    sudo temporarily elevates your privileges and will ask for your password. When you type it in, there won't be any response in the Terminal. Just type it and hit return.

Maybe you are looking for

  • Libraries-MS no longer working

    Under the heading of Libraries-MS (i.e. Documents, Music, Pictures, Videos) I get the message "no longer working - Delete headings, folders will not be affected". Pictures are stored elsewhere, but documents I cannot access/or save new ones. I do not

  • Course Cost - Free of Charge

    Dear Experts, I have created a course with internal and external price. But when the user view the course details in Learners Portal, Free of charge is displayed. I have made the settings as below, In OOKR transaction, I have set the SEMIN CCOST to '

  • Integration with Adobe Photoshop Elements 4

    I would like to migrate to Adobe Photoshop Elements 4 for Mac and would like to know how it will integrate with iPhoto. My photos are stored in iPhoto, could I edit them using PE4? How should I generate slideshows? Do I use PE4 or iPhoto? Could I imp

  • *Urgent*How to insert data from MS SQL to the table that create at the adobe form?

    Hi, I'm using Adobe life cycle designer 8 to do my interactive form. I would like to ask how to insert data from MS SQL to the table that i have created in my adobe interactive form? I really need the information ASAP as i need to hand in my project

  • Error -2048:H

    Quite recently MOVxx.MOD files cannot be opened anymore and a message 'error -2048:H' appears. Different attempts failed. Even QT de-installed and re-installed. Sometimes, the error message is: this file is not a movie file. Have executed totally cle