Offline running - can "GetResources() for an embedded file ever work?

This question has come up in various guises in the past, but has often then become confused with other issues (see [t-5123126] ) so I've not been able to find a useful answer. I've tried to bring the problem down to the essentials, and just want to know if what I'm trying to do can ever work, or if I should just abandon Web Start for this particular need.
Our app is J2SE Swing and creates a Derby database locally on a PC. The application then captures keyed data and stores it on the local database. Persistence is via JPA (provider was Toplink, now EclipseLink).
The data capture is performed using laptops running the application "offline" with no network connection. This is because the location has no network access of any description. Periodically, each laptop is reconnected to upload its data to a central server.
To help with software distribution, we are using Java Web Start. All the jars are signed and the .jnlp file specifes offline usage is allowed.
When running the application while connected to the network, there are no issues - everything works fine.
When running offline, the application starts up so the Java Web Start caching is working and the code is obviously accessible. However, it throws a MalformedURLException within the EclipseLink code (which we do not wish to modify). The actual statement is:
Enumeration resources = classLoader.getResources("META-INF/persistence.xml"); META-INF/persistence.xml exists within one of the jar files specified as resources in the .jnlp file.
The classloader in question is the Java Web Start classloader ( com.sun.jnlp.JNLPClassLoader) which presumably retrieves classes and resources from the remote server or from the cache depending on how the app is being run. In online mode, the persistence.xml resource is found ok, in offline a MalformedURLException is thrown.
My question: is this a fundamental "restriction" of the Web Start environment in offline mode? i.e. it can't load resources such as this xml file from a cached jar using the format shown?. My feeling is that this is just the way it is, and I should move on and try another form of software distribution, but it seems a shame to abandon Web Start as it otherwise meets our needs.
Any relevent experience of this problem would be appreciated.
Edited by: GrayMan on Aug 21, 2009 8:20 AM

A system we're developing make use of a similar setup. I'm not sure if you run into this problem, but the classes in our app uses persistence annotations and do not rely on the orm.xml mapping file. After solving the persistence.xml show stopper, I could see that the application had really slow startup times in offline mode. By looking at the access logs in online mode, I could see that the app was requesting META-INF/orm.xml and META-INF/eclipselink-orm.xml. In online mode, the web server simply returned HTTP 404 with much delay. In offline mode, this resulted in really slow startup times due to timeouts for the mentioned requests.
Creating valid xml files bundling them into the jar file of course didn't help.
I successfully disabled lookup for eclipselink-orm.xml by specifying the following entry in persistence.xml:
<property name="eclipselink.exclude-eclipselink-orm" value="true"/>
To disable lookup for orm.xml, I modified the method loadStandardMappingFiles(String) in org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.MetadataProcessor (eclipselink 1.1.0).
Perhaps this is useful for someone else also.

Similar Messages

  • My computer was formatted but I need to access my old content on my itunes backups. Is there any way I can acquire these iTunes backup files ever again?

    My computer was formatted but I need to access my old content on my itunes backups. Is there any way I can acquire these iTunes backup files ever again?
    I tried recovery software but had no luck!

    You reformatted the drive in your computer. The backup files you want to access were overwritten when you re-formatted the drive. They are gone. There may be data recovery services that can get them back. Search google if you want. This has absolutely nothing to do with using an iPhone at this point. You deleted files on your computer...

  • HT1449 Now that i have my iTunes backed up on iCloud and iCloud Match running, can I delete the music files from my MacBook Pro?  It is running out of hard drive space.

    When I started this request in the Support section, I did not realize I was typing a subject into a header.  Sorry.
    My MacBook Pro is nearly full and I would like to rely on iCloud for my music with the hope of freeing up space by deleting the music files I have accumulated on this machine.  Can I just delete the files in the iTunes folder or is there some special procedure?
    Thanks in advance for your help on this.

    When I started this request in the Support section, I did not realize I was typing a subject into a header.  Sorry.
    My MacBook Pro is nearly full and I would like to rely on iCloud for my music with the hope of freeing up space by deleting the music files I have accumulated on this machine.  Can I just delete the files in the iTunes folder or is there some special procedure?
    Thanks in advance for your help on this.

  • Error: run postflight script for adobe common files

    error: run postflight script for adobe common files

    I am sorry can you please restate your inquiry.  If you can provide some more details regarding which Adobe Software you are inquiring about?  Which operating system are you using?  Finally what are you trying to accomplish when you receive this error?

  • How can i get my audio files to work on other computers in powerpoint?

    I have made a powerpoint presentation for a class. The task was to record ourselves speaking and import the audio files to go along with a slideshow presentation. I recorded in GarageBand and imported the files to iTunes and then into my presentation. The slideshow works on my computer, but once I try to play it on any other computer (both Mac and PC) the audio files are "unavailable" and don't play. What do I need to do so that the files can play?

    I don't use PowerPoint much these days, but I found this...
    http://office.microsoft.com/en-us/powerpoint-help/embedded-and-linked-sound-file s-in-a-presentation-HA001230307.aspx
    (It says to put the audio files in the same folder as the presentation file.)

  • Can't get a jar file to work

    Hi All,
    I have a moronic question. I have a simple jar file called xmlpowertoolkit.jar and I can't get any of the classes in it imported into my simple console app.
    I unpacked the jar file to look at the namespace hierarchy since I have no documentation with this jar file. It came out like this:
    xmlpowertoolkit\com\sabre\xmlpowertoolkit\
    ... then a bunch of classes in this directory. Specifically, there is a class called XMLPowerToolKit_Services that I need to use. Here is a typical constructor call for this class:
    XMLPowerToolKit_Services myvar = new XMLPowerToolKit_Services ();
    Can someone tell me what I'm doing wrong with this jar file? How do I import this namespace so that I can use the class?
    Do I not say:
    import com.sabre.*;
    Thanks for your help.
    Steven Tate

    Try
    import xmlpowertoolkit.com.sabre.xmlpowertoolkit.*;
    OR
    import com.sabre.xmlpowertoolkit.*;
    I think com.sabre.* will just get you the classes at that "level" ... it doesn't grab the classes in subfolders.
    i hope that works.

  • Can't get large sound file to work

    Hi all,
    I just upgraded to LR 3, and now can't get a large MP3 (8MB) to work with my slide show. Is there some new limitation on size? Something I am doing wrong. My plan is to just use a single slide to hitch a 1-hour "radio" show, create an MP4 to upload to youtube. I will embed this on my client's website -- so that I have a streaming thing. Get it?
    Thanks in advance for any answers.
    Pam

    The sound file is an MP3, and the little alert dealie shows, saying the file is not a valid music file -- even though it worked in LR1. (I just couldn't save the slide show as an MP4, that's why I upgraded.)
    pam

  • Can someone re-save these files to work with CS3 please?

    If someone could do me a huge favour and take a few moments to resave these with the INX option so that I can open them in CS3 please?
    If you are able to, please email the resaved copies to : [email protected]
    Files:
    https://drive.google.com/folderview?id=0BydO5E9Ictt-My1hNUJuNXBCV3c&usp=sharing
    Thanks for your help!!

    I've sent you a private message....

  • How can I get Adobe .pdx file to work online?

    Hi,
    I am researching the possibility of putting our extensive contract library on a web server so that all concerned will be able to access it.  It already has a web front end, with all the documents linked within the library, and all documents have been indexed.  The problem I am having is that I cannot get the pdx files to open from the internet, yet they are fine locally.  I either get an error that the index may need to be rebuilt (it works fine locally) or nothing at all happens.  I thought I found a solution suggesting using "file" protocol rather than http:... this triggered the dialogue box telling me that the browser was trying to open the index, but when I click OK, I get another error.  I've double-checked all URLs etc so it's not that.
    I'm using Acrobat Pro 9 (and 8 on a different machine) no luck in either.
    PDF is supposed to be a portable document  format, I would have thought the indexing feature would also be portable!
    If anyone knows how to get this to work in a standard web structure, please let me know.  If this will only work on a Linux server rather than a windows based server please let me know!  Any help much appreciated.
    Thanks in advance for you help

    A post that may be useful.
    http://forums.adobe.com/thread/528023?tstart=120
    Be well...

  • I can't get my CS6 files to work/convert on the Cloud.

    Ive chatted with tech and they have gone into my computer trying to convert, but could not get the project file to open. Thoughts or suggestions?

    What error message?
    More information needed for someone to help... please click below and provide the requested information
    -Premiere Pro Video Editing Information FAQ http://forums.adobe.com/message/4200840

  • How can i get my raw files to work?

    Hi on my mac i have purchased adobe photoshop elements 12 and am trying to import my raw images from my nikon d610 but it will not work, i checked and my camera is compatible but it says 8.5 minimum raw camera plug in version. how do i make this work?

    Please post Photoshop Elements related queries over at
    http://forums.adobe.com/community/photoshop_elements

  • Has "Publish for Approval" in Aperture ever worked?

    Has anyone ever been able to get "Publish for Approval" to work in Aperture? We've been struggling with it for a week, and can't seem to get it going.
    If anyone out there has been successful, I'd love to hear how.
    Thanks,
    David

    I'm not using RAID or NFS. My startup drive is the standard 160GB SATA internal of a G5 formatted as Journaled HFS+.
    I have filevault activated on a 2nd account on this computer, but not on the active account.
    Publish was working with the above drive configurations. The only things that have changed since it was working is the uprade to Aperture 2 and a range of various software updates that came through after installing 10.5.2 and Aperture 2.
    I am using Time Machine, which I activated around the same time as I started using Aperture 2, which was when Publish stopped working. However, Time Machine is only set to backup the desktop, docs and music folders of my home account, plus a 2nd internal drive. But I thought it was worth mentioning.
    As I wrote in the email (to Sal), Publish doesn't fail right away for me, it happens after several images have been processed, then I get a -1700 applescript error.

  • Embedded Files, how to use URLs

    We have some preliminary code which can embed files within PDF documents.  We were trying to extend it by having the FS entry of the Filespec dictionary be /URL and the F entry an RFC 1738 URL.  While it displays correctly in Acrobat, attempting to open it gives an error 14.
    Are URL Filespecs prohibited in embedded files?

    Offhand, I can't think of any explicit restriction in the language that prohibits it - but in restrospect, it really doesn't make sense that you can have a non-embedded file in the embeddedfiles name tree ;).
    I'll make a note to get that fixed in the next version of the spec...

  • JInternalFrame not opening in JAR file, but works when not in JAR

    I have a folder that contains multiple .class files. I make all the class files into one jar file with this command:
    jar cmf mainClass.txt myapplication.jar *.class
    The mainClass.txt contains the following:
    Main-Class: myapplication
    class-path: myapplication.jar
    The myapplication.class opens up a JDesktopPane inside a JFrame. It also contains a start menu, which again has elements that opens up misc JInternalFrames inside the JDesktopPane. The problem is this:
    When I run the application from a .bat file, everything works fine. However, after making the JAR Executable file, everything works except 1 JInternalFrame. Now, the code for this JInternalFrame is far too much to post, so I'll have to ask as follows;
    Are there any reason why a JInternalFrame would not work from inside a JAR Executable, but work when not in the JAR file? Especially when other JInternalFrames are working? What can make 1 JInternalFrame different from the others in this regard?

    Perhaps the problem lies somewhere else.
    Obviously if other JInternalFrames are working then there is a difference in the one missing internal frame that causes it not to show up.
    My guess is that perhaps you are missing one or two classes in your JAR that are used by that JInternalFrame and that an exception is being thrown causing it not to show.
    Double check the contents of your JAR and make sure that all the classes are present and that they are the right versions.

  • Linking an LOV to a form in webDB 3.0 and getting the help files to work ?

    Hi All I can link an LOV to a form in webDB 2.2 I can link an LOV to a report in webDB 3.0 but I cannot seem to figure out how to link an LOV to a form in webDB 3.0 can anyone help me ?
    Also I can't get the help files to work I get the message : Database Log In Failed ?
    null

    quote:
    Originally posted by:
    kglad
    lol, flash was confused?
    Ok... maybe I caused some confusion? In my nested MC, first I
    added some animation and keyframes and THEN I went back to name the
    instances. This caused multiple instances with the same name along
    my timeline thus "cunfusing" flash.
    My bad!
    live and learn! (hehe)
    Pat

Maybe you are looking for

  • Reinstall Acrobat 9

    I need to reinstall Acrobat 9 (I have the serial number from my original purchase) after a trial of XI Pro. Anyone have any luck with this? Adobe said they can't help and I just need to purchase the newest version.

  • Need more room in the browser name column

    I'm using markers on my clips with extensive notes which because of their length run off the column because I can't drag it any further to the right. Is there a way to expand the width of the name column to accommodate this so I can read the entire n

  • Skype Credit Bought on my Account - Need Refund

    £80 of Skype credit was bought on my account. I was locked out of my account as a result. How can I claim a refund?

  • I want to renew my membership

    Hello, I had the Adobe Creative Cloud Suite and I wanted to renew my service but its not allowing me to pull up my account. Can you please help

  • Automatic removing Midlet suite by another Midlet without user intervention

    I would like to use a Midlet to remove another Midlet which is already installed on the device. Could I do this? Are there any methods for doing this? Please help me! Thank you in advance.