Problems with AOT compiled Clojure on Azul

24 views
Skip to first unread message

Krukow

unread,
Aug 14, 2009, 1:04:06 AM8/14/09
to Clojure
When running the AOT compiled Clojure (clojure.jar) on an Azul box I
get an error during startup (in particular in the class-initializer
for clojure.main). This error does not occur in the clojure-slim.jar.
The stacktrace is this:

kkr@azulpod1:~/download$ java $JVM_PARAMS -cp clojure.jar clojure.main
RTPM: Listening for HTTP connections on 0.0.0.0:52798.
Exception in thread "main" java.lang.ExceptionInInitializerError
at clojure.lang.Namespace.<init>(Namespace.java:32)
at clojure.lang.Namespace.findOrCreate(Namespace.java:117)
at clojure.main.<clinit>(main.java:21)
Caused by: java.lang.RuntimeException:
java.lang.IllegalStateException: Var clojure.core/refer is unbound.
at clojure.lang.RT.<clinit>(RT.java:291)
... 3 more
Caused by: java.lang.IllegalStateException: Var clojure.core/refer
is
unbound.
at clojure.lang.Var.deref(Var.java:140)
at clojure.lang.Var.fn(Var.java:323)
at clojure.lang.Var.invoke(Var.java:346)
at clojure.lang.RT.doInit(RT.java:417)
at clojure.lang.RT.<clinit>(RT.java:288)
... 3 more
kkr@azulpod1:~/download$ echo $JVM_PARAMS
-PX:PolicyVhost=192.168.102.200 -PX:CPMDomain=podv2demo -
PX:AppLabel=v3 -PX:RTPMPort=any -PX:RTPMAuthorization=9@
kkr@azulpod1:~/download$

This error does not occur on my 2-core macbook; I've only seen it on
the 216-core Azul box.

Anyone?

/Karl

Christophe Grand

unread,
Aug 14, 2009, 3:20:27 AM8/14/09
to clo...@googlegroups.com
Hi Karl,

It sounds like a classloader problem.
Are you using clojure 1.0 or a recent build? If one, can you try with the other?

Christophe
--
Professional: http://cgrand.net/ (fr)
On Clojure: http://clj-me.blogspot.com/ (en)

Krukow

unread,
Aug 14, 2009, 7:02:01 AM8/14/09
to Clojure


On Aug 14, 9:20 am, Christophe Grand <christo...@cgrand.net> wrote:
> Hi Karl,
>
> It sounds like a classloader problem.
> Are you using clojure 1.0 or a recent build? If one, can you try with the
> other?

I've tried it with 1.0 and with the 1-1-0-alpha-snapshot (latest from
github). Same error... :-(

J. McConnell

unread,
Aug 14, 2009, 12:32:13 PM8/14/09
to clo...@googlegroups.com
On Fri, Aug 14, 2009 at 1:04 AM, Krukow <karl....@gmail.com> wrote:

When running the AOT compiled Clojure (clojure.jar) on an Azul box I
get an error during startup (in particular in the class-initializer
for clojure.main). This error does not occur in the clojure-slim.jar.
The stacktrace is this:

kkr@azulpod1:~/download$ java $JVM_PARAMS -cp clojure.jar clojure.main
RTPM: Listening for HTTP connections on 0.0.0.0:52798.
Exception in thread "main" java.lang.ExceptionInInitializerError
      at clojure.lang.Namespace.<init>(Namespace.java:32)
      at clojure.lang.Namespace.findOrCreate(Namespace.java:117)
      at clojure.main.<clinit>(main.java:21)
Caused by: java.lang.RuntimeException:
java.lang.IllegalStateException: Var clojure.core/refer is unbound.

I ran into this exception recently. In my case the problem was that the classloader returned by (.getContextClassLoader (Thread/currentThread)) while a gen-classed object was being instantiated was different than the one returned when a method on the object was executed. Is there something about the Azul environment that could cause the classloader to be changed after Clojure has gone through its static initialization but before executing clojure.main?

- J.

Krukow

unread,
Aug 15, 2009, 9:41:39 AM8/15/09
to Clojure


On Aug 14, 6:32 pm, "J. McConnell" <jdo...@gmail.com> wrote:
> I ran into this exception recently. In my case the problem was that the
> classloader returned by (.getContextClassLoader (Thread/currentThread))
> while a gen-classed object was being instantiated was different than the one
> returned when a method on the object was executed. Is there something about
> the Azul environment that could cause the classloader to be changed after
> Clojure has gone through its static initialization but before executing
> clojure.main?

Yes, that's certainly possble. I don't know the details of how the
Azul VM executes. Perhaps Cliff can help here, if he is following?

For now I am just running the "slim" version of Clojure.

Thanks,
/Karl
Reply all
Reply to author
Forward
0 new messages