Lazy downloading broken for updated jar-files?

Hello,
Using webstart-6.0 + jar-index + download="lazy" works great - jar files are downloaded on demand when they are really needed.
However when updating all jar-files, the files that have been downloaded lazily and cached before are downloaded again before the application can be launched, not only on demand.
Is this the intended behaviour, and is there any way to let webstart lazily download updates, just when the jar-files are needed?
Thank you in advance, lg Clemens

Libraries loaded from the j2ee/home/lib directory are opened and loaded at the J2EE container level. So they are accessed from the very start of the server, to the point where it is stopped.
Therefore if you modify a class library which has already been loaded, you may run into file locking related issues (which will be OS dependent, Windows for example probably won't even let you overwrite the file) so that is what you are likely to be seeing.
JAR files loaded at the J2EE container level aren't really suitable for dynamic updating -- the classes can be referenced in a multitude of other classloaders.
As you have seen, replacing a J2EE container level class file, then a restart will be required along the lines of what you have written.
Stop mid-tier, move new file in and restart?? cheers
-steve-

Similar Messages

  • Update jar file with modified class files

    hi all,
    I'm developing a jar utility for updating a jar file with modified class files as of now i have reached a point where in i can browse files and set it to required location
    i.e i have developed a swings GUI application using JfileChooser and browse the files ..now my requirement is to update the jar files with modified class file
    GUI looks like below
    ....enter the modified class file ----> d:\c.class
    ....enter the jar file path ---> d:\a.jar
                                                          update button now i have the requirement as
    1> when i click on the update button ,my jar file (a.jar) should get updated with the latest class file (c.class)
    can u help me to achieve this requirement.???
    im stuck with this,,,if u can provide me wit the code for updating jar file with latest class file...it will really be helpful
    if u can help me with the code on click on update button it will be really helpful
    Thanks and expecting a faster response from u all java experts....

    Please find my query in bolds...i have written the partial code now,i need some help now
    hope u guys can help me out...
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.File;
    public class FileExplorer extends JDialog implements ActionListener
         JTextField txtLocation_class;
         JButton btnBrowse_class;
         JLabel label_class;
         JTextField txtLocation_jar;
         JButton btnBrowse_jar;
         JLabel label_jar;
         JButton updatebutton;
         public FileExplorer()
                   setSize(600,300);
                   //for class files
                   label_class = new JLabel("Please select Modified Class File");
                   txtLocation_class= new JTextField(20);
                   btnBrowse_class = new JButton("Browse");
                   btnBrowse_class.addActionListener(this);
                   //for jar files               
                   label_jar = new JLabel(" Please select the Jar file");
                   txtLocation_jar= new JTextField(20);
                   btnBrowse_jar = new JButton("Browse");
                   btnBrowse_jar.addActionListener(this);
                   ActionListener updateListener = new ActionListener(){
                    public void actionPerformed(ActionEvent ae){
                     if(ae.getActionCommand().equalsIgnoreCase("Update")){               
                      System.out.println("ae.getActionCommand() :: "+ae.getActionCommand());
                      System.out.println("Update Button is pressed");               
                    *//Query :how do i access FilePath and FilePath1 here which*
    *                // has been set in public void actionPerformed(ActionEvent ae)*
    *                //method below*
    *                // FilePath  ---??*
    *                // FilePath1  ---??*
    *                // how do i access the above 2 parameters*
    *                //Query :on click of update button i have to pass*
    *                //two parameters FilePath and FilePath1 to*
    *                //perform some functionality. please help me*
    *                //to achieve this..how do i access Filepath and Filepath1*
    *                //here which has been set below.*
                     } // end of if               
                   } // end of actionPerformed
                };// end of ActionListener
                  updatebutton = new JButton("Update");
                  updatebutton.addActionListener(updateListener);
                   //adding to the panel               
                   JPanel pnl = new JPanel();
                   pnl.add(label_class);
                   pnl.add(txtLocation_class);
                   pnl.add(btnBrowse_class);
                   pnl.add(label_jar);
                   pnl.add(txtLocation_jar);
                   pnl.add(btnBrowse_jar);
                  pnl.add(updatebutton);
                   getContentPane().add(pnl);                         
         public void actionPerformed(ActionEvent ae)
              Object obj=ae.getSource();
              if(obj==btnBrowse_class)
                   final JFileChooser fcstudent = new JFileChooser();
                   int rtrnval = fcstudent.showOpenDialog(this);
                   if(rtrnval==JFileChooser.APPROVE_OPTION)
                        try
                             File file=fcstudent.getSelectedFile();                         
                             String path = file.getPath();
                             System.out.println("This is Path:"+path);
                             txtLocation_class.setText(""+path);
                             String FilePath=txtLocation_class.getText();
                             System.out.println("FilePath is ::"+FilePath);                                        
                        catch(Exception ex)               
                             ex.printStackTrace();
              }else if(obj==btnBrowse_jar){
                             final JFileChooser fcstudent = new JFileChooser();
                             int rtrnval = fcstudent.showOpenDialog(this);
                             if(rtrnval==JFileChooser.APPROVE_OPTION)
                                  try
                                       File file=fcstudent.getSelectedFile();                         
                                       String path1 = file.getPath();
                                       System.out.println("This is Path:"+path1);
                                       txtLocation_jar.setText(""+path1);
                                       String FilePath1=txtLocation_jar.getText();
                                       System.out.println("FilePath is ::"+FilePath1);                                        
                                  catch(Exception ex)               
                                       ex.printStackTrace();
         public static void main(String arg[]){
                   FileExplorer Exm= new FileExplorer();
                   Exm.setVisible(true);
    }

  • Error  While Opening an Updated JAR file

    Frnds,
    I have some problem with a JAR file update. Seek ur help in this regard.Here goes my problem.
    I need to update a jar file ( need to replace a single .class file with a new one ). I updated the JAR file using ' jar uf ' command and it was successfull.. I removed the old JAR file and replaced it with the updated JAR file. But when i tried to invoke the JAR application using Java we start iam unable to open the applicaiton. But when i replace this upadted JAR file with the old JAR file ( using the backup) the application loads correctly.
    The application is hposted in Apcahe web server. Is a server restart required after deploying the updated JAR file or is this porblem due to some other reasons.
    Thanks in advance.
    Regards,
    Bala.

    It appears that the New Report .vi only accepts the .xlt template format and not .xltx as one would commonly expect. I am currently working to determine for sure that this is the case, but it does run (mostly) properly on my end if you make that change.
    When I say mostly, I mean there are a couple other minor issues with your code. First the first frame of your sequence structure is really accomplishing anything. If your intent is to open a reference to the excel template, there is no need because the New Report .vi does it automatically.
    Second, you will need a file path of some sort wired in to your Save Report to File .vi or else you will get a different error message after fixing the .xlt issue. I am currently researching whether this should be marked as a required terminal instead of recommended so that it not being wired would result in a broken run arrow rather than an error.
    Let me know if these suggestions resolve your issue, or if I can provide further input on what you are doing in your first frame. I will touch base again once I determine whether these are expected behaviors or bugs.
    Christopher S. | Applications Engineer
    Certified LabVIEW Developer
    "If in doubt... flat out." - Colin McRae

  • Detecting updated JAR files

    Hi,
    I have a problem that shows up somewhat infrequently. Once in a while, when I start my offline-allowed application, newer versions the application (e.g. updated JAR files) are not automatically downloaded. If I close the application and restart, the newer JAR files are properly downloaded. Has anyone else seen this problem?
    A perhaps related question I have is how long does web start wait for the head request to come back when it checks for newer JAR files?
    Thanks,
    Joe

    this post may help
    http://forum.java.sun.com/thread.jsp?forum=38&thread=452567

  • Programatic way of updating jar files

    Is there a programmatic way of updating jar files (efficiently)? What I am looking for is an equivalent of jar -u option available in JDK 1.3.
    The only way I have right now is to create a new jar file, add the new files into this file and then add the entries from the original.
    Spawning jar -u ... is also not a desired option.
    Thanks in advance,
    Bharat

    What am looking for is a programmatic way from my Java program to do so without calling jar -u ...
    The method I am looking for is using the java.util.zip/java.util.jar packages to acheive the same result as jar -u...

  • Updating jar files in ALSB 2.6

    How do we update jar files imported in ALSB projects? Once they have references to them it does not seem feasible to replace them with new version?

    I may not have been clear in my initial post. My questions pertains to jar files that provide POJOs for java callouts. Above link discusses updating project jar with a new version. To create new version of project jar, I think i would first need to update the jar that provides POJOs. Please correct me if there is another way to do it.

  • Updated JAR files in j2ee/home/lib

    We are developing and deploying j2ee applications to a 9.0.2.3 9iAS server. We have a framework.jar file that we have a number of applications in two OC4J instances (home and portal) that need to use this jar file. As a result, we place the jar file in the j2ee/home/lib directory since this could be seen by all applications. My question comes in when we try and update this jar file. We seem to experience problems when moving a new framework.jar file into the directory. We mainly notice this issue in our EM Website. We begin to get the following error in the EM Website after we move an updated jar file into the directory:
    Servlet error: Renderer failed: java.lang.InternalError: jzentry == 0
    I've seen this error before and it seems to link back to a problem with jar files. If I remove the new jar file the error disappears. We are eventually able to get the jar file in, but only after restarting the whole mid-tier. Is this normal? Should we have to restart the server everytime we update the jar file? If so, what would be the best way to implement the new jar files? Stop mid-tier, move new file in and restart??
    Would you recommend a different location for this jar file?? Our biggest concern is that we only want to deploy this jar file one time and have all applications that need it find it. Thanks in advance for any input you might have.
    Beth

    Libraries loaded from the j2ee/home/lib directory are opened and loaded at the J2EE container level. So they are accessed from the very start of the server, to the point where it is stopped.
    Therefore if you modify a class library which has already been loaded, you may run into file locking related issues (which will be OS dependent, Windows for example probably won't even let you overwrite the file) so that is what you are likely to be seeing.
    JAR files loaded at the J2EE container level aren't really suitable for dynamic updating -- the classes can be referenced in a multitude of other classloaders.
    As you have seen, replacing a J2EE container level class file, then a restart will be required along the lines of what you have written.
    Stop mid-tier, move new file in and restart?? cheers
    -steve-

  • Why tomcat is still looking for old jar files?

    Please help me it is a very serious problem.
    I updated one of the jar files used by the project. I am using a new method that is available only in the new library. I removed the old jar files in my local system, and everything worked fine. Then I commit those files to the subversion, which is in the testing server, and then I created the war file. The war is successfully created, then I deployed to the tomcat. But, now there is an error in the portion I am using the method that is only available in the new jar files.
    One of the error when I go to that portion is:
    1. No Such Method Exists
    The other errors on log files are:
    1.
    WARNING: Failed to open JAR
    java.util.zip.ZipException: No such file or directory
    2.
    validateJarFile(tomcat/webapps/ROOT/WEB-INF/lib/j2ee.jar) - jar not loaded. See Servlet Spe
    c 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
    Please help me, I have tried every other way to solve this. I have tried removing all the old jar files there were, and replacing with the new one. I have tried creating a war file and ftping to the testing server.
    I problem is still there and it is because the testing server's tomcat is still looking for old jar files. I used Netbeans and add jar files as usual method.

    Check the contents of your WAR file that you are deploying on the testing server to see if it contains the JAR that you can't find.
    More than likely you are building your WAR file and your new JAR file is not being included in the build.

  • How to make the browser reload an updated jar-file?

    Hi there,
    Previosly when running applets using MSIE, all needed to reload an updated jar-file was pressing CTRL+F5
    Currently I've been assigned to re-develop some of my old applets and now I realize that the old CTRL+F5 won't do the trick any more since the old jar file is still in the cache and the new jar file is not loaded.
    I learned the hard way that all I can do is to manually clear the cache of the browser (Tools | Options | Delete files) and restart the browser and after that the new jar file is correctly loaded.
    Cache settings of the browser is set to "Reload on every visit to the page"
    Currently running Win2k, MSIE 6.0 SP1 and MSJVM 3809 but the problem also exists on Win2k, MSIE 6.0 and MSJVM 3186.
    Isn't there any easier way to do this?
    Currently I don't even mind not caching the jar-files at all as long as I don't get my development work trashed by having to restart the browser after every new build...
    Why has the old CTRL+F5 behaviour been changed?
    BR
    /Jonas

    I have been closing IE and reopening it for 7 months now. I don't of any other way to reload an applet.
    Jason

  • How to download connector Quickstart distribution .jar file to connect H2 databse

    Hi,
    I am using CQ5.4 version and i want to connect H2 Database with my cq5 instance. From the tutorial i got to know that i need to download connector Quickstart distribution .jar file.
    But i am not able to figure out where i can get this file.
    I have already  downloaded H2 databse.
    Plz help  me as i need to complete this task as soon as possible
    Thanks in Advance....

    If you are refering to JDBC connector [1] I would recommend not to use it.  The connector has been in beta mode and we are in the process of correcting/removing the page for the JDBC connector.   Instead  use the respective JDBC driver and convert it into an OSGI bundle which can then be referenced in your custom JDBC client code to perform all DB activities. More details refer [2].
    [1]   http://dev.day.com/docs/en/crx/connectors/jdbc/current.html
    [2]   http://dev.day.com/content/kb/home/cq5/Development/HowToConfigureSlingDatasource.html

  • Best practices for managing jar files

    just wondering what anyone's thoughts are on managing jar files. I have read that instead of adding the jar files to your CLASSPATH environment variable, you can just extend the jdk. This is accomplished by inserting the jar files into the C:\jdk1.3.1_01\jre\lib\ext directory. I suspect that if the latter option is truly feasible, it would be preferred to adding entries to the CLASSPATH variable for every jar file you want to use. You could end up with hundreds of entries into the CLASSPATH variable if you have that many jar files in use.
    Any thoughts, comments, or links to where I can find any info on this?...
    thanks for any information.....

    In my company, we use scripts (in UNIX system) to handle this problem. The following scripts can iterate jar files in a given directory:
    for i in ${YOUR_LIB_DIR}/*.jar
    do
    YOUR_CLASSPATH=${YOUR_CLASSPATH}:$i
    done
    With this simple script, you can use any directory in the same way as the ext\ direcotry (just copy the jar file in it), and you still have the flexibility of maintaining jar files in different directories, say a number of projects.
    but i don't know whether .bat/.cmd scripts for windows have the same function.

  • Looking for a JAR file...

    I am looking for the jar file that has the following in it:
    com.sapportals.portal.htmlb.page.JSPDynPage;
    com.sapportals.portal.htmlb.page.PageProcessorComponent;
    Can someone PLEASE PLEASE email it to me?
    My email address is [email protected] .
    Thank You?

    I do not have NWDS installed (that is a whole other issue).
    But someone did send me the file.
    Plus, I already had it but just did not know where to look. Now I know where to look.
    Thank you

  • Where do Downloaded Kindle for MAC ebook files reside?

    Where do Downloaded Kindle for MAC ebook files reside?

    I use PDF Reader Pro, though it is not coming up in the windowsphone.com website.
    there is another one called a better PDF reader: http://www.windowsphone.com/en-us/store/app/a-better-pdf-reader/75ccaa96-e827-486c-82d2-fa6676c24a02
    and I also use File Hub: http://www.windowsphone.com/en-us/store/app/file-hub/eb83936a-6e24-4729-ba17-2100870ec17b
    but just like AH said above, you can tap+hold/delete and find the files if they are there.
    with the PDF Reader Pro: once I download and view a file, it will always show in that reader until I delete it.
    when I download and open a pdf, it gives me the option to open it with a list of the products that I have installed that can view them.

  • Incremental update jar files

    Hi,
    I want to update a jar file but everything I do ends in
    "Missing version field in response from server when accessing resource".
    Do I need a version.xml? If I need this how should it looks like? Could someone write an example for that mission?
    Regards,
    Patrick
    Thats my project:
    /myapp/myapp.html
    /myapp/myapplication.jar
    /myapp/myapplication.jnlp
    /myapp/myapplication.jpg
    /myapp/meta-inf/Manifest.mf
    /myapp/web-inf/web.xml
    /myapp/web-inf/lib/jaxp.jar
    /myapp/web-inf/lib/jnlp-servlet.jar
    /myapp/web-inf/lib/parser.jar
    web.xml:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
    <web-app>
         <servlet>
                   <servlet-name>JnlpDownloadServlet</servlet-name>
                   <servlet-class>com.sun.javaws.servlet.JnlpDownloadServlet</servlet-class>
              <init-param>
                   <param-name>loglevel</param-name>
                   <param-value>DEBUG</param-value>
              </init-param>
              <init-param>
                   <param-name>logPath</param-name>
                   <param-value>/logs/jnlpdownloadservlet.log</param-value>
              </init-param>
              <mime-mapping>
                   <extension>
                        jnlp
                   </extension>
                   <mime-type>
                        application/x-java-jnlp-file               
                   </mime-type>
              </mime-mapping>
              <mime-mapping>
                   <extension>
                        jardiff
                   </extension>
                   <mime-type>
                        application/x-java-archive-diff               
                   </mime-type>
              </mime-mapping>
         </servlet>
    </web-app>
    jnlp:
    <jnlp spec="1.0+" codebase="http://asgard/myapp" href="myapplication.jnlp" version="2.0">
    <information>
    <title>MyApplication</title>
    <vendor>Patrick Scholze</vendor>
    <homepage href="../myapp.html" />
    <description kind="">MyApplication</description>
    <description kind="short">myapp</description>
    <icon kind="default" href="myapplication.jpg" />
    </information>
    <resources>
    <j2se version="1.2+" />
    <jar href="myapplication.jar" main="true" download="eager" version="2.0"/>
    </resources>
    <application-desc main-class="Start">
    </application-desc>
    <security>
    <all-permissions />
    </security>
    </jnlp>

    Now there are no error messages but JWS downloads the
    complete jar file.If you specify "eager", Web Start is told to load that jar immeadiately.
    What exactly do you have in mind with that jar?
    Lazy download (thus at a latter time), or the download of a specific version of the jar or differential download?
    Regards,
    Marc

  • Multiple download of the same JAR file

    We have a collection of applets packaged in a single JAR file. Some users (web developers that use our applets) have been complaining that the applet is extremely slow to start up.
    When the html page includes more than one applet from the same JAR file then, "ONLY IN SOME CASES", the JAR file is downloaded multiple times.
    By capturing network traffic we can also think that the JAR file is downloaded even when accessing an image packaged in the applet's own JAR file.
    One further detail: this "DOES NOT OCCUR" when there is a fast connection to the server (or at leat it seems so). In these cases, the JAR file is downloaded once. It looks as if the problem only occurs on slower network connections.
    Thanks in advance for any help.

    Mmm... I don't think this is the solution... all the applets share a lot of classes (the big part of the JAR files).
    But my question is....: why in some cases the JAR is downloaded more than once???

Maybe you are looking for

  • Sales Order CReated with Reference

    Hi, I created a sales order with reference to an existing order. I created delivery based on the new order that was created with reference. HOwever, if i try to get the sales order number of my delivery, the sales order that i am getting is the sales

  • Why can't LabVIEW 2011 find my PXI?

    I'm migrating some real-time Projects from older versions of LabVIEW (8.6 and 2010) to LabVIEW 2011.  For the older systems, I installed the appropriate Real-Time software (matching version numbers) on a PXI controller, which MAX saw just fine.  When

  • Opening SVG in Illustrator

    Ok here's the problem. I really need to open some Icons drawn with Inkscape (Oxygen icons for KDE 4.2, you can get them on the net) in Illustrator. Their format is .SVG and when i open them i get the message "clipping lost on roundtrip to tiny", but

  • Amazon instant video app

    Hello can any one guide on how to use Amazon instant video app via UAE App Store. It seems like it's only available on US store however since I am based in Dubai and would like to purchase or rent movies via Amazon therefore would appreciate any help

  • ATV 2 and Time Capsule-Choppy Streaming

    So I am using my Time Capsule as my wireless router and as an external hard drive. I am streaming my TV shows/movies (I converted them to mp4 files) from my TC to Apple TV via iTunes and it's awful; choppy like every 10 seconds or so. Not sure why th