[Building Sakai] Running Java Applet from Resources

Sam Ottenhoff ottenhoff at longsight.com
Tue Nov 27 12:20:43 PST 2012


Your Java applet attempts to fetch resources from Sakai but does not have
access to the Sakai cookie marked as HttpOnly so Sakai treats the requests
as unauthenticated.

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6890023

6890023 : Network: Cookies marked HttpOnly not included in URLConnection
requests


On Tue, Nov 27, 2012 at 3:18 PM, Mark J. Norton
<markjnorton at earthlink.net>wrote:

>  Generally, Java applets are embedded in an HTML page.  There is nothing
> to prevent the creation of a web page in the Resources tool that contains
> an <embed> tag (or similar).  Depending on how Sakai is configured, the
> page will either download or be launched in it's own window/tab.
>
> Applets have their own security mechanism.  Generally, they are not
> allowed to access the local file system.
>
> The big questions is, what do you want to do with the Applet?  Accessing
> Sakai functionality can be done via web services or the Entity Broker, just
> like any other remote application, but there are limits to what can be done
> this way.  What you can't do from an Applet is access Sakai Kernel
> functionality directly.  That said, simple simulations, etc. should work.
>
> - Mark Norton
>
>
>
> On 11/27/2012 3:10 PM, Neal Caidin wrote:
>
> Hi Kelly,
>
>  Did you ever get a response to your inquiry?
>
>  I would not think Sakai would be set up to allow Java applets to run
> from the Resources area, that seems like it would be a potential security
> issue to me. But I'm not the expert.
>
>  Cheers,
>
>  Neal Caidin
>
>  Sakai CLE Community Coordinator
> nealcaidin at sakaifoundation.org
> Skype: nealkdin
> AIM: ncaidin at aol.com
>
>
>
>
>
>  On Oct 17, 2012, at 5:53 PM, "Geng, Kelly" <gengx at miamioh.edu> wrote:
>
>   Hi Dev list,****
>
> We had a faculty trying to run an Java Applet script from her Resources in
> Sakai. All the dependent class files are under the same directory as the
> launching html file. She got an “Incompatible magic value” error upon
> launching. Looking at the log it seems like everything went well up until
> the application started to connect our CAS server. I copied the log below(I
> red-highlighted our CAS server URL) and am wondering whether anyone has
> seen this before and know how to work around it. She claimed that the same
> script was running last semester (when we didn’t have CAS and was on 2.7.x
> instead of current 2.8.x version of sakai).****
>
> Thanks,****
> Kelly****
> Miami University****
>
>
> network: Connecting
> https://niihka.muohio.edu/access/content/group/ffbe4f38-c9a5-46cd-9acb-b7d4a712f078/Modules/Module%20-%20Low%20level%20programming/simulation/NEWCPUSim.classwith
> proxy=DIRECT****
> network: Connecting http://niihka.muohio.edu:443/ with proxy=DIRECT****
> …****
> security: Loading certificates from Deployment session certificate store**
> **
> security: Loaded certificates from Deployment session certificate store***
> *
> security: Checking if certificate is in Deployment denied certificate store
> ****
> network: Connecting
> https://niihka.muohio.edu/access/content/group/ffbe4f38-c9a5-46cd-9acb-b7d4a712f078/Modules/Module%20-%20Low%20level%20programming/simulation/NEWCPUSim.classwith
> cookie "__utma=40004414.470991547.1342969029.1348793119.1348840212.4;
> __utmz=40004414.1342969029.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none);
> SaneID=134.53.7.196-1348498927383600;
> GB2TOKEN=9acaf8db--a9a9-eaff730025a9-43122cb01247e7684dd5c644872ba5bd;
> SESSID=OVZCMTIyNTkxOA=="****
> network: Server
> https://niihka.muohio.edu/access/content/group/ffbe4f38-c9a5-46cd-9acb-b7d4a712f078/Modules/Module%20-%20Low%20level%20programming/simulation/NEWCPUSim.classrequesting
> to set-cookie with "JSESSIONID=eade0697-c823-454b-9c6a-bc93a97e.Niihka-03;
> Path=/; Secure; HttpOnly"****
> network: Cache entry not found [url:
> https://niihka.muohio.edu/sakai-login-tool/container, version: null]****
> network: Connecting https://niihka.muohio.edu/sakai-login-tool/container with
> proxy=DIRECT****
> network: Connecting http://niihka.muohio.edu:443/ with proxy=DIRECT****
> security: Loading certificates from Deployment session certificate store**
> **
> security: Loaded certificates from Deployment session certificate store***
> *
> security: Checking if certificate is in Deployment denied certificate store
> ****
> network: Connecting https://niihka.muohio.edu/sakai-login-tool/container with
> cookie "__utma=40004414.470991547.1342969029.1348793119.1348840212.4;
> __utmz=40004414.1342969029.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none);
> SaneID=134.53.7.196-1348497383600;
> GB2TOKEN=9acaf8db-4b95-a9a9-eaff730025a9-43122cb01247e7c644872ba5bd;
> SESSID=OVZCUVZDMTIyxOA=="****
> network: Server https://niihka.muohio.edu/sakai-login-tool/container requesting
> to set-cookie with "JSESSIONID=55883783-c7fa-4cb0.Niihka-03; Path=/;
> Secure; HttpOnly"****
> network: Cache entry not found [url:
> https://muidp.muohio.edu/cas/login?service=https%3A%2F%2Fniihka.muohio.edu%2Fsakai-login-tool%2Fcontainer,
> version: null]****
> network: Connecting https://muidp.muohio.edu/cas/login?service<https://muidp.muohio.edu/cas/login?service=https%3A%2F%2Fniihka.muohio.edu%2Fsakai-login-tool%2Fcontainer>
> =https%3A%2F%2Fniihka.muohio.edu%2Fsakai-login-tool%2Fcontainer<https://muidp.muohio.edu/cas/login?service=https%3A%2F%2Fniihka.muohio.edu%2Fsakai-login-tool%2Fcontainer>
>  with proxy=DIRECT****
> network: Connecting http://muidp.muohio.edu:443/ with proxy=DIRECT****
> security: Loading certificates from Deployment session certificate store**
> **
> security: Loaded certificates from Deployment session certificate store***
> *
> security: Checking if certificate is in Deployment denied certificate store
> ****
> network: Connecting
> https://muidp.muohio.edu/cas/login?service=https%3A%2F%2Fniihka.muohio.edu%2Fsakai-login-tool%2Fcontainer
>  with cookie "JSESSIONID=1ABB2411E999F13B9A1C0E8;
> __utma=40004414.470991547.1342969029.1348793119.1348840212.4;
> __utmz=40004414.1342969029.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none);
> SaneID=134.53.7.196-1348498927383600; SESSID=OVZCUVZDMTkxOA=="****
> network: Server
> https://muidp.muohio.edu/cas/login?service=https%3A%2F%2Fniihka.muohio.edu%2Fsakai-login-tool%2Fcontainer
>  requesting to set-cookie with "JSESSIONID=6C4881D27BF080572CFE3;
> Path=/cas; Secure"****
> network: Cache entry not found [url:
> https://niihka.muohio.edu/access/content/group/ffbe4f38-c9a5-46cd-9acb-b7d4a712f078/Modules/Module%20-%20Low%20level%20programming/simulation/,
> version: null]****
> basic: error: Incompatible magic value 168430090 in class file NEWCPUSim.*
> ***
> java.lang.ClassFormatError: Incompatible magic value 168430090 in class
> file NEWCPUSim****
>                 at java.lang.ClassLoader.defineClass1(Native Method)****
>                 at java.lang.ClassLoader.defineClass(Unknown Source)****
>                 at java.security.SecureClassLoader.defineClass(Unknown
> Source)****
>                 at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown
> Source)****
>                 at
> sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)****
>                 at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown
> Source)****
>                 at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown
> Source)****
>                 at java.lang.ClassLoader.loadClass(Unknown Source)****
>                 at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown
> Source)****
>                 at
> sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)****
>                 at
> sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown
> Source)****
>                 at java.lang.Thread.run(Unknown Source)****
> Ignored exception: java.lang.ClassFormatError: Incompatible magic value
> 168430090 in class file NEWCPUSim****
> basic: Dialog type is not candidate for embedding****
> basic: Removed progress listener:
> sun.plugin.util.ProgressMonitorAdapter at 130fa6f****
> security: Reset deny session certificate store****
> basic: Dialog type is not candidate for embedding****
>  _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to
> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
> "unsubscribe"
>
>
>
>
> _______________________________________________
> sakai-dev mailing listsakai-dev at collab.sakaiproject.orghttp://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>
>
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to
> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
> "unsubscribe"
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20121127/cf492759/attachment.html 


More information about the sakai-dev mailing list