Hello,

I don't know this library specifically, but the NPE is probably occurring in
a static initialisation block. I believe static initialisation occurs when
the class is first loaded.

Regards,
Stuart

On 30 August 2010 06:42, zm <zygiman...@medelis.lt> wrote:

>
> I am using GATE java libs in my clojure code and behaviour of the
> application changes after Java class import. I don't even have to
> initialize it.
>
> This runs fine (a bit shorter version than it is):
>
>  (ns gate
>  (:import
>     (gate Gate)
>     (java.io File)))
>
> (defn gate-init
>  [gate-home]
>  (Gate/setGateHome (File. gate-home))
>  (Gate/init)))
>
> Now if I import gate.Factory class, like this (gate Gate Factory), I
> get the exception:
>
> Caused by: java.lang.NullPointerException
>        at gate.Factory.createResource(Factory.java:154)
>
> How can import of a class cause this?
>
> --
> 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<clojure%2bunsubscr...@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 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

Reply via email to