Search code examples
javajava-7jnlpjava-web-start

Error messages about missing Codebase attribute when loading webstart application


I have a webstart application in which all the jars are signed (my own and third-party). When load it with Java7u25, I see error messages like the following in the Java console:

Missing Permissions manifest attribute for: http://example.com/webstart/application-jars/commons-beanutils-1.8.3.jar
Missing Codebase manifest attribute for: http://example.com/webstart/application-jars/commons-beanutils-1.8.3.jar

I read up on the changes in 7u25 here: http://blog.eisele.net/2013/06/java-se-7-update-25-release-notes.html

The note says to specify the Codebase attribute in the JAR's manifest at the time of building and have it match the Codebase in the JNLP file. How is this supposed to be setup to work for third-party jars like commons-beanutils which clearly don't have this manifest entry?


Solution

  • If you are signing the jar files yourself (third party as well as your own) you can just add the necessary parameters to the third party jars manifest.mf (open them with an archive utility, i.e. archive manager on ubuntu or try 7-zip etc for windows) add the parameters as you have to your own jars manifest (re package them, on ubuntu this happens automatically when you close the file after editing, I'm not sure if you're on windows) and then build your application/sign all the jars.

    This worked for me although I'm sure there's a better way of doing it.