A Signed JAR Appears as Unsigned After Being Uploaded to the Cloud

If you upload an application–for example, an EAR file—to the Cloud and that archive contains a signed JAR, when you retrieve that JAR, it might then be unsigned. For security reasons, Oracle Java Cloud Service - SaaS Extension recompiles user applications and repackagee them before deployment (see Considerations When Developing Applications on Oracle Java Cloud Service - SaaS Extension). This process will cause any applications containing a signed applet JAR to lose the signature.

Workaround

To avoid any changes to the JAR files that you don’t want executed in Java Cloud Service - SaaS Extension need to be packaged and accessed differently:

Note:

Applet JARs are loaded on the browser and not on the Java Cloud Service - SaaS Extension runtime. If a class needs to be loaded into Java Cloud Service - SaaS Extension runtime, the following suggestions do not apply.
  • Package the signed JAR with an extension other than .jar (for example, DME.jar1). When the JAR is served to the client, the application servlet should convert the JAR with the correct name; for example, DME.jar. This will prevent recompilation of this file.

    Note:

    If the code contained in this JAR file is executed on the server side, it will be recompiled before execution.
  • Upload the signed JAR to /customer/scratch on the file system share accessible to the application on the Java Cloud Service - SaaS Extension service instance. This location can be accessed inside the user application by using Java standard file I/O API's . Files can be uploaded by using a file system shell feature of the Java Cloud Service - SaaS Extension command-line interface (supplied with the Java Cloud Service - SaaS Extension SDK) .

  • Upload the signed JAR to Oracle Storage Cloud Service, where it can be accessed by using the Oracle Storage Cloud Service REST APIs or Java APIs from within Oracle Java Cloud Service - SaaS Extension.