Change java.policy????

how to allow browser run the applet.how to change in the java.policy file

ARGGHHH!!!
sorry wrong policy parameter last one was one i used for one of my other projects AND NOTE!!! THIS SHOULD NOT BE USED IN PRODUCTION ENVIRONMENT ONLY TESTING!!!modify the policy file yourself to get the right security settings you are happy with'
-Djava.security.policy=****FILEPATH HERE****/java.policy

Similar Messages

  • How can I change java.policy at runtim on client machines using java webst?

    Hi,
    I have to change java.policy to launch my application through webstart to provide one RuntimePermission "permission java.lang.RuntimePermission "getClassLoader";"
    Its because of a bug in java bug "_http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4809366_"
    So, my problem here is, how can I do this dynamically on each client machine's java.policy.
    I have spent time on this and found some alternatives
    1. Specifying an Additional Policy File at Runtime by launching application "java -Djava.security.manager -Djava.security.policy=someURL SomeApp"
    Please refer more on this "http://docs.oracle.com/javase/6/docs/technotes/guides/security/PolicyFiles.html"
    But, here the problem is, how can I do this using webstart (expert.jnlp) file even though I have the "java-vm-args" tag, its not supporting this argument.
    Please refer "http://docs.oracle.com/javase/6/docs/technotes/guides/javaws/developersguide/syntax.html#security";
    2. Implementing the Policy in code.
    But, not sure how to do this..
    How can I grant the runtime permission on every user's machine dynamycally?
    Here are some background details on this:
    I am using java6 and weblogic 10.3.3.
    Here is thing that I tried,
    My application downloads a few jars to the client machines using java webstart and then it will get the initial context using the t3 protocal. The jars include wlclient.jar and ojdbc6.jar initially.
    The problem here I was facing, when I tried request a bean, it is giving me the following exception in the client logs.It is requesting one state less session bean and I checked the server logs as well and the bean has returned the expected values properly.
    But here I observed one more thing, before this request, one session bean(state less) has been requested successfully.
    java.rmi.MarshalException: CORBA MARSHAL 0 No; nested exception is:
    org.omg.CORBA.MARSHAL: vmcid: 0x0 minor code: 0 completed: No
    at com.sun.corba.se.impl.javax.rmi.CORBA.Util.mapSystemException(Unknown Source)
    at javax.rmi.CORBA.Util.mapSystemException(Unknown Source)
    at com.mbt.expert.server.util._ServerDBQueryObjectRemote_Stub.getExchangeList(Unknown Source)
    at com.mbt.expert.util.DBQueryObject.getExchangeList(DBQueryObject.java:419)
    at com.mbt.expert.view.dialogs.OpenExchangeDialog.actionPerformed(OpenExchangeDialog.java:425)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$000(Unknown Source)
    at java.awt.EventQueue$1.run(Unknown Source)
    at java.awt.EventQueue$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue$2.run(Unknown Source)
    at java.awt.EventQueue$2.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.Dialog$1.run(Unknown Source)
    at java.awt.Dialog$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Dialog.show(Unknown Source)
    at com.mbt.expert.view.dialogs.OpenExchangeDialog.displayDialog(OpenExchangeDialog.java:606)
    at com.mbt.expert.mdi.actions.OpenExchangeAction.execute(OpenExchangeAction.java:204)
    at com.mbt.mdi.MDICommand.actionPerformed(MDICommand.java:47)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
    at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$000(Unknown Source)
    at java.awt.EventQueue$1.run(Unknown Source)
    at java.awt.EventQueue$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue$2.run(Unknown Source)
    at java.awt.EventQueue$2.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: org.omg.CORBA.MARSHAL: vmcid: 0x0 minor code: 0 completed: No
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at java.lang.Class.newInstance0(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase.getSystemException(Unknown Source)
    at com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage_1_2.getSystemException(Unknown Source)
    at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.getSystemExceptionReply(Unknown Source)
    at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(Unknown Source)
    at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(Unknown Source)
    at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.invoke(Unknown Source)
    at org.omg.CORBA.portable.ObjectImpl._invoke(Unknown Source)
    ... 80 more
    The same is working in some other machine which are in different network. So, I have replaced the wlclient.jar with the wlthint3client.jar.
    After replacing this jar I was getting the below exception in client logs while requesting a state less session bean.I also checked whether the request is reaching the server (bean) or not, but its not reaching the server.The problem is same at all the machines irrespective of the networks.
    java.lang.AssertionError: Failed to generate class for com.mbt.expert.server.session.LoginSessionBean_tqw6yu_HomeImpl_1033_WLStub
    at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:797)
    at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:786)
    at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:74)
    at weblogic.rmi.internal.StubInfo.resolveObject(StubInfo.java:213)
    at weblogic.rmi.internal.StubInfo.readResolve(StubInfo.java:207)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at java.io.ObjectStreamClass.invokeReadResolve(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
    at java.io.ObjectInputStream.readObject0(Unknown Source)
    at java.io.ObjectInputStream.readObject(Unknown Source)
    at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:197)
    at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:598)
    at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:193)
    at weblogic.rmi.internal.ObjectIO.readObject(ObjectIO.java:62)
    at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:240)
    at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
    at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
    at weblogic.jndi.internal.ServerNamingNode_1033_WLStub.lookup(Unknown Source)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:405)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:393)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at com.mbt.expert.mdi.ExpertVariable.getLoginSession(ExpertVariable.java:455)
    at com.mbt.expert.view.dialogs.Login.okPressed(Login.java:187)
    at com.mbt.expert.view.dialogs.Login.keyPressed(Login.java:141)
    at java.awt.Component.processKeyEvent(Unknown Source)
    at javax.swing.JComponent.processKeyEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.Dialog$1.run(Unknown Source)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:795)
    ... 55 more
    Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader)
    at java.security.AccessControlContext.checkPermission(Unknown Source)
    at java.security.AccessController.checkPermission(Unknown Source)
    at java.lang.SecurityManager.checkPermission(Unknown Source)
    at java.lang.ClassLoader.getSystemClassLoader(Unknown Source)
    at weblogic.utils.classloaders.AugmentableClassLoaderManager.getAugmentableClassLoader(AugmentableClassLoaderManager.java:48)
    at weblogic.rmi.internal.ClientRuntimeDescriptor.findLoader(ClientRuntimeDescriptor.java:254)
    at weblogic.rmi.internal.ClientRuntimeDescriptor.getInterfaces(ClientRuntimeDescriptor.java:132)
    at weblogic.rmi.internal.StubInfo.getInterfaces(StubInfo.java:77)
    at com.mbt.expert.server.session.LoginSessionBean_tqw6yu_HomeImpl_1033_WLStub.ensureInitialized(Unknown Source)
    at com.mbt.expert.server.session.LoginSessionBean_tqw6yu_HomeImpl_1033_WLStub.<init>(Unknown Source)
    ... 60 more
    I have tried one more thing, I have taken all the required jars to one of the client machines and executed the main class (by setting the required class path) from cmd using java instead of javaws. Surprisingly, its working fine with out any problem using the wlthint3client.jar.
    I also tried the same, by placing wlclient.jar using java in the same way(from cmd instead of javaws ), but I was facing the same exception while requesting the second session bean and found the same above exception in client logs.
    To resolve this, I come across the java bug that I have given earlier "_http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4809366_".
    In that page, I found a work around for this; suggested by bea to add the Runtime permission "permission java.lang.RuntimePermission "getClassLoader";" to the clients java.policy
    So, please suggest me a way to resolve this problem.
    Please suggest me if you have any other solutions for this problem.
    Thanks in advance :)

    I still think your problem is nothing to do with that ancient non-bug and that you should be looking elsewhere. You might be lucky and find someone here who can say "Ah, I know what that is" but I doubt it because since Oracle took over Sun this site has gone down hill big time.

  • How can I change java.policy at runtim?

    Hi,
    I have to change java.policy to launch my application through webstart to provide one RuntimePermission "permission java.lang.RuntimePermission "getClassLoader";"
    Its because of a bug in java bug "_http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4809366_"
    So, my problem here is, how can I do this dynamically on each client machine's java.policy.
    I have spent time on this and found some alternatives
    1. Specifying an Additional Policy File at Runtime by launching application *"java -Djava.security.manager -Djava.security.policy=someURL SomeApp"*
    Please refer more on this "_http://docs.oracle.com/javase/6/docs/technotes/guides/security/PolicyFiles.html_"
    But, here the problem is, how can I do this using webstart (expert.jnlp) file even though I have the "java-vm-args" tag, its not supporting this argument.
    Please refer "_http://docs.oracle.com/javase/6/docs/technotes/guides/javaws/developersguide/syntax.html#security_";
    2. Implementing the Policy in code.
    But, not sure how to do this..
    How can I grant the runtime permission on every user's machine dynamycally?
    Please suggest me if you have any other solutions for this problem.
    Please help on this.
    Thanks in advance :)
    Edited by: 925156 on Apr 3, 2012 5:38 AM
    Edited by: 925156 on Apr 3, 2012 5:38 AM

    Hi,
    Thankyou very much for your reply :)
    Here are some background details on this:
    I am using java6 and weblogic 10.3.3.
    Here is thing that I tried,
    My application downloads a few jars to the client machines using java webstart and then it will get the initial context using the t3 protocal. The jars include wlclient.jar and ojdbc6.jar initially.
    The problem here I was facing, when I tried request a bean, it is giving me the following exception in the client logs.It is requesting one state less session bean and I checked the server logs as well and the bean has returned the expected values properly.
    But here I observed one more thing, before this request, one session bean(state less) has been requested successfully.
    java.rmi.MarshalException: CORBA MARSHAL 0 No; nested exception is:
    org.omg.CORBA.MARSHAL: vmcid: 0x0 minor code: 0 completed: No
    at com.sun.corba.se.impl.javax.rmi.CORBA.Util.mapSystemException(Unknown Source)
    at javax.rmi.CORBA.Util.mapSystemException(Unknown Source)
    at com.mbt.expert.server.util._ServerDBQueryObjectRemote_Stub.getExchangeList(Unknown Source)
    at com.mbt.expert.util.DBQueryObject.getExchangeList(DBQueryObject.java:419)
    at com.mbt.expert.view.dialogs.OpenExchangeDialog.actionPerformed(OpenExchangeDialog.java:425)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$000(Unknown Source)
    at java.awt.EventQueue$1.run(Unknown Source)
    at java.awt.EventQueue$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue$2.run(Unknown Source)
    at java.awt.EventQueue$2.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.Dialog$1.run(Unknown Source)
    at java.awt.Dialog$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Dialog.show(Unknown Source)
    at com.mbt.expert.view.dialogs.OpenExchangeDialog.displayDialog(OpenExchangeDialog.java:606)
    at com.mbt.expert.mdi.actions.OpenExchangeAction.execute(OpenExchangeAction.java:204)
    at com.mbt.mdi.MDICommand.actionPerformed(MDICommand.java:47)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
    at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$000(Unknown Source)
    at java.awt.EventQueue$1.run(Unknown Source)
    at java.awt.EventQueue$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue$2.run(Unknown Source)
    at java.awt.EventQueue$2.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: org.omg.CORBA.MARSHAL: vmcid: 0x0 minor code: 0 completed: No
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at java.lang.Class.newInstance0(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase.getSystemException(Unknown Source)
    at com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage_1_2.getSystemException(Unknown Source)
    at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.getSystemExceptionReply(Unknown Source)
    at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(Unknown Source)
    at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(Unknown Source)
    at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.invoke(Unknown Source)
    at org.omg.CORBA.portable.ObjectImpl._invoke(Unknown Source)
    ... 80 more
    The same is working in some other machine which are in different network. So, I have replaced the wlclient.jar with the wlthint3client.jar.
    After replacing this jar I was getting the below exception in client logs while requesting a state less session bean.I also checked whether the request is reaching the server (bean) or not, but its not reaching the server.The problem is same at all the machines irrespective of the networks.
    java.lang.AssertionError: Failed to generate class for com.mbt.expert.server.session.LoginSessionBean_tqw6yu_HomeImpl_1033_WLStub
         at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:797)
         at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:786)
         at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:74)
         at weblogic.rmi.internal.StubInfo.resolveObject(StubInfo.java:213)
         at weblogic.rmi.internal.StubInfo.readResolve(StubInfo.java:207)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at java.io.ObjectStreamClass.invokeReadResolve(Unknown Source)
         at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
         at java.io.ObjectInputStream.readObject0(Unknown Source)
         at java.io.ObjectInputStream.readObject(Unknown Source)
         at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:197)
         at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:598)
         at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:193)
         at weblogic.rmi.internal.ObjectIO.readObject(ObjectIO.java:62)
         at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:240)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
         at weblogic.jndi.internal.ServerNamingNode_1033_WLStub.lookup(Unknown Source)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:405)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:393)
         at javax.naming.InitialContext.lookup(Unknown Source)
         at com.mbt.expert.mdi.ExpertVariable.getLoginSession(ExpertVariable.java:455)
         at com.mbt.expert.view.dialogs.Login.okPressed(Login.java:187)
         at com.mbt.expert.view.dialogs.Login.keyPressed(Login.java:141)
         at java.awt.Component.processKeyEvent(Unknown Source)
         at javax.swing.JComponent.processKeyEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.Dialog$1.run(Unknown Source)
         at java.awt.event.InvocationEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:795)
         ... 55 more
    Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.ClassLoader.getSystemClassLoader(Unknown Source)
         at weblogic.utils.classloaders.AugmentableClassLoaderManager.getAugmentableClassLoader(AugmentableClassLoaderManager.java:48)
         at weblogic.rmi.internal.ClientRuntimeDescriptor.findLoader(ClientRuntimeDescriptor.java:254)
         at weblogic.rmi.internal.ClientRuntimeDescriptor.getInterfaces(ClientRuntimeDescriptor.java:132)
         at weblogic.rmi.internal.StubInfo.getInterfaces(StubInfo.java:77)
         at com.mbt.expert.server.session.LoginSessionBean_tqw6yu_HomeImpl_1033_WLStub.ensureInitialized(Unknown Source)
         at com.mbt.expert.server.session.LoginSessionBean_tqw6yu_HomeImpl_1033_WLStub.<init>(Unknown Source)
         ... 60 more
    I have tried one more thing, I have taken all the required jars to one of the client machines and executed the main class (by setting the required class path) from cmd using java instead of javaws. Surprisingly, its working fine with out any problem using the wlthint3client.jar.
    I also tried the same, by placing wlclient.jar using java in the same way(from cmd instead of javaws ), but I was facing the same exception while requesting the second session bean and found the same above exception in client logs.
    To resolve this, I come across the java bug that I have given earlier "_http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4809366_".
    In that page, I found a work around for this; suggested by bea to add the Runtime permission "*permission java.lang.RuntimePermission "getClassLoader";*" to the clients java.policy
    So, please suggest me a way to resolve this problem.
    Thanks in advance :)

  • Java.policy - does it need restart of all processes to take effect

    I have to change java.policy in WebSphere. Do I have to restart all the servers running on that node (all Java Processes using that JRE) for the policy changes to take effect?
    This will force me to restart all the other applications running on different WAS server instances. Is there a way to avoid this?
    Thanks
    Satish

    I am not familiar with WebSphere but there should be a way to refresh the Policy. My Mozilla browser Java console has this option.

  • Java.policy file  - Must I change it?

    I just got a certificate from Verisign with which I signed my applet. It works fine and now I want to distribute it to a group of users.
    Back when I was developing the applet with a self-signed cert, I changed the java.policy file to allow the applet to do things 'outside the sandbox'.
    I thought, perhaps mistakenly, that when I got the Verisign ceritifcate I would not need to concern myself with java.policy in any way. But now, even with the Verisign cert, my applet won't run correctly w/o the updated policy file.
    This is only important to me as I do not want to go around to 'x' number of user workstations and modify each java.policy file.
    Am I missing something??
    thanks

    You mention
    "you should be able to remove the policy file and users can just accept the certificate "
    I experience the same, remove all policy files, signed applets can then access resopurces on the local machine. However, practically all the documentation I read regarding JAVA 2 (I'm using 1.4.1_02) says you must have a policy file when using a signed applet. At least they say sign your applet and then indicate what the policy file should look like to grant specific permissions for that applet. I find no policy file will still allow a signed applet to access local files... Is this a bug in JAVA 2 1.4.1_02, or the correct behavior. thanks in advance.

  • Are there .java.policy changes for 1.6.0_10-rc2?

    Hi,
    I just installed 1.6.0_10-rc2 and now my applets are getting: access denied (java.io.FilePermission read errors. The .java.policy file has been working for years with 1.4 and 1.5. Now with 1.6.0_10-rc2 I get these errors?
    How do I find out what the problem is and correct it?
    Thanks,
    Norm

    Hi All
    Got a similar issue with the tracking / bookmarking of sessions - when on sun Java update 7 all is well however when update 10 or 11 is installed then SCROM session start on page 1 not the page you were on, also as expected they do not get marked as complete.
    Two things happen
    1) A small window is left for - [http://riti04.cornwall.nhs.uk:7780/ilearn/en/learner/jsp/relogin.jsp] - URL
    2) We get an Error on page - [http://riti04.cornwall.nhs.uk:7780/ilearn/en/learner/jsp/lms.jsp] - URL
    Looked for the Plugin section as per a pervious within the Java Control panel - but I'm not seeing it.
    We use iLearn 5.0 and I am begining to think we need a patch but unsure which.
    Thanks
    Stephen

  • File Access with unsigned Applet through editing the java.policy file

    I'am starting to lose my hair on this...
    I am trying to get an applet to run so that it can access the file system to move files on my local maschin. Because this applet is only running on my VM i can change the java.policy to avoid the signing of the applet.
    first of all, if i wrote in the java.policy file
    grant {
      permission java.security.AllPermission; 
    };everything is working perfekt.
    But I have not the intention to open the gates for any applet out there, so i want to limit the access to my applet. With every of the following versions I get at best an
    java.security.AccessControlException: access denied (java.io.FilePermission...
    My Setup
    My Java Version: jre1.6.0_02
    My applet is located unter the url
    http://admin.mydomain.com/applet.jar
    In Html i tryed the following different versions of loading the applet - none worked
    <applet codebase="http://admin.mydomain.com/" name="shortcut" code="start.class" archive="applet.jar" width="0" height="0"></applet>
    <applet codebase="http://admin.mydomain.com" name="shortcut" code="start.class" archive="applet.jar" width="0" height="0"></applet>
    <applet name="shortcut" code="start.class" archive="http://admin.mydomain.com/applet.jar" width="0" height="0"></applet>in java.policy i tryed following versions with every html applet load version
    grant codeBase "http://admin.x-press.de/-" {
      permission java.security.AllPermission; 
    grant codeBase "http://admin.x-press.de/+" {
      permission java.security.AllPermission; 
    grant codeBase "http://admin.x-press.de/applet.jar" {
      permission java.security.AllPermission; 
    };why is it with
    grant {
      permission java.security.AllPermission; 
    };working, and not with the other versions?
    i am almost bold now, please try to save my last hair from falling down.
    any suggestion would be nice
    thanks, feyyaz
    Message was edited by:
    feyyazdogu

    I read the mentioned documentation and your right, some of my versions were wrong, but after reading the doumentation again i came to following result which should had worked but didn't.
    java.policy
    grant codeBase "http://admin.mydomain.com/*" {
      permission java.security.AllPermission;
    HTML File
    <applet codebase="http://admin.mydomain.com/" name="shortcut" code="start.class" archive="applet.jar" height="0" width="0"></applet>if I am entering http://admin.mydomain.com/applet.jar i can download the jar, so the archive lays in the correct directory.
    what i am doing wrong? do i have to change an additional file somewhere else?

  • Auto upgrade jre and auto retain java.policy

    Hello,
    I need to automatically update clients with jre 1.4.2_07 and also retain the existing java.policy from the previous version (1.4.2_04). I have the jre installation kicking off correctly (with IE and XP) using
    codebase = "http://myserver/jinstall-1_4_2_07-windows-i586.cab#Version=1,4,2,70"
    but I also need to use my existing java.policy before the rest of the applet loads.
    I am not familiar with cab files, but is it possible to add a subsequent step to the jre install which would replace the generic java.policy with my specific java.policy? or any other way ??
    Thanks, Sari

    851004 wrote:
    ..It has been re-written from spec="1.0" to spec="1.5" ..Who changed it, and why?
    ..Does anybody else have an answer, solution, or suggestion ..?I suggest:
    <ul>
    <li>Change the spec. number back to something that 1.4 JWS claims to understand (i.e. "1.0").
    <li>Checking the launch file using JaNeLA
    </ul>
    Edited by: Andrew Thompson on Apr 9, 2011 7:54 AM

  • Essential question concerning java.policy file

    I have been searching this forum for an answer to this question:
    Is there a way to run a signed applet on an intranet (via the Plugin) with out having to go around to each user's workstation and change their java.policy file?
    So far, I have seen this question asked several times but with no concrete answer.
    Thanks for any help!

    You can create your own Policy implementation as shown in the following link :
    http://www.javageeks.com/Papers/JavaPolicy/index.html
    This has some drawbacks.
    I overcame your problem by writing my own Security Manager.

  • .java.policy file problem

    Is there someone who knows how to reinitialise the java policy file at runtime?
    My signed applet writes a policy file to the users home directory, but that file is only used after closing the browser and surfing back to our page. It should immediatly use that new file.
    Someone who got some experience with that...?
    Regards

    And is it true that if you use a Thawte or verisign certificate, you will not have to change the .java.policy file?

  • Please Help java.policy signedBy can't access file local

    i create keystore and signjar in web applet
    run tomcat access file in local but not acess file denied
    i goto edit file java.policy
    grant {
         permission java.security.AllPermission;
    can access file
    but put SignedBy cannot access file
    grant SignedBy fuangchai{
         permission java.security.AllPermission;
    Please help me example file keystore,applet.jar,java.policy
    to signedby access file local in webapplet
    env JDE 1.5 ,javascript yui 2.8 ,prototype js,tomcat6
    File html
    <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    codebase="http://java.sun.com/update/1.5.0/jinstall-1_5-windows-i586.cab#Version=5,0,0,5"
    width="1" height="1" >
    <param name=code value="com.arg.aes.test.FileDirectoryBS.class" >
    <param name=archive value="app.jar">
    <param name=codebase value="." >
    <param name="type" value="application/x-java-applet;version=1.5">
    <param name="scriptable" value="true">
    <param name="mayscript" value="true">
    <param name="debug" value="false">
    <comment>
    <embed name="myApplet" id="myApplet"
    type="application/x-java-applet;version=1.5"
    code="com.arg.aes.test.FileDirectoryBS.class"
    archive="app.jar"
    java_codebase="."
    width="1"
    height="1"
    scriptable="true"
    mayscript="true"
    pluginspage="http://java.sun.com/products/plugin/index.html#download">
    <noembed>
    </noembed>
    </embed>
    </comment>
    </object>
    <applet
    code="com.arg.aes.test.FileDirectoryBS"
    width="1"
    height="1"
    archive="app.jar"
    name="myApplet"
    codebase="."
    MAYSCRIPT="true"
    >
    </applet>
    javascript
    initlistfile : function() {
              try
                   var list = $("myApplet").initlistfileInDir();     
                   var jsondata = list.evalJSON();
                   /*alert(jsondata.dirname);
                   alert(jsondata.dirpath);
                   alert(jsondata.listfile.length);*/
                   initTableLeft(jsondata.listfile);
              catch(e)
                   alert("Exception : access denied.");
                   return;
    import java.applet.Applet;
    import java.io.File;
    import java.security.Permission;
    import java.security.PermissionCollection;
    import java.security.Policy;
    import java.security.ProtectionDomain;
    import java.text.DecimalFormat;
    import java.text.NumberFormat;
    import java.util.ArrayList;
    import java.util.Enumeration;
    import java.util.List;
    * @author fuangchai
    public class FileDirectoryBS extends Applet{
    public static File[] ROOTS = File.listRoots();
    public static String HOME = System.getProperty("user.home");
    public String listDir()
    return JsonObj.makeTopDir((ROOTS.length > 0)?ROOTS : new Object[]{HOME});
    public String initlistfileInDir()
    return listfileInDir(null);
    public String listfileInDir(String dirName)
    if(null == dirName || dirName.equals(""))
    System.out.println("root = " + ROOTS.length);
    try {
    dirName = (ROOTS.length > 0)?ROOTS[0].getPath():HOME;
    catch (Exception e) {
    e.printStackTrace();
    return "";
    System.out.println("#########################");
    DirectoryDescImp obj = makeObjDir(dirName);
    return (null == obj)?null:JsonObj.makeDir(obj);
    public String listlinkInDir(String dirName)
    if(null == dirName || dirName.equals(""))
    System.out.println("root = " + ROOTS.length);
    try {
    dirName = (ROOTS.length > 0)?ROOTS[0].getPath():HOME;
    catch (Exception e) {
    e.printStackTrace();
    return "";
    System.out.println("#listlinkInDir#");
    try {
    File obj = new File(dirName);
    return (null == obj)?null:JsonObj.makelinkDir(obj.getName(),obj.getPath());
    } catch (Exception e) {
    System.out.println("I can't access a file here! Access Denied!");
    e.printStackTrace();
    return null;
    public boolean isEnc(File f)
    //TODO
    return false;
    public DirectoryDescImp makeObjDir(String dirName)
    System.out.println("dirName = " + dirName);
    try{
    File dir = new File(dirName);
    String[] entries = dir.list();
    if(null == dir || null == entries || entries.length <= 0)
    System.out.println("Data is null or not obj." );
    return null;
    System.out.println("Dir List = " + dir.list().length);
    System.out.println("Dir Name = " + dir.getName());
    System.out.println("Dir Path = " + dir.getPath());
    DirectoryDescImp dirDesc = new DirectoryDescImp();
    dirDesc.setDirName(dir.getName());
    dirDesc.setDirPath(dir.getPath());
    List<FileDescImp> list = new ArrayList<FileDescImp>();
    for(int i=0; i < entries.length; i++) {
    File f = new File(dir, entries);
    FileDescImp fDesc = new FileDescImp();
    fDesc.setFile(f);
    fDesc.setFileEncrept(isEnc(f));
    list.add(fDesc);
    dirDesc.setListfile(list);
    return dirDesc;
    catch(Exception e){
    System.out.println("I can't access a file here! Access Denied!");
    e.printStackTrace();
    return null;
    Thank you
    Fuangchai Jum
    Mail [email protected]
    Edited by: prositron on Jan 13, 2010 7:35 AM

    OK,
    Let's say I have to intialize Environment, and call method initEnvironment() in Applet's init(). Environment class:
    class Environment
         private KeyStore keyStore;
         private Enumeration<String> aliases;
         public void initEnvironment() {
              Security.addProvider(new sun.security.mscapi.SunMSCAPI());
              keyStore = KeyStore.getInstance("Windows-MY");
              keyStore.load(null);
              aliases = keyStore.aliases();
    }Applet is signed, I trust signer.
    Since Applet is signed I'm able to overwrite existing .java.policy under user.home.
    This doesn't work if I don't have .java.policy:
    grant {
      permission java.security.SecurityPermission "insertProvider.SunMSCAPI";
      permission java.security.SecurityPermission "authProvider.SunMSCAPI";
      permission java.util.PropertyPermission "jsr105Provider", "read";
      permission java.util.PropertyPermission "com.sun.xml.internal.ws.api.pipe.Fiber.serialize", "read";
      permission java.lang.RuntimePermission "setContextClassLoader";
      permission java.util.PropertyPermission "com.sun.xml.internal.ws.api.streaming.XMLStreamWriterFactory.noPool", "read";
      permission java.lang.RuntimePermission "accessDeclaredMembers";
      permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
      permission java.lang.RuntimePermission "accessClassInPackage.com.sun.xml.internal.ws.fault";
      permission java.util.PropertyPermission "com.sun.xml.internal.ws.api.streaming.XMLStreamWriterFactory.woodstox", "read";
    };P.S.
    Does it make sense to be able to make changes to file system and not be able to make actions from above policy?!?!

  • How can I change the policy file?

    I have designed an applet to read a file from the local Machine.
    This applet thro a servlet reads the contents of the file specified.
    I use Tomcat 4.1.12 server and this is an client-server application.
    To read the file in the local machine, I set the permission as follows in the .java.policy file in the Local Machine.
    grant codeBase "http://MyMachine:8080/Example" {
    permission java.io.FilePermission "<<ALL FILES>>", "read, write, delete, execute";
    as the applet file is in the Example of the server "MyMachine".
    Its working and my applet is able to read the file from the local machine it runs.
    Now my problem is I cannot set/change the policy file in every machine where my applet runs.
    Instead if there is a way to change the policy when the applet downloads,that'll be effective.
    That is I donot want to go and change the policy file manually in each and every machine where my applet runs(I donot even know which are the machines going to run the applet).
    Is there any means to acheieve my need?
    Please explain me in detail or direct me to the relevent web sites or links.
    Thank you

    Hi Hosuke,
    I had the same problem, thanks for the advise.
    Still I have a remark to make.
    The thing is that, in order for the applet to have the permission granted (for whatever), you need to have a policy file which you can include in the JAR file (like you explained before) AND also you need to add an entry in the java.security file (located for me: "C:\Program Files\Java\j2re1.4.1_01\lib\security\java.security") that tells the applet where to find all the .policy files.
    Something like: policy.url.4=file:/c:/java.policy
    But since we are talking about an applet we are not able to make changes to this file.
    Maybe you or anyone else knows a workaround for this problem.
    Thanks in advance,
    Ronald Vromans.

  • Java takes too long to load if java.policy has many sites to grant acess to

    The problem is that we noticed that the time Java takes to load when it's invoked by any applet from the very first time on IE, is directly proportional to the size of the java.policy file.
    You can have many sites to grant access to inside your java.policy file. As you know, it's typically done like this:
    grant codeBase "http://<url>/<dir>/*" {
         permission java.security.AllPermission;
    The more entries I add to this file, the slower the performance gets (as of java loading time).
    We have more than 10 entries on our java.policy file, and we are getting a 40-seconds penalty time each time java is loading.
    Having gone further with this problem, we have discovered that time is being lost when Java is trying to resolve (netBios and DNS) ALL of the sites specified on the java.policy file, BEFORE running any applet of ANY site (when Java loads). We cannot understand why Java is trying to resolve those names, even though you are not trying to visit them....
    Is there a workaround for this issue ?
    We've tried to:
    a) Use IP's instead of names on the java.policy: this resolves the problem but it creates another one: IP maintenance. It's not applicable because IP's can change without notice.
    b) Use more patterns like "*", for example:
    grant codeBase "http://*mysit*/<dir>/*" {
    so that Java will not be able to "guess" the name, nor resolve it.
    But unfortunately, this didn't work :-(
    c) Include the java.policy file on each applet (inside the jar file), instead of an unique java.policy file on each Windows machine. This solution doesn't fit our requirements, because we cannot ask applications to manage their own permissions. We want to control them with an unique & protected & secured java.policy file.
    d) Sign applets: Same reason of c)
    Is there a workaround for this issue ?
    We need Java to load in few seconds, but mantain java.policy funcionality.
    Thank you.
    Marc.

    >
    Try putting the domain names in the Windows hosts files with their numeric addresses. That should bypass any DNS lookup. If you have central maintenance you can update all the hosts files when IP address change.
    We have considered this option, but then we have the same problem described on c). IP maintentance. IPs change often and we cannot control it.
    Malcolmmc, paul.miner, jschell,
    I think the problem is Netbios resolution, rather than DNS one. The sites that figure on java.policy file, are not available in terms of Netbios (they are not LAN clients), so they are only visibles on DNS resolution. But Java still tries to resolve them with Netbios first, so I think there's a timeout on this resolution (not the DNS one) . This timeout causes the problem.
    But, anyway .... Why is Java trying to resolve those names ??? In fact, Java will only have to match the site you are visiting with the site specified on java.policy (just a String comparison). Why does Java need to resolve (netbios & dns) the names on java.policy? I cannot figure out why.
    Thank you all.
    Marc

  • Java takes too long to load if java.policy has many grants to http URLs

    I am facing a nasty issue with trying to secure the Java browser plugin using the java.policy file. Some jars cause the JVM to stall for a time that is directly proportional to the size of the java.policy file.
    The entries inside our java.policy look like this:
    *grant codeBase "http://some.site.local:port/-" { permission java.security.AllPermission; };*
    The more entries I add to this file, the slower the performance gets (as of java loading time). Using -Djava.security.debug=all I found that the timeout is 4.5 seconds for every grant in the java.policy. The log output just before the delay looks like this:
    policy: evaluate codesources:
    Policy CodeSource: (http://some.site.local:port/- <no signer certificates>)
    *Active CodeSource: (http://wassup/wassup.jar [*
    The http://wassup/wassup.jar is a signed test jar I installed on a local web server.
    This old thread suggests this is a DNS/Netbios lookup timeout. However, Wireshark does not show any such traffic. Our DNS server does reply quickly, both on failure and success. http://192.9.162.102/thread.jspa?threadID=5250986&messageID=10039588
    When I use the remote http://mindprod.com/applet/wassup.html there is no delay. The only difference I can see is that the remote JAR is always loaded via http, while the local jar is cached. Remote jar:
    *network: Cache entry not found [url: http://mindprod.com/applet/wassup.jar, version: null]*
    network: Connecting http://mindprod.com/applet/wassup.jar with proxy=HTTP @ proxy.company.local/10.10.1.2:8080
    network: Downloading resource: http://mindprod.com/applet/wassup.jar
    Content-Length: 19.804
    Content-Encoding: null
    Local jar:
    network: Connecting http://wassup/wassup.jar with proxy=DIRECT
    network: Connecting http://wassup:80/ with proxy=DIRECT
    network: ResponseCode for http://wassup/wassup.jar : 304
    network: Encoding for http://wassup/wassup.jar : null
    network: Disconnect connection to http://wassup/wassup.jar
    cache: Reading Signers from 1218 http://wassup/wassup.jar | C:\Program Files\Java\JrejCache\6.0\53\bd564b5-14aba644.idx
    cache:  Read manifest for http://wassup/wassup.jar: read=691 full=691
    I am using 1.6.0u22 at the moment. Is there anything I can do to fix this?

    >
    Try putting the domain names in the Windows hosts files with their numeric addresses. That should bypass any DNS lookup. If you have central maintenance you can update all the hosts files when IP address change.
    We have considered this option, but then we have the same problem described on c). IP maintentance. IPs change often and we cannot control it.
    Malcolmmc, paul.miner, jschell,
    I think the problem is Netbios resolution, rather than DNS one. The sites that figure on java.policy file, are not available in terms of Netbios (they are not LAN clients), so they are only visibles on DNS resolution. But Java still tries to resolve them with Netbios first, so I think there's a timeout on this resolution (not the DNS one) . This timeout causes the problem.
    But, anyway .... Why is Java trying to resolve those names ??? In fact, Java will only have to match the site you are visiting with the site specified on java.policy (just a String comparison). Why does Java need to resolve (netbios & dns) the names on java.policy? I cannot figure out why.
    Thank you all.
    Marc

  • Why can't I use PayPal with Family Sharing? Have a US Visa card but foreign address, and Apple does not seem to be able to cope with that (even though it is a multinational corporation). Could we lean on Apple to change this policy?

    Paypal for Family Sharing - Why can't I use PayPal with Family Sharing? Have a US Visa card but a foreign address, and Apple does not seem to be able to cope with that (even though it is a multinational corporation). So I set up payment with Paypal, and it worked fine. Now I want to take advantage of Family Sharing, but Apple won't allow it. Could we lean on Apple to change this policy?

    If you are not in the US then you cannot use the US store, the store's terms say that you have to be in a country to use it - if you are using the US store then you are risking having your account disabled.
    In terms of feedback for Apple : http://www.apple.com/feedback/

Maybe you are looking for