Stocks RMI example not working - Security Exception

Hi,
I was trying to run the "Stocks" RMI example that comes with
Weblogic server(see
http://www.weblogic.com/docs45/classdocs/API_rmi.html#clientside)
I compiled and configured the appropriate files, and tried to
load the sample applet (StockApplet.java) loaded on the
StockApplet.html page (using Microsoft IE browser).
However, the applet generated the following exception :
java.lang.ExceptionInInitializerError: com/ms/security/SecurityExceptionEx
     at weblogic/common/internal/TengahClassLoaders.registerURL (TengahClassLoaders.java:51)
     at weblogic/rjvm/RJVMImpl.loadFromCluster (RJVMImpl.java:1106)
     at weblogic/jndi/WLInitialContextFactoryDelegate.newContext (WLInitialContextFactoryDelegate.java:247)
     at weblogic/jndi/WLInitialContextFactoryDelegate.getInitialContext (WLInitialContextFactoryDelegate.java:205)
     at weblogic/jndi/Environment.getContext (Environment.java:122)
     at weblogic/jndi/Environment.getInitialContext (Environment.java:105)
     at weblogic/rmi/Naming.getContext (Naming.java:225)
     at weblogic/rmi/Naming.lookup (Naming.java:67)
     at examples/rmi/stock/StockApplet.init (StockApplet.java:127)
     at com/ms/applet/AppletPanel.securedCall0 (AppletPanel.java)
     at com/ms/applet/AppletPanel.securedCall (AppletPanel.java)
     at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
     at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
     at com/ms/applet/AppletPanel.run (AppletPanel.java)
     at java/lang/Thread.run (Thread.java)
As you can see this looks like some sort of security exception. (StockApplet.java:127)
in the above exception is the line where StockApplet calls Naming.lookup(). So
I'm guessing it has something to do with it getting the Weblogic's RMI support
classes to the local VM and deserializing and installing them, which generates
a security exception.
What needs to be done to make the example work properly?
Thanks,
Leonid Portnoy
(In addition, two more types of exceptions are generated, which might be related
to the cause of the above exception. These exceptions are :
com.ms.security.SecurityExceptionEx[weblogic/rjvm/JVMID.setLocalID]: cannot connect
to "testserver"
     at com/ms/security/permissions/NetIOPermission.check (NetIOPermission.java)
     at com/ms/security/PolicyEngine.deepCheck (PolicyEngine.java)
     at com/ms/security/PolicyEngine.checkPermission (PolicyEngine.java)
     at com/ms/security/StandardSecurityManager.chk (StandardSecurityManager.java)
     at com/ms/security/StandardSecurityManager.chkex (StandardSecurityManager.java)
     at com/ms/security/StandardSecurityManager.checkConnect (StandardSecurityManager.java)
     at java/net/InetAddress.getLocalHost (InetAddress.java)
     at weblogic/rjvm/JVMID.setLocalID (JVMID.java:59)
     at weblogic/rjvm/JVMID.localID (JVMID.java:43)
     at weblogic/rjvm/LocalRJVM.getID (LocalRJVM.java:143)
     at weblogic/rmi/extensions/BasicServerObjectReference.<init> (BasicServerObjectReference.java:44)
     at weblogic/rmi/extensions/BasicServerObjectAdapter.<init> (BasicServerObjectAdapter.java:43)
     at weblogic/rmi/extensions/BasicRequestHandler.<init> (BasicRequestHandler.java:30)
     at weblogic/rmi/extensions/BasicRequestDispatcher.<init> (BasicRequestDispatcher.java:42)
     at weblogic/rmi/internal/OIDManager.initializeDGCServer (OIDManager.java:267)
     at weblogic/rmi/internal/OIDManager.getReplacement (OIDManager.java:176)
     at weblogic/rmi/internal/OIDManager.replaceObject (OIDManager.java:84)
     at weblogic/rmi/server/UnicastRemoteObject.exportObject (UnicastRemoteObject.java:25)
     at examples/rmi/stock/StockApplet.init (StockApplet.java:110)
     at com/ms/applet/AppletPanel.securedCall0 (AppletPanel.java)
     at com/ms/applet/AppletPanel.securedCall (AppletPanel.java)
     at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
     at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
     at com/ms/applet/AppletPanel.run (AppletPanel.java)
     at java/lang/Thread.run (Thread.java)
and
com.ms.security.SecurityExceptionEx[weblogic/jndi/Environment.getProperty]: Unable
to access system property: weblogic.jndi.provider.rjvm
     at com/ms/security/permissions/PropertyPermission.check (PropertyPermission.java)
     at com/ms/security/PolicyEngine.shallowCheck (PolicyEngine.java)
     at com/ms/security/PolicyEngine.checkCallersPermission (PolicyEngine.java)
     at com/ms/security/StandardSecurityManager.chk (StandardSecurityManager.java)
     at com/ms/security/StandardSecurityManager.checkPropertyAccess (StandardSecurityManager.java)
     at java/lang/System.getProperty (System.java)
     at weblogic/jndi/Environment.getProperty (Environment.java:598)
     at weblogic/jndi/Environment.getProviderRJVM (Environment.java:691)
     at weblogic/jndi/WLInitialContextFactoryDelegate.getInitialContext (WLInitialContextFactoryDelegate.java:166)
     at weblogic/jndi/Environment.getContext (Environment.java:122)
     at weblogic/jndi/Environment.getInitialContext (Environment.java:105)
     at weblogic/rmi/Naming.getContext (Naming.java:225)
     at weblogic/rmi/Naming.lookup (Naming.java:67)
     at examples/rmi/stock/StockApplet.init (StockApplet.java:127)
     at com/ms/applet/AppletPanel.securedCall0 (AppletPanel.java)
     at com/ms/applet/AppletPanel.securedCall (AppletPanel.java)
     at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
     at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
     at com/ms/applet/AppletPanel.run (AppletPanel.java)
     at java/lang/Thread.run (Thread.java)

Can you post the Stock Applet and other source files...
Jamal
([email protected])

Similar Messages

  • Why my RMI is not Working in Linux???

    Hiii how ru?
    I am Rahul here
    Well I have a problem that my RMI in not working on Linux.. so can u tell me the solution to my problem???
    When i am typing following command i am getting exception as RmiNotBoundException
    java -Djava.security.policy=my.policy ChaClient&
    however my Server is Starting normally but client is not connection to server.
    so please tell me the solution to this problem
    U can contact me at
    [email protected]
    [email protected]
    Thank u Very much...

    i ran into the same issue dealing with RMI and Linux. My issue was the the stub that linux was giving you gave in the host field the ip number of "127.0.0.1" which tried to make the client connect to itself. this is how i got around it:
    java -Djava.rmi.server.hostname=<ip that other clients will connect to>
    so, for instance, if on a client you connect to the server with an IP of 10.5.0.1, then when starting up the java vm, you start it
    java -Djava.rmi.server.hostname=10.5.0.1
    hopefully that helps

  • My Stocks widget is not working.  The graph part works, but not the stock value section.

    My Stock widget is not working.  No prices are displayed.  Fix?

    If it is the Apple provided widget, Yahoo! Finance, there have been a rash of problems lately - see the More Like This box at the top right.
    1. If you have any mutual funds loaded, try removing them.
    2. Try opening a 2nd copy of the widget. That has worked for me a couple of times.
    3. If you have a backup, try restoring the widget. It is normally in the hard drive/Library. It might be in your user folder/Libary also. See below on how to access your user library.
    4. Try removing the com.apple.dashboard.plist in your user folder.
    You need to look in your user Library/Preferences for the .plist. Either hold down the option key while using the Finder “Go To Folder” command and select your user Library in your home folder or use the Finder “Go To Folder” command and enter ~/Library/Preferences/com.apple.dashboard.plist.  Move the .plist to your desktop.
    Log out/in and test. If it works okay, delete the plist(s) from the desktop.
    If the same, return the .plist(s) to where you got them from, overwriting the newer ones.
    If you prefer to make your user library permanently visible, use the Terminal command found below.
    Show User Library
    You might want to bookmark the command. I had to use it again after I installed 10.8.4. I have also been informed that if you drag the user library to Finder it will remain visible.

  • RMI service not working only inside desktop application creatd in netbeans

    Actually I have made an RMI service which works just fine inside a normal java application which I have created in netbeans 6.1, now the problem aries when I put this code inside a desktop application creatd in netbeans 6.1, see the code below, when I use this code in desktop application creatd in netbeans 6.1 the application hangs at the line as shown below;
    String[] list = registry.list();
    well I do not no why it just hangs there and after three or for minutes it returns with some error, I have shown the error in the end. What it seems to me that inside desktop application creatd in netbeans 6.1 the application can not get registry.list() or registry list.
    try
    registry = LocateRegistry.getRegistry(serverAddress, 1099);
    String[] list = registry.list();
    if( list == null )
                        throw new RemoteException( "list == null" );
    else
    for (int k=0; k < list.length; k++)
    System.out.println("registry" + k + ": " + list[k].toString());
    System.getProperties().setProperty("java.security.policy", "wideopen.policy");
    // Create and install a security manager
    if(System.getSecurityManager() == null)
    System.setSecurityManager(new RMISecurityManager());
    rmiServer = (ReceiveNodeInterface)(registry.lookup("RMIServiceToSendNodesHierarchy"));
    String text = "Please, send us the root node.";
    rootNode = rmiServer.getRootNode(text);
    treeModel = new DefaultTreeModel( rootNode );
    jTreeOPCservers.setModel(treeModel);
    catch(RemoteException e){
    e.printStackTrace();
    catch(NotBoundException e){
    e.printStackTrace();
    the error is ;
    java.rmi.ConnectIOException: Exception creating connection to: 192.168.1.142; nested exception is:
    java.net.SocketException: Connection reset
    at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:614)
    at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
    at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
    at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)
    at sun.rmi.registry.RegistryImpl_Stub.list(Unknown Source)
    at tagbrowser.TagBrowser.getRootNodeIntoTree(TagBrowser.java:198)
    at tagbrowser.TagBrowser.<init>(TagBrowser.java:83)
    at desktopapplication1.DesktopApplication1View.MyAction(DesktopApplication1View.java:217)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    No I am sure that I am not starting the RMI Registry with socket factories at the server. Next I am sure that the RMI Registry is running. Infect as I have said in the start that I have made an RMI service which works just fine inside a normal java application which I have created in netbeans 6.0.1 the problem aries when I put this code inside a desktop application creatd in netbeans 6.0.1 or 6.5 both.

  • JSF Getting Started Example not Working

    I've installed and configured JSF according to CoreJSF 1st Chapter example "A simple JSF Application" (available at http://horstmann.com/corejsf/). The only different thing i've done is to put the jsp pages in a separate folder within the root web application folder. The JSF seems to be properly configured, since i'm able to see the UI components in the login page. However, once I click login button, the application takes me once more to the login page (same page that put the request). I figure it is a problem with the navigation file, I've changed the faces-config.xml including "jsf/welcome.jsp" as target since "jsf" is the separate directory I created for JSP files. I does not work (not getting exceptions though). Any prompt help will be highly appreciated.
    These are the files:
    webapproot/jsf/index.jsp
    <html>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <f:view>
    <head>
    <title>A Simple Java Server Faces Application</title>
    </head>
    <body>
    <h:form>
    <h3>Please enter your name and password.</h3>
    <table>
    <tr>
    <td>Name:</td>
    <td>
    <h:inputText value="#{user.name}"/>
    </td>
    </tr>
    <tr>
    <td>Password:</td>
    <td>
    <h:inputSecret value="#{user.password}"/>
    </td>
    </tr>
    </table>
    <p>
    <h:commandButton value="Login" action="login"/>
    </p>
    </h:form>
    </body>
    </f:view>
    </html>
    webapproot/jsf/welcome.jsp
    <html>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <f:view>
    <head>
    <title>A Simple Java Server Faces Application</title>
    </head>
    <body>
    <h:form>
    <h3>
    Welcome to Java Server Faces,
    <h:outputText value="#{user.name}"/>!
    </h3>
    </h:form>
    </body>
    </f:view>
    </html>
    webapproot/WEB-INF/faces-config.xml
    <faces-config>
         <navigation-rule>
         <from-view-id>jsf/index.jsp</from-view-id>
         <navigation-case>
         <from-outcome>login</from-outcome>
         <to-view-id>jsf/welcome.jsp</to-view-id>
         </navigation-case>
         </navigation-rule>
         <managed-bean>
         <managed-bean-name>user</managed-bean-name>
         <managed-bean-class>co.edu.unal.dnic.licapa.capa.UserBean</managed-bean-class>
         <managed-bean-scope>session</managed-bean-scope>
         </managed-bean>
    </faces-config>
    webapproot/WEB-INF/web.xml
    <web-app>
         <servlet>
         <servlet-name>Faces Servlet</servlet-name>
         <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
         <load-on-startup>1</load-on-startup>
         </servlet>
         <servlet-mapping>
         <servlet-name>Faces Servlet</servlet-name>
         <url-pattern>*.faces</url-pattern>
         </servlet-mapping>
         <welcome-file-list>
         <welcome-file>/index.html</welcome-file>
         </welcome-file-list>
         <display-name>DNIC - Capacitaci�n 1.0.1</display-name>
         <description>
         DNIC - Capacitaci�n 1.0.1
    </description>
    </web-app>
    Since I'm not getting any java exceptions I figure the UserBean class is working properly.
    Thank you......
    Julian

    try to put / at the beginning of the from-view-id and to-view-id

  • Core/examples/sessions/Broker example not working

    Guys
    I am trying the example with Oracle database instead of the HSQL database. I replaced the driver & url strings and put the classes12.jar in the classpath
    But I continue to get the following error. Can someone please tell me what I am missing.
    D:\toplink\examples\core\examples\sessions\broker>D:\JDev9i\jdk\bin\java.exe -classpath ""D:\JDev9i\jdk\lib\tools.jar";"d:\to
    plink\ant\lib\jaxp.jar";"d:\toplink\ant\lib\jakarta-ant-1.4.1-optional.jar";"d:\toplink\ant\lib\crimson.jar";"d:\toplink\ant\
    lib\ant.jar";.;d:\toplink\core\lib\toplink.jar;D:\JDev9i\jdbc\lib\classes12.jar;d:\toplink\core\lib\toplink.
    jar;D:\JDev9i\jdbc\lib\classes12.jar" -Dant.home=d:\toplink\ant -Dtl.home=d:\toplink -Dwls61.home= -Dwls70.home= -Dwas.home=
    -Doracle.home=D:\JDev9i\OC4J903 -Dexamples.home=d:\toplink\examples -Dtoplink.dir=d:\toplink\core\lib -Dtoplink.library=topli
    nk.jar,xerces.jar -Dtoplink.weblogic.path=d:\toplink\wls_cmp\lib\tl_wlsx.jar -Dtoplink.was.path=d:\toplink\was_cmp\lib\tl_wa
    sx.jar -Dhsql.path=d:\toplink\HSQL\lib\hsqldb.jar -DDEBUG=on org.apache.tools.ant.Main runExample -DtestClass=examples.sessions.broker.Demo
    Buildfile: build.xml
    init:
    verify.build.done:
    runExample:
    [java] 2003.05.19 03:54:35.625--DatabaseSession(11)--Thread[main,5,main]--Connection(12)--TopLink, version:TopLink - 9.0
    .3 (Build 423)
    [java] 2003.05.19 03:54:35.685--DatabaseSession(11)--Thread[main,5,main]--Connection(12)--connecting(DatabaseLogin(
    [java] platform => OraclePlatform
    [java] user name => "asdfbf"
    [java] datasource URL => "jdbc:oracle:thin:@localhost:fims"
    [java] ))
    [java] 2003.05.19 03:54:35.705--DatabaseSession(11)--Thread[main,5,main]--EXCEPTION [TOPLINK-4003] (TopLink - 9.0.3 (Bui
    ld 423)): oracle.toplink.exceptions.DatabaseException
    [java] EXCEPTION DESCRIPTION: Configuration error. Class [oracle.jdbc.driver.OracleDriver] not found.LOCAL EXCEPTION ST
    ACK:

    One more thing to add:
    I am not able to get any of the examples to work with Oracle database. Again the only thing I suppose I need to change are the folloowing lines in the EmployeeProject.java
         login.usePlatform(new oracle.toplink.internal.databaseaccess.OraclePlatform());
         login.setDriverClassName("oracle.jdbc.driver.OracleDriver");
         login.setConnectionString("jdbc:oracle:thin:@localhost:1522:fims");
         login.setUserName("kumarv");
         login.setEncryptedPassword("7AD96CD575D1A7FCAA504BA7E4FC");
    Also one line change in the sessions.xml file to use the OraclePlatform instead of the HSQLPlatform.
    Has any one got these to work with Oracle, Any help is really appreciated.
    classes12.jar is in the classpath so I don;t understand why I get the execption that:
    [java] EXCEPTION DESCRIPTION: Configuration error. Class [oracle.jdbc.driver.OracleDriver] not found.
    [java] oracle.toplink.exceptions.DatabaseException oracle.toplink.exceptions.DatabaseException.configurationErrorCla
    ssNotFound(java.lang.String)
    Thanks

  • HelloWorld Example Not Working

    Hi,
    I am using JCDK 2.2.2.
    Converter and scriptgen run without errors from C:\java_card_kit-2_2_2-windows\java_card_kit-2_2_2\samples (which is the existing samples directory):
    converter -classdir "C:\java_card_kit-2_2_2-windows\java_card_kit-2_2_2\samples\classes" -exportpath "C:\java_card_kit-2_2_2-windows\java_card_kit-2_2_2\api_export_files\;C:\java_card_kit-2_2_2-windows\java_card_kit-2_2_2\samples\classes\com\sun\javacard\samples\HelloWorld\javacard" -applet  0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x1:0x1 com.sun.javacard.samples.HelloWorld.HelloWorld com.sun.javacard.samples.HelloWorld 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x1 1.0
    scriptgen -o HelloWorld.scr ./classes/com/sun/javacard/samples/HelloWorld/javacard/HelloWorld.capI run cref from C:\java_card_kit-2_2_2-windows\java_card_kit-2_2_2\bin:
    cref.exe -o HelloWorld.eepromAnd then in another command prompt from C:\java_card_kit-2_2_2-windows\java_card_kit-2_2_2\bin:
    apdutool C:\java_card_kit-2_2_2-windows\java_card_kit-2_2_2\samples\HelloWorld.scrThe app installs fine. So now I want to test the code. I added a line to the script at the end to selecct the application:
    // Select HelloWorld
    0x00 0xA4 0x04 0x00 0x09 0xa0 0x0 0x0 0x0 0x62 0x3 0x1 0xc 0x1 0x7F;Which is not working (6d00 error)
    Any suggestions why this could be happening? Nothing throws errors except the line to select the app. It can't be a problem with the code, because I am running the sample files that came with the JCDK.
    P.S. I tried 'creating Helloworld' using the line
    0x80 0xB8 0x00 0x00 0x0b 0x09 0xa0 0x0 0x0 0x0 0x62 0x3 0x1 0xc 0x1 0x00 0x7F;But this gave a 6443 error.
    Edited by: Candice on Jul 11, 2011 2:14 AM

    P.S. I tried 'creating Helloworld' using the line
    0x80 0xB8 0x00 0x00 0x0b 0x09 0xa0 0x0 0x0 0x0 0x62 0x3 0x1 0xc 0x1 0x00 0x7F;But this gave a 6443 error.Applet not found for installation.
    • Cause: An attempt was made to create an applet instance, but the applet code was not installed on the card.
    • Solution: Verify that the applet package has been downloaded to the card.
    Remeber that after the first time you launch cref, you need to tell it where to load the EEPROM file from the last run with -i <file>. You can use the same file for -i and -o to be able to reuse the mask and store new state.
    Cheers,
    Shane

  • Hans Javaserver 3 book example not working

    Hello,
    This is from Hans Javaserver Pages Third edition
    <%-- Verify that the user is logged in --%>
    <c:if test="${validUser == null}">
    <jsp:forward page="login.jsp">
    <jsp:param name="origURL" value="${pageContext.request.requestURL}" />
    <jsp:param name="errorMsg" value="log in first." />
    </jsp:forward>
    </c:if>
    The above example does not seem to work.
    The code below seems to work
    <%-- Verify that the user is logged in --%>
    <c:if test="${validUser.name == null}">
    <jsp:forward page="login.jsp">
    <jsp:param name="origURL" value="${pageContext.request.requestURL}" />
    <jsp:param name="errorMsg" value="log in first." />
    </jsp:forward>
    </c:if>
    Any ideas why his example is not working on Tomcat 5.0?
    Thanks
    Frank

    Hi I was trying the same thing and was wondering why it doesn't accept the origURL, well it never takes the value of it at all and just skips the page that was requested and goes to mail.jsp no matter what.
    <c:choose>
    <c:when test="${! empty param.origURL}" >
    <c:redirect url="${param.origURL}" />
    </c:when>
    <c:otherwise>
    <c:redirect url="main.jsp" />
    </c:otherwise>
    </c:choose>
    The value of origURL is never passed to this authentication page! I would also like to know the reason why?
    Also I have a question to your last piece of code that works: where is the name parameter taken from? Is it the same as userName that is passed as a parameter from the login page? or is it something else? I'd really appreciate your help...
    <c:if test="${validUser.name == null}">

  • IPad audio  output is not working properly, except on Siri. Any ideas on what is wrong and how to fix it?

    iPad audio output does not work, except for on Siri. The mute button is not on, and the volume buttons have no effect/ don't work (unless Siri is open). I have reset the iPad, tried iOS7 and iOS8 resets, which didn't help. The audio output mostly works when headphones are out in, but has a tendency to cut out from time to time. Without headphones, Audio might start working again briefly from time to time, but most the time it doesn't.  Any ideas on what is wrong with it and how to fix it?
    my iPad is a 3rd gen, 16GB wifi only model, if that helps
    I did take it to an Apple Store, but the inncorrectly insisted that my speaker was bust and it would cost £250 to replace the whole iPad!

    Godly19 wrote:
    iPad audio output does not work, except for on Siri. The mute button is not on, and the volume buttons have no effect/ don't work (unless Siri is open). I have reset the iPad, tried iOS7 and iOS8 resets, which didn't help.
    iOS 8 isn't even out yet. If you are running iOS 8, I assume you are a developer and if you are, you are in the wrong forum to try to get help. If you are not a developer and you're running iOS 8, maybe that's why you are having problems on the iPad.
    The audio output mostly works when headphones are out in, but has a tendency to cut out from time to time. Without headphones, Audio might start working again briefly from time to time, but most the time it doesn't.  Any ideas on what is wrong with it and how to fix it?
    The type that I made bold doesn't make sense. Is this a typo and you mean that " headphones are not in"?
    I did take it to an Apple Store, but the inncorrectly insisted that my speaker was bust and it would cost £250 to replace the whole iPad!
    And you know they are incorrect because you get sound here and there from time to time? That fact doesn't prove that something isn't working correctly inside. You could very well have a bad connection inside the device causing this, but somehow you seem to know that's not the case.

  • Programmatically write rmi.policy not working

    Hello there,
    I am trying to write rmi.policy programatically in my server class. I tried these options,
    System.setProperty("java.security.policy","C:\\Program Files\\eclipse\\security\\rmi.policy"); also
    Properties p = System.getProperties();
    p.setProperty("java.security.policy","C:\\Program Files\\eclipse\\security\\rmi.policy"); but it is giving me this error,
    java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:1099 connect,resolve)my propeties file is
    grant {
        permission java.net.SocketPermission "*:1024-65535",
            "connect,accept";
        permission java.net.SocketPermission "*:80", "connect";
    };Could you please let me know the solution for this?
    Actually I dont want to write any rmi.policy file how can I hardcode all security permissions in my server class itself?
    Thnaks
    Sat'n

    You don't need to write a security policy at all. I didn't want to bother with a policy file, so I just extended the java.lang.SecurityManager class. It allows much more control
    Here's a sample class:
    public class MySecurityManager extends SecurityManager {
    public void checkPermission(Permission perm) {
       if (perm instanceof ReflectPermission)  return;
       if (perm instanceof SerializablePermission) return;
        if (perm instanceof FilePermission) {
              FilePermission fileperm=(FilePermission) perm;
              String filename=fileperm.getName();
              String test = fileperm.getActions();
                    //don't allow files to be deleted
             if (test.indexOf("delete")==-1) return;
         //throw a security exception for anything you don't want to allow
         throw new SecurityException("access?"+perm.getClass().toString()+":"+ perm.getName());
    public void checkRead(FileDescriptor fd) {
        public void checkRead(String file, Object context) {
    }You basically want to have empty methods for anything you want to allow (in the security manager class, the default is to throw a security exception). Take a look at the javadoc for SecurityManager & decide what methods you want to allow. The class above allows all read access to a file. It doesn't allow files to be deleted. There are certain permissions, like reflect permission, that you have to allow in order for program to run!
    Play around with it, by setting the security Manager equal to an instance of the MySecurityManager.

  • SISO OFDM TDD Example not working

    I was trying to use SISO OFDM example.
    But to surprise Its not working in both the two cases:-
    1. Loopback over air (.GVI gives no error but VLC is not receiving ant stream)
    2 No loopback : An error is returned on turning on the Base station:-
    The mobile station parameters are as in below figure:
    Can somen one explain the source of inusoid wave? I am surprised at it!
     

    Have you ever get the SISO OFDM TDD Example work with two device?
    Currently, I am doing the SISO OFDM TDD Example like your work with two USRP-RIO 2953R. I can do streaming within one USRP-RIO with loop back selection in the example, but when it comes to two USRP-RIO streaming, one is base station and the other is UE,  but the demo seems to be not working.

  • VideoPhoneLabs example not working

    Dear dev-team, could you also give more information about why
    the example-application (VideoPhoneLabs.swf) does not work, when I
    upload all the assets (not reg.cgi, while I want to use the
    Stratus-service) to a server (
    http://work.joeyvandijk.nl/stratus/VideoPhoneLabs.html).
    I am connected to the Stratus-webservice, but I get an
    idManagerError but does not know how I can solve this.
    I think it has to do with my id, but when I login to
    adobe.com and try to retrieve an ID I get the same which I am using
    at above example. So, I think my ID is not blocked or something.
    And I know that the Stratus-webservice is not down while your
    online version of the VideoPhoneLabs is working.
    I see in my error:
    Error #2048: Schending van beveiligingssandbox:
    http://work.joeyvandijk.nl/stratus/VideoPhoneLabs.swf
    kan geen gegevens laden van
    rtmfp://stratus.adobe.com/bc25bb58c9cf187e4178b40e-c16df88ec798/?identity=80b46c214f4c830 f28186fa40febc0a4a8c323393958ea99a0075b228d870e50&username=joeyvandijk
    which says that it cannot load data from the Stratus-service
    due to a SecurityError.
    So, I cannot run it locally OR on a webserver. Do you have
    some tips what could be the cause?
    Thnx in advance!
    :D

    Hi,
    I am trying the VideoPhoneLabs app, but still do not work.
    Please give some advices.
    I have done the procedure according to ReadMe.txt, then
    reg.cgi copied into my local web server. After that i got some
    error message as following when i accessed to it from another pc.
    [In the debugger window of FP10]
    TypeError: Error #1009: null <ono: sorry for japanese, i
    deleted them>
    at VideoPhoneLabs/onDisconnect()[C:\Users\ono\Documents\Flex
    Builder 3\VideoPhoneLabs\src\VideoPhoneLabs.mxml:548]
    at
    VideoPhoneLabs/idManagerEvent()[C:\Users\ono\Documents\Flex Builder
    3\VideoPhoneLabs\src\VideoPhoneLabs.mxml:484]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at HttpIdManager/httpFault()[C:\Users\ono\Documents\Flex
    Builder 3\VideoPhoneLabs\src\HttpIdManager.as:120]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.rpc::AbstractInvoker/
    http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[C:\autobuild\3.2.0\framewor ks\projects\rpc\src\mx\rpc\AbstractInvoker.as:170
    at mx.rpc.http::HTTPService/
    http://www.adobe.com/2006/flex/mx/internal::processResult()[C:\autobuild\3.2.0\frameworks\ projects\rpc\src\mx\rpc\http\HTTPService.as:852
    at mx.rpc::AbstractInvoker/
    http://www.adobe.com/2006/flex/mx/internal::resultHandler()[C:\autobuild\3.2.0\frameworks\ projects\rpc\src\mx\rpc\AbstractInvoker.as:188
    at
    mx.rpc::Responder/result()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\Responde r.as:43]
    at
    mx.rpc::AsyncRequest/acknowledge()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\ AsyncRequest.as:74]
    at
    DirectHTTPMessageResponder/completeHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\s rc\mx\messaging\channels\DirectHTTPChannel.as:403]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()
    [In the apps STATUS window]
    Connecting to rtmfp://stratus.adobe.com
    NetConnection event: NetConnection.Connect.Success
    Connected, my ID:
    c0e8c83410b0dbf0b66644b8e2418abb67a0d3a31ba42d55af961c140db0bf70
    ID event: idManagerError
    Error description: HTTP error:
    (mx.messaging.messages::AcknowledgeMessage)#0
    body = "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2
    Final//EN">
    <html>
    <head>
    <title>Index of /VideoPhoneLabs</title>
    </head>
    <body>
    <h1>Index of /VideoPhoneLabs</h1>
    <table><tr><th><img
    src="/icons/blank.gif" alt="[ICO]"></th><th><a
    href="?C=N;O=D">Name</a></th><th><a
    href="?C=M;O=A">Last
    modified</a></th><th><a
    href="?C=S;O=A">Size</a></th><th><a
    href="?C=D;O=A">Description</a></th></tr><tr><th
    colspan="5"><hr></th></tr>
    <tr><td valign="top"><img
    src="/icons/back.gif" alt="[DIR]"></td><td><a
    href="/">Parent
    Directory</a></td><td> </td><td
    align="right"> - </td></tr>
    <tr><td valign="top"><img
    src="/icons/unknown.gif" alt="[ ]"></td><td><a
    href="AC_OETags.js">AC_OETags.js</a></td><td
    align="right">24-Mar-2009 17:35 </td><td
    align="right">8.4K</td></tr>
    <tr><td valign="top"><img
    src="/icons/text.gif" alt="[TXT]"></td><td><a
    href="VideoPhoneLabs.html">VideoPhoneLabs.html</a></td><td
    align="right">24-Mar-2009 17:35 </td><td
    align="right">4.2K</td></tr>
    <tr><td valign="top"><img
    src="/icons/unknown.gif" alt="[ ]"></td><td><a
    href="VideoPhoneLabs.swf">VideoPhoneLabs.swf</a></td><td
    align="right">24-Mar-2009 17:35 </td><td
    align="right">735K</td></tr>
    <tr><td valign="top"><img
    src="/icons/unknown.gif" alt="[ ]"></td><td><a
    href="playerProductInstall.swf">playerProductInstall.swf</a></td><td
    align="right">24-Mar-2009 17:35 </td><td
    align="right">657 </td></tr>
    <tr><th
    colspan="5"><hr></th></tr>
    </table>
    <address>Apache/2.2.9 (Fedora) Server at 192.168.1.101
    Port 80</address>
    </body></html>
    clientId = "DirectHTTPChannel0"
    correlationId = "D8807C92-CB35-13AA-386C-3B10784B610C"
    destination = ""
    headers = (Object)#1
    DSStatusCode = 200
    messageId = "C3AF012E-AC2B-464D-C982-3B1078DAB158"
    timestamp = 0
    timeToLive = 0
    Disconnecting.
    Hanging up call
    NetConnection event: NetConnection.Connect.Closed
    ID event: idManagerError
    Error description: HTTP error:
    (mx.messaging.messages::AcknowledgeMessage)#0
    body = "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2
    Final//EN">
    <html>
    <head>
    <title>Index of /VideoPhoneLabs</title>
    </head>
    <body>
    <h1>Index of /VideoPhoneLabs</h1>
    <table><tr><th><img
    src="/icons/blank.gif" alt="[ICO]"></th><th><a
    href="?C=N;O=D">Name</a></th><th><a
    href="?C=M;O=A">Last
    modified</a></th><th><a
    href="?C=S;O=A">Size</a></th><th><a
    href="?C=D;O=A">Description</a></th></tr><tr><th
    colspan="5"><hr></th></tr>
    <tr><td valign="top"><img
    src="/icons/back.gif" alt="[DIR]"></td><td><a
    href="/">Parent
    Directory</a></td><td> </td><td
    align="right"> - </td></tr>
    <tr><td valign="top"><img
    src="/icons/unknown.gif" alt="[ ]"></td><td><a
    href="AC_OETags.js">AC_OETags.js</a></td><td
    align="right">24-Mar-2009 17:35 </td><td
    align="right">8.4K</td></tr>
    <tr><td valign="top"><img
    src="/icons/text.gif" alt="[TXT]"></td><td><a
    href="VideoPhoneLabs.html">VideoPhoneLabs.html</a></td><td
    align="right">24-Mar-2009 17:35 </td><td
    align="right">4.2K</td></tr>
    <tr><td valign="top"><img
    src="/icons/unknown.gif" alt="[ ]"></td><td><a
    href="VideoPhoneLabs.swf">VideoPhoneLabs.swf</a></td><td
    align="right">24-Mar-2009 17:35 </td><td
    align="right">735K</td></tr>
    <tr><td valign="top"><img
    src="/icons/unknown.gif" alt="[ ]"></td><td><a
    href="playerProductInstall.swf">playerProductInstall.swf</a></td><td
    align="right">24-Mar-2009 17:35 </td><td
    align="right">657 </td></tr>
    <tr><th
    colspan="5"><hr></th></tr>
    </table>
    <address>Apache/2.2.9 (Fedora) Server at 192.168.1.101
    Port 80</address>
    </body></html>
    clientId = "DirectHTTPChannel0"
    correlationId = "7863A499-3906-0CC3-1AED-3B1078EAAFFE"
    destination = ""
    headers = (Object)#1
    DSStatusCode = 200
    messageId = "716811AE-4A81-3468-4DAA-3B107945F936"
    timestamp = 0
    timeToLive = 0
    Disconnecting.
    Hanging up call
    Thank you for any advices.
    Ono Keiji

  • CookieCounter example not working.

    I have installed CookieCounter servlet example on my weblogic server.
              The properties needed for cookies management are also set in
              weblogic.properties (by default its there).
              The servlet works fine but, the servlet is unable to send/set cookiesCounter
              on my browser (I 've set to cookies prompt/cookies enable on my browser).
              Code, properties file and browser settings seems to be ok, still its not
              working. Any clues...
              PLATFORM: Server - Solaris
              Client - Win98 / internet explorer
              Thanks,
              Rajesh
              

    that was good....and fast....
    I modified the code to be:
    class Reader extends Thread
       Calculator c;
       public Reader(Calculator calc)
          c = calc;
       public void run()
          synchronized(c)
             try
                System.out.println("Waiting for calculation...");
                c.wait();
                System.out.println("I am just after the wait()");
             catch(InterruptedException e) {}
             System.out.println("Total is: " + c.total);
       public static void main(String[] args)
          Calculator calculator = new Calculator();
          calculator.start();
          new Reader(calculator).start();
          new Reader(calculator).start();
          new Reader(calculator).start();
    class Calculator extends Thread
       int total;
       public void run()
          synchronized(this)
             try
                for(int i=0; i<100; i++)
                   total += 1;
                   Thread.sleep(50);
                notifyAll();
             catch(InterruptedException e)
                e.printStackTrace();
    }and it worked just fine....thanks much

  • NotifyAll example not working

    Folks,
    I am trying to understand how threading works, and got this example from a book, can you please help me understand why it is not working.
    class Reader extends Thread
       Calculator c;
       public Reader(Calculator calc)
          c = calc;
       public void run()
          synchronized(c)
             try
                System.out.println("Waiting for calculation...");
                c.wait();
                System.out.println("I am just after the wait()");
             catch(InterruptedException e) {}
             System.out.println("Total is: " + c.total);
       public static void main(String[] args)
          Calculator calculator = new Calculator();
          calculator.start();
          new Reader(calculator).start();
          new Reader(calculator).start();
          new Reader(calculator).start();
    class Calculator extends Thread
       int total;
       public void run()
          synchronized(this)
             for(int i=0; i<100; i++)
                total += 1;
             notifyAll();
    }When running it:
    D:\Test>java Reader
    Waiting for calculation...
    Waiting for calculation...
    Waiting for calculation...
    --> it never returns......

    that was good....and fast....
    I modified the code to be:
    class Reader extends Thread
       Calculator c;
       public Reader(Calculator calc)
          c = calc;
       public void run()
          synchronized(c)
             try
                System.out.println("Waiting for calculation...");
                c.wait();
                System.out.println("I am just after the wait()");
             catch(InterruptedException e) {}
             System.out.println("Total is: " + c.total);
       public static void main(String[] args)
          Calculator calculator = new Calculator();
          calculator.start();
          new Reader(calculator).start();
          new Reader(calculator).start();
          new Reader(calculator).start();
    class Calculator extends Thread
       int total;
       public void run()
          synchronized(this)
             try
                for(int i=0; i<100; i++)
                   total += 1;
                   Thread.sleep(50);
                notifyAll();
             catch(InterruptedException e)
                e.printStackTrace();
    }and it worked just fine....thanks much

  • Adobe 10 ReaderX debugger.js not working & security Issues

    Hi,
    I am trying to get this javascript http://johnford.is/downloads/pdf_bookmark.js working.  It enables a bookmark in Adobce Reader and apparently quit working in version 10 under windows 7.  I copied the code here C:\Users\Owner\AppData\Roaming\Adobe\Acrobat\10.0\JavaScripts.  But when I copy the debugger.js which ships with Adobe it does not work eiter complaining about syntax: 
    ReferenceError: getString is not defined
    25:Folder-Level:User:debugger.js
    My more important question is not how to get the debugger working but how to get the code working to create the bookmark.  I tried to change all the enhanced security and options in the javascript preferences screen.  I think something else is required not to get this code work because of security in Adobe 10.  If you look at comments the developer left in the code they had to add code to get it working because of security in Adobe 8:
    * Extra security in Adobe Reader 8 forces access of global variables
    * by multiple documents to be setup as a 'trustedFunction'
    getPDFBookmark = app.trustedFunction ( function() {
    app.beginPriv();
        return global.pdf_bookmark;
        app.endPriv();
    Bottom line is the new bookmark feature in Adobe 10 is cumbersome and not intuitive and I want to use what this other developer wrote.  A bookmark should be 1-click and as natural as placing a bookmark in a book.  Duh!  No one at Adobe understands that. 
    chau from Chile.
    Walker Rowe

    Change
    // Add bookmark menu
    app.addSubMenu({
        cName: translation.bookmark,
        cParent: "Tools",
        cExec: "void(0);",
        cEnable: "event.rc = (event.target != null);"
    to
    // Add bookmark menu
    app.addSubMenu({
        cName: translation.bookmark,
        cParent: "File",
        cExec: "void(0);",
        cEnable: "event.rc = (event.target != null);"

Maybe you are looking for

  • How do I get my new 3GS iphone operating system to load?

    My operating system won't reload after numerous attempts at restarting and removing sim card.

  • Get the number of rows returned by a dataProvider

    hi I am using a [Bindable] variable that I am setting and using as a DataProvider (coming from a web service) for a DataGrid within my Flex 2 application. is there a way of knowing the amount of rows that the dataProvider is returning??? as I want to

  • Failover Hyper V

    Hi all, I have a lab like this: - 1 physical hyper v 2012 r2 - installed 2 sofs ( win2k12 2r) in cluster - installed 2 hyper v (win2k12 2r)  in cluster - installed 1 dc and added all servers to it - installed sccm vmm on the dc ( remember, just for l

  • How to use the new Jade plug in

    How do I open the Jade plug in. I downloaded the demo version, and unable to find a way to open it. Installation was successful. Thanks in advance.

  • Think I broke Windows MBR.

    Before I start, I'm on a iMac 27' late 2013. After trying to fix a 'non-genuine' Windows message, I cannot boot into Windows 7 anymore. From what I have researched so far, they said that the 'fix' messed up the MBR, and that I needed to run the bootr