Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Lunch Application via Java Web Start

Posted on 2012-03-12
10
1,275 Views
Last Modified: 2012-03-13
I am going to use Java Web Start to distribute a Java application. The application includes two jar files: Client.jar and log4j-1.2.13.jar. When application starts up, error message displayed: Found unsigned entry in resource: http://localhost/JavaClient/ log4j-1.2.13.jar. The exception is: com.sun.deploy.net.JARSigningException.

The Java runtime is JRE 6. I don't have the source code of the Java application.



Here is jnlp codes:

<?xml version="1.0" encoding="utf-8"?>
<!--
###############################################################################
#
# Client.jnlp      1.6 02/09/11
#
# JNLP File for Java Client Application
#
###############################################################################
 -->
<jnlp
  spec="1.0+"
  codebase="http://localhost/JavaClient" href="Client.jnlp">

  <information>
    <title>Java Client</title>
    <vendor>MyCompany Inc.</vendor>
    <description>Java Web Client</description>

  </information>

  <security>
    <all-permissions/>
  </security>

  <resources>
    <j2se version="1.4+"/>
    <jar href="Client.jar"/>
    <jar href="log4j-1.2.13.jar" />
  </resources>

  <application-desc main-class="com.myCompany.Security.LogOn">
    <argument> -verbose</argument>
  </application-desc>
</jnlp>
0
Comment
Question by:dev_yinz
  • 6
  • 4
10 Comments
 
LVL 47

Accepted Solution

by:
for_yan earned 500 total points
ID: 37713179
0
 

Author Comment

by:dev_yinz
ID: 37713342
Following the instruction, I change the content of MANIFEST.MF. If Java Caching is enabled, I see the exception (I can "download" the log4j-1.2.13.jar from address so it shall not be access rights issue). If I disable Java Caching, signature exception happened again.

Exception:
com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://localhost/JavaClient/log4j-1.2.13.jar
      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$Worker.runTask(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)

Wrapped Exception:
java.io.IOException: invalid manifest format
      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$Worker.runTask(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)



Original MANIFEST.MF:

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.4
Created-By: 1.3.1_16-b06 (Sun Microsystems Inc.)

Name: org/apache/log4j/
Implementation-Title: log4j
Implementation-Version: 1.2.13
Implementation-Vendor: "Apache Software Foundation"


After Change:

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.4
Created-By: 1.3.1_16-b06 (Sun Microsystems Inc.)

Implementation-Title: log4j
Implementation-Version: 1.2.13
Implementation-Vendor: "Apache Software Foundation"
0
 
LVL 47

Expert Comment

by:for_yan
ID: 37713370
I understood so that that whole thing (all four lines )
should be removed:

Name: org/apache/log4j/
Implementation-Title: log4j
Implementation-Version: 1.2.13
Implementation-Vendor: "Apache Software Foundation"

Don't know if I am correct
0
Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

 

Author Comment

by:dev_yinz
ID: 37713406
I think log4j-1.2.13.jar is "unsigned" while Client.jar is signed by developer. I don't have source code, is there any way to "sign" the jar files? Or log4j-1.2.13.jar must be signed using the same private key as Client.jar?
0
 
LVL 47

Assisted Solution

by:for_yan
for_yan earned 500 total points
ID: 37713490
They are alos mentioing that some older Java version will work without this problem.
see here:
https://www.servoy.com/forum/viewtopic.php?f=6&t=14128


which Java 1.6 update are you using?
0
 

Author Comment

by:dev_yinz
ID: 37713503
It is verson 6 update 30. (build 1.6.0_30-b12). I cannot down grade the Java version. Otherwise, I have to configure a lot of clients and most of them are overseas. I will see if there is any possible to sign the log4j-1.2.13.jar.
0
 
LVL 47

Assisted Solution

by:for_yan
for_yan earned 500 total points
ID: 37713519
certainly you can try to sign, though it sounds a little bit funny but why not try:
http://docs.oracle.com/javase/1.3/docs/tooldocs/win32/jarsigner.html
0
 
LVL 47

Assisted Solution

by:for_yan
for_yan earned 500 total points
ID: 37713529
I think  this is also a good description of  jar sigining:
http://www-personal.umich.edu/~lsiden/tutorials/signed-applet/signed-applet.html
0
 
LVL 47

Assisted Solution

by:for_yan
for_yan earned 500 total points
ID: 37713531
you can also look at this trail if you encounter problems - it follows the siging process rather closely:
http://www.experts-exchange.com/Programming/Languages/Java/Q_27536681.html
0
 

Author Closing Comment

by:dev_yinz
ID: 37713834
Thank you very much for the help. I will try to study these info. Anyway, I will close this thread first.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Groovy problem when using SOAPUI : DispatchException occurred 7 58
Way to decrease size of apk file 9 86
servlet filter example 37 71
How do I remove an object from a 3 40
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question