• Version 1.14 - Domino 9.0.1 FP5

    By Daniel JANS 3 years ago

    I have 2 problems.

    1. On the server side : I have installed the plugin properly throug an update site. OSGI is picking it. I have installed websocket.nsf and chat.nsf ( having signed it too ). Once I tried to acces the page ( chat.xsp ), I have the message “HTTP Web Server: You are forbidden to perform this operation”. I checked to error-log-0.xml and found this :

    Caused by: java.security.AccessControlException: Access denied (org.osgi.framework.AdminPermission (id=24) metadata)
	at java.security.AccessController.throwACE(AccessController.java:121)
	at java.security.AccessController.checkPermission(AccessController.java:194)
	at java.lang.SecurityManager.checkPermission(SecurityManager.java:544)


    As I guess that this is my problem, I have checked the java.policy file. I have never changed it at all. The documentation mention that we should change the java.policy but without any more details. Could you let me know that it should be ?


    2. On the designer, I have installed the plugin as usual. But the code is not compiling :


    Unable to build XPages as the following library: com.tc.websocket.library, is not installed xsp.properties Chat.nsf/WebContent/WEB-INF XSP.Properties Application Properties Error


    As soon as I erase the faulty info in xsp.properties, it is ok. But then I am not sure that this is the right way to do it, especially since I have installed it properly ( I can see it in the workspace ).

    P: I have tried to erase the workspace, tried with another version ( 1.13fix ). Same thing.

    Otherwise, thanks a lot. It seems very promising and I hope that you have shown the way to IBM

    • By Mark Ambler 3 years ago

      Inside first set of curly braces replace all the permissions with all permissions statement:

      permission java.security.AllPermission

      • By Daniel JANS 3 years ago

        Hello Mark, thanks a lot. Unfortunately, this is that I got already :

        // Standard extensions get all permissions by default


        grant codeBase “file:${java.home}/lib/ext/*” {
        permission java.security.AllPermission;
        };

        Any other hint ?

        • By Mark Ambler 3 years ago

          Hi Daniel,
          Make sure your notes.ini is set to the following:

          XPagesPreload=1
          XPagesPreloadDB=websocket.nsf

          • By Daniel JANS 3 years ago

            Hello Mark,

            I followed all the instructions of installation and yes this is in my notes.ini

            WEBSOCKET

            XPagesPreload=1
            XPagesPreloadDB=websocket.nsf
            WEBSOCKET_DEBUG=true

            END WEBSOCKET

            • By Daniel JANS 3 years ago

              The full error message :

              more
Caused by: java.security.AccessControlException: Access denied (org.osgi.framework.AdminPermission (id=26) metadata)
	at java.security.AccessController.throwACE(AccessController.java:121)
	at java.security.AccessController.checkPermission(AccessController.java:194)
	at java.lang.SecurityManager.checkPermission(SecurityManager.java:544)
	at org.eclipse.osgi.framework.internal.core.Framework.checkAdminPermission(Framework.java:1299)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.getHeaders(AbstractBundle.java:1024)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.getHeaders(AbstractBundle.java:982)
	at com.tc.di.guicer.Guicer.getVersion(Guicer.java:94)
	at com.tc.di.guicer.Guicer.buildPluginId(Guicer.java:88)
	at com.tc.di.guicer.Guicer.getInstance(Guicer.java:99)
	at com.tc.websocket.jsf.GuiceVariableResolver.resolveVariable(GuiceVariableResolver

              • By Daniel JANS 3 years ago

                Got it working !!!

                I had to add the “permission java.security.AllPermission; " inside the second bracket to grant any code to access it ! Here it is .. In bold and underlined , that i added .. Now the fun … Thanks a lot !!!!

                // Standard extensions get all permissions by default


                grant codeBase “file:${java.home}/lib/ext/*” {
                permission java.security.AllPermission;
                };


                // default permissions granted to all domains


                grant {

                permission java.lang.RuntimePermission “stopThread”;
                permission java.security.AllPermission;


                // allows anyone to listen on dynamic ports
                permission java.net.SocketPermission “localhost:0”, “listen”;

                • By Mark Ambler 3 years ago

                  Glad you got it working. I'll update the websocket-setup.pdf to be more specific on what to change the java.policy file (show a working sample file from my local dev).