I was programming a Clojure applet when I had similar problems with 
java.lang.ExceptionInInitializerError. But my experience with Java told me 
to delete the old class files generated by my project. And it worked. 
Always delete the old class files in every compilation and the problem 
disappears.

On Tuesday, December 2, 2008 1:56:47 PM UTC-5, Rich Hickey wrote:
>
>
>
> On Dec 2, 12:12 pm, Chouser <chou...@gmail.com> wrote: 
> > On Tue, Dec 2, 2008 at 10:24 AM, Rich Hickey <richhic...@gmail.com> 
> wrote: 
> > 
> > >  Proxy generation was the last runtime code-gen/classloader 
> > > requirement. So the path is clear for building Clojure apps without 
> > > runtime codegen, for delivery in those environments that preclude it 
> > > (e.g. Android, unsigned applets). Looking forward to feedback from 
> > > people trying to reach those targets. 
> > 
> > You asked for it.  :-) 
> > 
> > Here's a minimal applet .clj: 
> > 
> > (ns net.n01se.Tree 
> >   (:gen-class 
> >    :extends java.applet.Applet)) 
> > 
> > Since it's missing a main fn, I would expect an exception like the this: 
> > java.lang.UnsupportedOperationException: net.n01se.Tree/-main not 
> > defined (NO_SOURCE_FILE:0) 
>
> When and why? 
>
> The mappings are dynamic, you'll get an error if you try to call it, 
> and you could define that later somehow. 
>
> > 
> > Using svn 1136 I can compile and get the above exception from a normal 
> > Clojure REPL, but if I try to use it as an applet: 
> > 
> > $ appletviewer test.html 
> > java.lang.ExceptionInInitializerError 
> >         at clojure.lang.Namespace.<init>(Namespace.java:31) 
> >         at clojure.lang.Namespace.findOrCreate(Namespace.java:116) 
> >         at clojure.lang.Var.internPrivate(Var.java:95) 
> >         at net.n01se.Tree.<clinit>(Unknown Source) 
> >         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
> Method) 
> >         at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>  
>
> >         at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>  
>
> >         at 
> java.lang.reflect.Constructor.newInstance(Constructor.java:532) 
> >         at java.lang.Class.newInstance0(Class.java:372) 
> >         at java.lang.Class.newInstance(Class.java:325) 
> >         at sun.applet.AppletPanel.createApplet(AppletPanel.java:798) 
> >         at sun.applet.AppletPanel.runLoader(AppletPanel.java:727) 
> >         at sun.applet.AppletPanel.run(AppletPanel.java:380) 
> >         at java.lang.Thread.run(Thread.java:636) 
> > Caused by: java.security.AccessControlException: access denied 
> > (java.lang.RuntimePermission createClassLoader) 
>
> > You can see it found my class okay, but it looks like there may be 
> > some dynamic classloader stuff still going on? 
> > 
>
> Thanks, that's useful. 
>
> Yes, the dynamic loader is still there, just won't be used, but it 
> looks like the security check is on creation. Getting it completely 
> out is another project... 
>
> Rich 
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to