JNLP: resource-jar vs. extension

Can anyone describe the difference between the jar tag and the extension tag, in a JNLP file? I'm looking for conceptual differences here. I can read the syntax ok, but WHY do I want two different tags that do the same thing?
At least, they seem the same to me. Are they different? How? and when and why should I use each one?
Thanks for any help you can provide, I'm kind of struggling to understand what some of the elements in the JNLP file mean.

'Cause they don't do the same thing. One is used for jars, the other one for JNLPs.
That's what the extension tag does: 'includes' another jnlp.
Main reason for it: jars within a jnlp must be all signed by same certificate; if you happen to have one already signed by someone else you must use extensions to have your app work.
Second (signing related) reason: you may not need all resources to be signed, why signing them all? Use an extension!
Last , but not least: libraries distribution; scenario: I'm a sw house, I offer a some very powerfull libraries, I believe people should embrace changement and always be up to date, I strongly believe there's no need for everyone using my libraries over JWS to host them on their own site, what could I do? Publish a jnlp for each library (meaning consistent set of jars) on my site, pointing to my site's resources; all developers have to do in order to include my libraries is referencing my jnlp through an extension. Mission accomplished.
Bye.
PS: I love dukes.. ;-)

Similar Messages

  • Could not verify signing in resource (JAR + Pack200)

    It seems I always ended up getting JWS error I never have had before these days...
    Ok, long story short:
    - this is about a JavaFX 1.3.1 app with packed JARs
    - changed computer, switched from JDK 1.6.0_22 that I used for several month for signing and pack files to JDK 1.6.0_29 and JDK 1.7.0_02. This issue did not happen with JDK 1.6.0_22.
    - it's currently deployed to an internal web server for testing purposes, files and URL are correct and can be reached from my workstation.
    - every single JNLP file validates OK with JaNeLA.
    - the certificate used to sign the libs is valid.
    - the offending JAR file report as being Ok and signed when checked with jarsigner.
    The error from Java Web Start is:
    >
    Unable to launch the application.
    Error: Could not verify signing in resource: http://devlin01.noumea.spc.local/~fabriceb/Web/TUMAS/lib/OFP-fx.jar.pack.gz
    >
    The exception is:
    com.sun.deploy.net.JARSigningException: Could not verify signing in resource: http://devlin01.noumea.spc.local/~fabriceb/Web/TUMAS/lib/OFP-fx.jar.pack.gz
         at com.sun.deploy.security.JarVerifier.authenticateJarEntry(Unknown Source)
         at com.sun.deploy.security.EnhancedJarVerifier.validate(Unknown Source)
         at com.sun.deploy.cache.CacheEntry.processJar(Unknown Source)
         at com.sun.deploy.cache.CacheEntry.access$2200(Unknown Source)
         at com.sun.deploy.cache.CacheEntry$9.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.deploy.cache.CacheEntry.writeFileToDisk(Unknown Source)
         at com.sun.deploy.cache.Cache.downloadResourceToTempFile(Unknown Source)
         at com.sun.deploy.cache.Cache.downloadResourceToCache(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
         at com.sun.javaws.LaunchDownload$DownloadTask.call(Unknown Source)
         at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
         at java.util.concurrent.FutureTask.run(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)The wrapped exception is:
    java.lang.SecurityException: SHA1 digest error for org/spc/ofp/javafx/scene/control/dialog/TitleLabel$TitleLabel$Script.class
         at sun.security.util.ManifestEntryVerifier.verify(Unknown Source)
         at java.util.jar.JarVerifier.processEntry(Unknown Source)
         at java.util.jar.JarVerifier.update(Unknown Source)
         at java.util.jar.JarVerifier$VerifierStream.read(Unknown Source)
         at com.sun.deploy.security.JarVerifier.readAndMaybeSaveStreamTo(Unknown Source)
         at com.sun.deploy.security.JarVerifier.authenticateJarEntry(Unknown Source)
         at com.sun.deploy.security.EnhancedJarVerifier.validate(Unknown Source)
         at com.sun.deploy.cache.CacheEntry.processJar(Unknown Source)
         at com.sun.deploy.cache.CacheEntry.access$2200(Unknown Source)
         at com.sun.deploy.cache.CacheEntry$9.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.deploy.cache.CacheEntry.writeFileToDisk(Unknown Source)
         at com.sun.deploy.cache.Cache.downloadResourceToTempFile(Unknown Source)
         at com.sun.deploy.cache.Cache.downloadResourceToCache(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
         at com.sun.javaws.LaunchDownload$DownloadTask.call(Unknown Source)
         at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
         at java.util.concurrent.FutureTask.run(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)The main JNLP is:
    <jnlp spec="1.0+" codebase="http://devlin01.noumea.spc.local/~fabriceb/Web/TUMAS/" href="TUMAS-fx.jnlp">
      <information>
        <title>TUMAS development standalone version</title>
        <vendor>CPS-SPC Secretariat of the Pacific Community</vendor>
        <homepage href="http://www.tumas-project.org/"/>
        <description>Management Option Visualisation Tool</description>
        <description kind="short">Management Option Visualisation Tool</description>
        <description kind="one-line">Management Option Visualisation Tool</description>
        <description kind="tooltip">Management Option Visualisation Tool</description>
        <icon kind="default" href="MOViT.gif" width="128" height="128" size="10948"/>
        <icon kind="shortcut" href="MOViT.gif" width="128" height="128" size="10948"/>
        <icon kind="splash" href="MOViT.gif" width="128" height="128" size="10948"/>
        <offline-allowed/>
        <shortcut online="false">
          <desktop/>
          <menu submenu="TUMAS"/>
        </shortcut>
      </information>
      <security>
        <all-permissions/>
      </security>
      <update check="always"/>
      <resources>
        <java max-heap-size="800m" version="1.6+"/>
        <jar href="TUMAS-fx.jar" main="true" size="154269"/>
        <extension name="MOViT" href="MOViT.jnlp"/>
        <extension name="l2fprod-7.3" href="l2fprod-7.3.jnlp"/>
        <extension name="JFXtras-0.7" href="JFXtras-0.7.jnlp"/>
        <extension name="gnujpdf-1.7" href="gnujpdf-1.7.jnlp"/>
        <extension name="Apache-POI-3.6" href="Apache-POI-3.6.jnlp"/>
        <extension name="SwingX-1.6.1" href="SwingX-1.6.1.jnlp"/>
        <extension name="OpenMap-5.0" href="OpenMap-5.0.jnlp"/>
        <extension name="JavaFX 1.3.x Runtime" href="http://dl.javafx.com/1.3/javafx-rt.jnlp"/>
        <property name="jnlp.packEnabled" value="true"/>
      </resources>
      <application-desc main-class="com.sun.javafx.runtime.main.Main">
        <argument>MainJavaFXScript=org.spc.ofp.project.tumas.TUMAS</argument>
        <argument>--development</argument>
      </application-desc>
    </jnlp>The JNLP which contains the offending lib is:
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" codebase="http://devlin01.noumea.spc.local/~fabriceb/Web/TUMAS/" href="MOViT.jnlp">
        <information>
            <title>MOViT</title>
            <vendor>CPS-SPC Secretariat of the Pacific Community</vendor>
            <homepage href="http://www.tumas-project.org/"/>
            <description>Management Option Visualisation Tool</description>
            <offline-allowed/>
        </information>
        <security>
           <all-permissions/>
        </security>
        <resources>
           <jar href="lib/OFP-core.jar" part="MOViT" size="384817"/>
           <jar href="lib/OFP-GIS.jar" part="MOViT" size="10608"/>
           <jar href="lib/OFP-fx.jar" part="MOViT" size="2325354"/>
           <jar href="lib/OFP-fx-mappane.jar" part="MOViT" size="3277991"/>
           <jar href="lib/MFCL-IO.jar" part="MOViT" size="82454"/>
           <jar href="lib/MOViT-templates.jar" part="MOViT" size="5142641"/>
           <jar href="lib/MOViT-ztm.jar" part="MOViT" size="59484"/>
           <jar href="lib/MOViT-ztp.jar" part="MOViT" size="56450"/>
           <jar href="lib/MOViT-zte.jar" part="MOViT" size="41706"/>
           <jar href="lib/MOViT-fishery.jar" part="MOViT" size="66291"/>
           <jar href="lib/MOViT-fx.jar" part="MOViT" size="3282871"/>
           <jar href="lib/SPINiT-fx.jar" part="MOViT" size="332428"/>
           <property name="jnlp.packEnabled" value="true"/>
        </resources>
        <component-desc/>
    </jnlp>The following command lines are used when packing + signing the file (extra private bits have been removed) :
    ► Normalizing file: "<path to file>OFP-fx.jar"
    Executing: "C:\Program Files (x86)\Java\jdk1.6.0_29/bin/pack200" --repack --effort=9 --segment-limit=-1 --modification-time=latest --strip-debug "<path to file>OFP-fx.jar"
    process exited with error code: 0
    ► Signing file: "<path to file>OFP-fx.jar"
    Executing: "C:\Program Files (x86)\Java\jdk1.6.0_29/bin/jarsigner" -verify "<path to file>OFP-fx.jar"
    process exited with error code: 0
    Executing: "C:\Program Files (x86)\Java\jdk1.6.0_29/bin/jarsigner" -tsa <timestamp server> -J-Dhttp.proxyHost=<our proxy host> -J-Dhttp.proxyPort=<our proxy port> -keystore <our store> -storepass <our password> "<path to file>OFP-fx.jar" <our alias>
    process exited with error code: 0
    ► Packing file: "<path to file>OFP-fx.jar"
    Executing: "C:\Program Files (x86)\Java\jdk1.6.0_29/bin/pack200" "<path to file>OFP-fx.jar.pack.gz" "<path to file>OFP-fx.jar"
    process exited with error code: 0Any idea, besides reinstalling an older JDK and/or runtime?

    bouye wrote:
    Thanks for the suggestion and let's hop they put some process to prevent similar issues from hapening again in the future.False hope. Programming is hard, release management is hard, testing is hard, people make mistakes, budget restrictions cause mistakes to slip through, etc. etc.
    The most important factor in all this really is us and more specifically our willingness to properly report problems.

  • How do I protect my JNLP, my JARs etc. (with Basic Authentication)???

    hi all,
    i know that there is a FAQ ( [see here|http://lopica.sourceforge.net/faq.html#obfuscate] ) answering a related question with "You can use an obfuscator...". ok, but is there really no other solution?
    this is the simplified folder structure of my application on the server:
    [application]
      [etc]
        xyz.xml
      [jars]
        myapp.jar
      launch.jnlp
    website.jsp
    initial start and basic authentication:*
    my first idea was to secure everything underneath "application" with basic authentication via my web.xml (yes, i'm aware of the security concerns). this means everybody can access my website (here: website.jsp) which contains a start button that links to "launch.jnlp". as soon as the user clicks on it, the browser opens its standard authentication dialog since launch.jsp is in a protected area. after entering the correct credentials the jnlp-file is downloaded and java web start takes over control. first of all it seems as it tries to access the same jnlp-file again (??? --> probably in order to check for changes in the jnlp file --> this is certainly not the case for the initial startup) and then wants to download the relevant jar (myapp.jar). because both resources are protected jws opens its own basic authentication dialog where i have to enter the same credentials the second time. as far as i know, there is no solution to pass the credentials between the browser and the jvm.
    second start and basic authentication:*
    if the user starts my application for the 2nd, 3rd, ... time via desktop-link (set in jnlp-file) there is no need for accessing my website with a browser. therefore only the authentication dialog of jws gets displayed. so far, so good!
    and now the actual problem:*
    during runtime my application (signed with verisign certificate and having all permissions) uses commons-vfs and commons-httpclient to access resources on the same server (e.g. etc/xyz.xml). since they're underneath the protected "application" directory as well, my application needs the same credentials the user already entered in the authentication dialog of jws. now i could retrieve these credentials by calling Authenticator.requestPasswordAuthentication() within my application and passing them to vfs and httpclient. however, doing so opens up jws' authentication dialog again. grrr!!! is there a way to prevent this?
    related thougts:*
    i know i could disable jws' default Authenticatior and set my own Authenticator which might be able to return already entered credentials without opening the dialog a second time. however, it seems that even with <property name="javaws.cfg.jauthenticator" value="none" /> jws still opens its own dialog when acessing the JNLP file and the relevant JARs during the startup/download phase. of course, who else if not jws could handle that phase? my application might not even be downloaded at this point. so i guess setting my own Authenticator would not be a solution either (at least not if i want to secure my jnlp and my jars, too). quite the contrary, it would have to open another dialog... :-(
    my current solution:*
    for the moment i use jws' default Authenticatior which allows me to easily protect all my stuff on the server side (jnlp, jar, etc). i can live with the two login dialogs at the initial startup. and instead of querying the credentials from jws' default Authenticatior at runtime, i set two system properties for username and password in the (protected) jnlp-file, query them at runtime and hand it to vfs and httpclient. this prevents the 2nd (or 3rd) dialog but is definitely not a great solution. most of all i'm not happy with the fact that this somehow "destroys" the container-based security advantage of easily configuring authorized users via a separate mechanism e.g. tomcat-users.xml. now there has to be one master-password that has to be set in the jnlp-file! grrr!
    a possible alternative:*
    i'm not sure but would it be better to secure everything with form-based authentication on the website, and dynamically generate username and password into the jnlp-file? but what happens when the admin changes the password on the server and the user starts its application via desktop-link??? in case of basic authentication i think jws would popup the login dialog again. however, if i use the old username and password generated into the jnlp it won't work. i think the user then has to access the website again. this is not good at all! :-(
    the only real solution:*
    should i write a small application which can be downloaded by everybody and on startup queries the user's credentials, validates them with the help of our server, and uses the javax.jnlp-api to download the secured JARs of my real application? this seems so much overkill! does anybody have experiences with this approach? how difficult is it to implement the whole download/update stuff with javax.jnlp?
    WHAT HAVE I MISSED???
    AM I COMPLETELY WRONG???
    WHAT IS THE EASIEST WAY???
    AND WHAT IS THE BEST WAY???
    thank you so much,
    stephan

    Not sure, whether I understood correctly, what you wanna do - but up to now I can't see any problem.
    if you have a structure like this:
    /ctxroot/
           launch.jnlp
           /app/
               *.jar
               *.whateveryou may use in your web.xml:
         <servlet>
              <servlet-name>JnlpDownloadServlet</servlet-name>
              <servlet-class>jnlp.sample.servlet.JnlpDownloadServlet</servlet-class>
         </servlet>
         <servlet-mapping>
              <servlet-name>JnlpDownloadServlet</servlet-name>
              <url-pattern>*.jnlp</url-pattern>
              <url-pattern>/app/*</url-pattern>
         </servlet-mapping>
         <security-constraint>
              <web-resource-collection>
                   <web-resource-name>Application</web-resource-name>
                   <url-pattern>/app/*</url-pattern>
                   <http-method>GET</http-method>
                   <http-method>POST</http-method>
              </web-resource-collection>
              <auth-constraint>
                   <role-name>bla</role-name>
                   <role-name>fahsel</role-name>
              </auth-constraint>
              <user-data-constraint>
                   <transport-guarantee>CONFIDENTIAL</transport-guarantee>
              </user-data-constraint>
         </security-constraint>
         <security-constraint>
              <web-resource-collection>
                   <web-resource-name>Subscription</web-resource-name>
                   <url-pattern>*.jnlp</url-pattern>
              </web-resource-collection>
              <user-data-constraint>
                   <transport-guarantee>CONFIDENTIAL</transport-guarantee>
              </user-data-constraint>
         </security-constraint>
         <login-config>
              <auth-method>BASIC</auth-method>
              <realm-name>whatever-realm</realm-name>
         </login-config>
         <security-role><role-name>bla</role-name></security-role>
         <security-role><role-name>fahsel</role-name></security-role>
    ...Than you may use the Service stuff like:
         BasicService bs = (BasicService)ServiceManager.lookup("javax.jnlp.BasicService");
         URL codeBase = bs.getCodeBase();
         URL pu = new URL(codeBase.toString() + "whatever.bla");
         HttpURLConnection res = (HttpURLConnection) pu.openConnection();
         res.setInstanceFollowRedirects(true);
         res.setRequestMethod("GET");
         res.setConnectTimeout(10 * 60 * 1000);
         res.connect();
         String enc = res.getContentType();
    ...Where is the problem? If you wanna intercept certain "calls" to an app resource, just use a filter, which decides, whether to answer the request directly by itself or to pass it to the JnlpDownloadServlet ...

  • JNLP and jar files are being download from server again.

    I have a swing application deployed with Java Web Start on a server.
    On my client I install the application using JWS JRE 1.6.
    The issue is that without any change in the jars or JNLP the jars are being downloaded from the server again and again
    This is not consistant - it happens only sometimes.
    One important thing to mention: The server is inside a load-balancer cluster (AKAMAI), so the IP address of the actual server may change between different accesses.
    in the log, I can see the error:
    "Cache entry not found"
    and then the jar is being downloaded again.
    sometimes only one or two jars were downloaded again, sometimes the whole package with the JNLP file were dowloaded again.
    Can you suggest what can be the reason for this behavior?
    Thank you,
    Ran

    That does seem slow, but there are many factors that could be involved. More information would be helpful:
    - Are the source and destination filesystems ZFS or UFS? (or some other FS)
    - What does iostat show you?
    - What does vmstat show you?
    - What type of HBAs connect you to the SAN? ('fcinfo hba-port')
    - Anything in /var/adm/messages?

  • Protecting jnlp and jar files

    Hi
    I would like to know how to protect the jnlp and jar files against anyone who just types the URL in the browser Address bar.
    Thanks
    Steven

    Haven't tried, but if your jnlp app must check for updates on every startup and your files (both jnlp file and jars) are in a password protected folder (using digest or plain authentication over a SSL connection, for example) then you may be in trouble. Will JWS recognize this situation on an update check and prompt for login/password? (related to web server's folders).
    Regards

  • JNLP: Signed jars but still not trusted

    I have an applet that has signed jars that were signed by the same key, the applet shows the correct warnings on startup and works fine (allows access to the local file system, etc), however there still exists the 'yellow triangle warning' on one of two popups frames that the applet produces (but not the other one).
    The applet does use native code (packaged in a signed jar and referenced in the JNLP). The jars are all signed by the same certificate from a CA. I originally didn't have the JNLP signed (by placing it in the main jar in JNLP-INF/APPLICATION.JNLP) but this didn't help. Also I didn't have the JNLP codebase set to a real URL (and really cant in production because its a solution we deploy to customers servers - its packaged software not hosted) but even after I tested with a codebase to a test server, it still didnt remove the famed yellow triangle. I have all-permissions set in the JNLP.
    So two related questions:
    1) Other than having not having signed jars (or not signed correctly), what other reasons cause the 'yellow triangle'?
    2) The warning only appears on one of the popup Frames. What could be the possible reasons for that? Are there some privileges that show the icon whether the applet is signed or not?
    Note: While changing the client policy setting (showWindowWithoutWarningBanner) works, this cant be a solution.
    From the Java Console:
    ...It goes through all the jars (I only included one for brevity - there are 23 of them). Note it says 'have 1 common certificates'.. which I think indicates everything is signed by the same cert.
    Is there any indication in the console logs I can use to determine why it is not trusted? It looks (to me) that everything is OK, until it says 'istrusted=false'.
    security: Validating cached jar url=http://10.192.252.26/QMDesktop/native.jar ffile=C:\Documents and Settings\bunkowm\Application Data\Sun\Java\Deployment\cache\6.0\34\1df0b62-2c3ce377 com.sun.deploy.cache.CachedJarFile@d964af
    cache: Reading Signers from 995 http://10.192.252.26/QMDesktop/native.jar | C:\Documents and Settings\bunkowm\Application Data\Sun\Java\Deployment\cache\6.0\34\1df0b62-2c3ce377.idx
    security: Have 1 common certificates after processing http://10.192.252.26/QMDesktop/native.jar
    security: Istrusted: null false
    security: Loading certificates from Deployment session certificate store
    security: Loaded certificates from Deployment session certificate store
    security: Validate the certificate chain using CertPath API
    security: Obtain certificate collection in Root CA certificate store
    security: Obtain certificate collection in Root CA certificate store
    security: Start to check whether root CA is replaced
    security: The root CA hasnt been replaced
    security: No timestamping info available
    security: Found jurisdiction list file
    security: No need to checking trusted extension for this certificate
    security: The CRL support is disabled
    security: The OCSP support is disabled
    security: This OCSP End Entity validation is disabled
    security: Checking if certificate is in Deployment denied certificate store
    security: Checking if certificate is in Deployment permanent certificate store
    security: Checking if certificate is in Deployment session certificate store
    security: Mark trusted: null

    Andrew - of course you were correct about the signed cert - I misspoke when the CA signed applet didn't show a warning. (You were also right that I must have checked 'always accept' the certificate on the server I had the CA signed cert on).
    I think you guys are on to something about the privileged actions. It would explain where one popup has the icon and the other doesn't. We have Javascript making calls into the applet and we do use JNI (although I don't think there are any calls back). We do wrap these calls in privileged actions but maybe we missed something. What I've seen before is a security exception is thrown if we don't wrap them - but maybe there are areas where we don't and it doesn't throw an exception or it does and we eat it somehow (and for whatever reason doesn't cause anything noticeable).
    Now that I know it could likely be the applet code and not necessarily a build issue with signing the jars, I have another place to look...
    I'll check it out and let you know what I find.

  • Cannot find the cached resources(jars) downloaded through Java Webstart 1.6

    Hi Experts,
    With Java 1.5 the below api call was returning the absolute location of downloaded jar through webstart.
    URL where = ClassName.class.getProtectionDomain().getCodeSource().getLocation();
    Value of URL where file://c:/users/.................../abc.jar"
    But from 1.6 this api is returning only the relative path (value of URL is "/lib/abc.jar")
    Our app is heavily dependent on the location of downloaded jars and hence it would be difficult to modify the app code to not to look for the downloaded jars.
    So I'm looking for a way to find the location of downloaded jars
    Please advise..
    Before posting here I tried suggestions posted in the below links
    https://bugs.eclipse.org/bugs/show_bug.cgi?id=244311
    http://stackoverflow.com/questions/6789357/get-jars-under-resources-within-jnlp-file-with-jnlp-api
    I tried this code to obtain the url s of the downloaded jars, but it did'nt work.
    DownloadService2 service = (DownloadService2)ServiceManager.lookup("javax.jnlp.DownloadService2");
    DownloadService2.ResourceSpec alljars = new DownloadService2.ResourceSpec("http://localhost:8085/words/*", "*", DownloadService2.JAR);
    DownloadService2.ResourceSpec[] results = service.getCachedResources(alljars);
    for (DownloadService2.ResourceSpec spec : results) {
         System.out.println(" +++++++++++ DownloadService2 ++++++++ " + spec.getUrl());
    Thanks,
    Srikanth M

    Hi
    Did anyone find a solution for this? I am also struck here.
    service = (DownloadService2) ServiceManager.lookup("javax.jnlp.DownloadService2");
    ResourceSpec alljars = new ResourceSpec(".*", ".*", service.JAR);
    System.err.println(alljars);
    ResourceSpec[] results = service.getCachedResources(alljars);
    The results[] size is ZERO.
    Thanks

  • External Resource JAR configuration in BPM Enterprise

    I have External resource(a JAR file) in my BPM Studio. This External JAR calls some web service and gets data. Everything is working fine when I run from BPM Studio with its in bulit Derby engine and all.
    The same BPM project I exported by using the 3rd option(Include Versionable libraries only - Recommended for publishing with Enterprise).
    I have configured BPM enterprise by using weblogic server and Oracle express as engine also. Deployed newly exported project. Everything works fine except getting following error while calling JAR which in turn call web services.
    I am getting following error in Engine.
    ===================================================================================
    The task could not be successfully executed. Reason: 'java.lang.NoClassDefFoundError: org/alfresco/sample/webservice/ContentReadAndWrite'. Caused by: org/alfresco/sample/webservice/ContentReadAndWrite fuego.lang.ComponentExecutionException: The task could not be successfully executed. Reason: 'java.lang.NoClassDefFoundError: org/alfresco/sample/webservice/ContentReadAndWrite'. at fuego.server.execution.EngineExecutionContext.invokeMethodAsCil(EngineExecutionContext.java:1094) at fuego.server.execution.EngineExecutionContext.runCil(EngineExecutionContext.java:1280) at fuego.server.execution.microactivity.ComponentExecutionMicroActivity.runCil(ComponentExecutionMicroActivity.java:126) at fuego.server.execution.microactivity.ComponentExecutionMicroActivity.execute(ComponentExecutionMicroActivity.java:84) at fuego.server.execution.microactivity.MicroActivityEngineExecutionHandler.executeActivity(MicroActivityEngineExecutionHandler.java:57) at fuego.server.execution.ImmediateActivity.execute(ImmediateActivity.java:42) at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:304) at fuego.transaction.TransactionAction.startNestedTransaction(TransactionAction.java:527) at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:548) at fuego.transaction.TransactionAction.start(TransactionAction.java:212) at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:123) at fuego.server.execution.DefaultEngineExecution.executeAutomaticWork(DefaultEngineExecution.java:62) at fuego.server.execution.EngineExecution.executeAutomaticWork(EngineExecution.java:42) at fuego.server.execution.ToDoItem.executeAutomaticWork(ToDoItem.java:251) at fuego.ejbengine.ItemExecutionBean$1.execute(ItemExecutionBean.java:212) at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:304) at fuego.transaction.TransactionAction.startBaseTransaction(TransactionAction.java:470) at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:551) at fuego.transaction.TransactionAction.start(TransactionAction.java:212) at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:123) at fuego.server.execution.EngineExecution.executeImmediate(EngineExecution.java:66) at fuego.ejbengine.ItemExecutionBean.processMessage(ItemExecutionBean.java:198) at fuego.ejbengine.ItemExecutionBean.onMessage(ItemExecutionBean.java:110) at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:466) at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:371) at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:327) at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4547) at weblogic.jms.client.JMSSession.execute(JMSSession.java:4233) at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3709) at weblogic.jms.client.JMSSession.access$000(JMSSession.java:114) at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5058) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) Caused by: java.lang.NoClassDefFoundError: org/alfresco/sample/webservice/ContentReadAndWrite at oracle.ExpenseReport.Default_1_0.Instance.CIL_checkCompanyPolicy1(Instance.xcdl) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at fuego.server.execution.EngineExecutionContext.invokeMethodAsCil(EngineExecutionContext.java:1085) ... 33 more
    ==================================================================================
    Did I missed configuring something in Enterprise? Any other ideas?

    Hi,
    You could either try marking the External Resource(s) with the Jar files as versionable or copy the Jar files to these directories:
    <Enterprise Home Directory>/enterprise/webapps/webconsole/WEB-INF/lib
    <Enterprise Home Directory>/enterprise/ext
    Dan

  • JNLP with JARs behind form auth?

    Hello, I'm working on deploying an application thru JNLP/JWS. I want to restrict access to the jars to only those who have logged in to my server - using form, not basic or digest, auth. This works as an applet because the cookies (JSESSIONID) are passed to the server when downloading the jars. This approach doesn't work with JWS. I assume it's because those cookies aren't being passed from the browser to javaws.
    How do I work around this? This seems like it should be really simple, but I can't figure it out.
    Thanks.

    Short answer: you don't.
    A bit longer answer: you need to pass the session id through the JNLP nad put something in between to 'restore' it.
    Smart answer: some people have done something really similar for SSO auth, google for it.
    Short explanation: JWS goes on a new (java) connection and doesn't know anything about your existing browser session to the server.
    Bye.

  • Can a processor get the resource (jar) an element was loaded from?

    I'm writing an Annotation Processor (JSR 269). Once process the annotations in the Compilation Unit, I need to look for resources in some of the classes referenced in the Compilation Unit. After I do that I need to look in the jar that encloses the referenced class from the classpath. Looking through the API doc, I don't readily see a way to get the jar based on the Element. Do I need to look at the Filer API? Or is just what I am trying to do NOT possible?
    If it's not possible I'll have to search the entire classpath and look for a particular class, interface, etc. (Element) within each jar to know where it came from.
    Thanks!

    You can try
    System.out.println(element.getClass().getProtectionDomain().getCodeSource());

  • Jnlp and jar files

    hi i am just new in deploying applicatin as jnlp, i just want to verify if it requires that the jar files i am going to create is an executable jar file or not. Do i need to put a manifest file in the jar?
    thanks in advance...

    You don't need it, because the jnlp already tells the jws client which one the main class is.

  • Having Trouble loading jar download Extensions

    I am writing a program that accesses a database. I used the microsoft sqlserver driver. In my manifest file, I put in the lines:
    Main-Class: PublishingTool
    Class-Path: mssqlserver.jar msutil.jar msbase.jar
    with the carriage return at the end. I create the jar file, but when I try to run it, the driver is not loaded. Does anyone have any ideas about how to ensure it gets loaded?
    Thanks a bunch!!

    1. Make sure the driver is really in one of those three jar files.
    2. Make sure the jar file that contains the driver is really in the same directory as your executable jar file.

  • Resource capacity profile extension

    Hi Experts
    I want to put the resource utilisation in Capacity profile(Resource master data).
    In my capacity profile, it is showing upto Mar,2009 and i want to do the planning from April, 2009 to Mar, 2010. Please tell me how to extend my capcity profile upto mar, 2010.
    Regards
    Guru

    Hi
    You need to change planning paramet in Genral Tab of resourse master . You can maintain the period using the range -days to +days
    regards

  • Jars can't be signed with different certificates---even by Sun?

    I am deploying an application which uses the following jar files:
    com.example.application.jar
    com.example.support.jar
    javax.activation.jar
    javax.mail.jar
    The latter two are jars signed from Sun, yet JWS complains that the jars have been signed with different certificates. I'm forced to unpack the Sun jars and repackage them,signing them with my own certificate.
    Isn't this a little restrictive? Shouldn't jars signed by Sun be exceptions to the "all jars signed by the same certificate" requirement?
    Garret

    Thanks! The JNLP 1.5 MR specification is a bit opaque about exactly how to do this, but the following site has an example that helped:
    http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/faq.html
    The example didn't mention whether I can request all permissions for the component extension, but I suppose I can. Nothing seems to indicate whether I can have component extensions reference other component extensions (JavaMail requires JAF, for example), but it seems to work.
    By requesting full permissions for the component extensions, though, I now get two dialogs presented to the user, the first asking if my application should be trusted, and the second asking if Sun Microsystems should be trusted.
    If I remove all-permissions from the JavaMail component extension, yet request it for the main application (thereby only presenting the user with one confirmation dialog), will I still be able to perform restricted functionality using JavaMail, such as connecting to remote servers?
    Here's what I'm now using, in hopes that it benefits someone else. The main JNLP:
         <resources>
              <jar href="com.example.jar"/>
              <extension name="JavaMail" href="javax.mail.jnlp"/>
         </resources>
    ...javax.mail.jnlp:
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" codebase="http://localhost:8080/" href="javax.mail.jnlp">
         <information>
              <title>JavaMail</title>
              <vendor>Sun Microsystems, Inc.</vendor>
              <description>JavaMail API.</description>
              <homepage href="http://java.sun.com/products/javamail/"/>
         </information>
         <security>
              <all-permissions/>
         </security>
         <resources>
              <jar href="javax.mail.jar"/>
              <extension name="JAF" href="javax.activation.jnlp"/>
         </resources>
         <component-desc/>
    </jnlp>javax.activation.jnlp:
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" codebase="http://localhost:8080/" href="javax.activation.jnlp">
         <information>
              <title>JAF</title>
              <vendor>Sun Microsystems, Inc.</vendor>
              <description>JavaBeans Activation Framework extension.</description>
              <homepage href="http://java.sun.com/products/javabeans/glasgow/jaf.html"/>
         </information>
         <security>
              <all-permissions/>
         </security>
         <resources>
              <jar href="lib/javax.activation.jar"/>
         </resources>
         <component-desc/>
    </jnlp>Garret

  • Can't get that damned WebStart jnlp file to work!!!

    hi i have a problem, i can't get webstart to work. lool at my homepage http://www.deutronium.de.vu/games.html. the WebStart files of the first two games of the page do not work. i tried all things but i can't get them to work for me. it always give me an error message that it cannot find a resource.
    this is my jnlp file, the jars are in the same directory:
    <?xml version="1.0" encoding="utf-8"?>
      <jnlp spec="1.0+" codebase="http://www.deutronium.de.vu/games/Dedris/" href="Dedris.jnlp">
      <resources>
        <jar href="http://www.deutronium.de.vu/games/Dedris/Dedris.jar" />
        <j2se version="1.2 1.3 1.4 1.4.1" />
      </resources>
      <application-desc main-class="Dedris" />
    </jnlp>

    I think it's has something to do with your webserver. I took everything as is and just changed the urls and it worked. It has to be, because the same thing happens with NumberGame and I didn't change anything but that. If you want, I could host them until you fix it or get a working one.

Maybe you are looking for

  • Interface and Inner Class

    Hi, In interface we can't provide method body. but we can provide method body like this, public interface TestInterface {      public class Add {           public int add() {                return 100; what is the logic behind Inner Class inside inte

  • Email subscribe code acting weird

    The code is only supposed to action when the user hits submit but it does not. I have looked at the code over and over with no luck. have a look at it and let me know

  • Internal user to External user P2P call failed.

    Hi, Environment:- Lync 2013 FE (collocate mediation role) - 1 Lync 2013 Edge server (Single IP FQDN)– 1 Public IP -1 Ports: Access Edge: 5061 Web Conference: 444 A/V Edge: 443 Ports opened on External Firewall TCP - 5061,443,444 UDP – 3478 Tested Sce

  • IPod won't work off the charger

    My 4th Gen iPod won't work when it's not connected to the charger.  As soon as you remove it from the power source it shuts down.  I have updated to the latest iOS and it's been restored.  This corrected the issue for about 24hrs then it was back to

  • Xsane error? missing libraries?

    Hi, I'm running arch64 and I'm trying to get my usb scanner working. I have sane and xsane installed through pacman. When I run xsane or sane-find-scanner I get the following error: xsane: error while loading shared libraries: libltdl.so.3: cannot op