You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Nicholas <nw...@yahoo.com> on 2003/01/16 23:34:57 UTC

RE: Will Axis Clients Simply Not Work In Applets ? (SOLVED, HERE'S HOW)

Yes, thanks. Signing worked perfectly.
As a heads up to anyone else trying to do this with a
test certificate for development, here are the simple
instructions for doing so:  (Extracted from
http://java.sun.com/products/javawebstart/docs/developersguide.html#dev)

Signing JAR Files with a Test Certificate

Here are the steps needed to sign a JAR file with a
test certificate:

   1. Make sure that you have a JDK 1.2 or JDK 1.3
keytool and jarsigner in your path (located in the
J2SE SDK bin directory).

   2. Create a new key in a new keystore as follows:

          keytool -genkey -keystore myKeystore -alias
myself 

      You will get prompted for a information about
the new key, such as password, name, etc. This will
create the myKeystore file on disk. A self-signed test
certificate also will be created.

   3. Check to make sure that everything is ok. To
list the contents of the keystore, use the command:

          keytool -list -keystore myKeystore 

      It should list something like:

          Keystore type: jks
          Keystore provider: SUN

          Your keystore contains 1 entry:

          myself, Tue Jan 23 19:29:32 PST 2001,
keyEntry,
          Certificate fingerprint (MD5):
         
C2:E9:BF:F9:D3:DF:4C:8F:3C:5F:22:9E:AF:0B:42:9D

   4. Finally, sign the JAR file with the test
certificate as follows:

          jarsigner -keystore myKeystore test.jar
myself 

      Repeat this step on all of your JAR files.




--- Vidyanand Murunikkara <Vi...@infravio.com>
wrote:
> Nicholas
> 
> Have u tried signing the applets , or giving full
> permission to the URL
> from which the applet originates from ?
> 
> Vidyanand.
> 
> -----Original Message-----
> From: Nicholas [mailto:nwhitehe@yahoo.com]
> Sent: Thursday, January 16, 2003 5:37 AM
> To: axis-user@xml.apache.org
> Subject: Will Axis Clients Simply Not Work In
> Applets ?
> 
> 
> Has anyone managed to get an Axis client to work in
> an
> applet ? Some google searches have revealed the
> common
> event of a security exception like this:
> 
> java.lang.ExceptionInInitializerError
> 
> 	at
>
org.apache.commons.discovery.log.DiscoveryLogFactory._newLog(DiscoveryLo
> gFactory.java:142)
> 
> 	at
>
org.apache.commons.discovery.log.DiscoveryLogFactory.<clinit>(DiscoveryL
> ogFactory.java:105)
> 
> 	at
>
org.apache.commons.discovery.resource.DiscoverResources.<clinit>(Discove
> rResources.java:82)
> 
> 	at
>
org.apache.commons.discovery.tools.ResourceUtils.getResource(ResourceUti
> ls.java:122)
> 
> 	at
>
org.apache.commons.discovery.tools.ResourceUtils.loadProperties(Resource
> Utils.java:175)
> 
> 	at
>
org.apache.commons.discovery.tools.PropertiesHolder.getProperties(Proper
> tiesHolder.java:102)
> 
> 	at
>
org.apache.commons.discovery.tools.DiscoverClass.find(DiscoverClass.java
> :360)
> 
> 	at
>
org.apache.commons.discovery.tools.DiscoverClass.newInstance(DiscoverCla
> ss.java:579)
> 
> 	at
>
org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingle
> ton.java:418)
> 
> 	at
>
org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingle
> ton.java:378)
> 
> 	at
>
org.apache.axis.components.logger.LogFactory$1.run(LogFactory.java:84)
> 
> 	at
> java.security.AccessController.doPrivileged(Native
> Method)
> 
> 	at
>
org.apache.axis.components.logger.LogFactory.getLogFactory(LogFactory.ja
> va:80)
> 
> 	at
>
org.apache.axis.components.logger.LogFactory.<clinit>(LogFactory.java:72
> )
> 
> 	at
>
org.apache.axis.configuration.EngineConfigurationFactoryFinder.<clinit>(
> EngineConfigurationFactoryFinder.java:94)
> 
> 	at
>
org.apache.axis.client.Service.<init>(Service.java:111)
> 
> 	at
>
com.adp.ebs.flt.ejb_generated.ClientManagerLocalServiceLocator.<init>(Cl
> ientManagerLocalServiceLocator.java:14)
> 
> 	at
>
com.adp.ebs.client.hta.SOAPApplet.initWebService(SOAPApplet.java:62)
> 
> 	at
>
com.adp.ebs.client.hta.SOAPApplet.jbInit(SOAPApplet.java:57)
> 
> 	at
>
com.adp.ebs.client.hta.SOAPApplet.init(SOAPApplet.java:48)
> 
> 	at sun.applet.AppletPanel.run(AppletPanel.java:341)
> 
> 	at java.lang.Thread.run(Thread.java:536)
> 
> Caused by: java.security.AccessControlException:
> access denied (java.util.PropertyPermission
> org.apache.commons.discovery.log.level read)
> 
> 	at
>
java.security.AccessControlContext.checkPermission(AccessControlContext.
> java:270)
> 
> 	at
>
java.security.AccessController.checkPermission(AccessController.java:401
> )
> 
> 	at
>
java.lang.SecurityManager.checkPermission(SecurityManager.java:542)
> 
> 	at
>
java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1291)
> 
> 	at java.lang.System.getProperty(System.java:572)
> 
> 	at
>
org.apache.commons.discovery.log.SimpleLog.<clinit>(SimpleLog.java:155)
> 
> 
> =====
> Nicholas Whitehead
> Home: (973) 377 9335
> Cell: (201) 615 2716
> Work: (212) 622 5639
> nwhitehe@yahoo.com


=====
Nicholas Whitehead
Home: (973) 377 9335
Cell: (201) 615 2716
Work: (212) 622 5639
nwhitehe@yahoo.com