Lost newbie - "ClassNotFoundException: org.lwjgl.opengl.GL11"

128 views
Skip to first unread message

Mr Speaker

unread,
Dec 19, 2010, 7:43:51 AM12/19/10
to Penumbra
I've been trying to follow the install instructions at
https://github.com/ztellman/penumbra/wiki/getting-started and am
stuck... I'm using Leiningen, so I think I just need to follow the
"Using Leiningen" steps, and not the "Using a run script" or
"Alternate approaches" steps.

Lein deps, lein native-deps, and lein repl all work find, but anything
I run that uses Penumbra throws an exception:
java.lang.ClassNotFoundException: org.lwjgl.opengl.GL11.

I was looking at the "run scripts" instructions and that involves
putting a bunch of stuff on the java class path - but I'm not sure
where it comes from:

/.../penumbra/src:\ <--- the src from github repo
/.../penumbra/test:\ <--- the test dir from github repo
/.../penumbra/lib/* \ <--- the lib dir from github repo?
-Djava.library.path=/.../penumbra/native/x86/osx \ <--- don't know -
there is ~/.m2/penumbra/lwjgl/2.4.2/native/macosx/x86_64 - is it this
one?

If I am using Leiningen do I need to include anything else? Have I
missed a really important step like, go install some opengl library?!

Thanks!

Earle.

Zach Tellman

unread,
Dec 19, 2010, 2:04:49 PM12/19/10
to penumb...@googlegroups.com
Running 'lein native-deps' should create a /native directory in your
project. Your email seems to imply no such directory exists, so just
try running native-deps again. If it still doesn't work, please
respond with what version of leiningen you're using; there may be a
version incompatibility between the native-deps plugin and the latest
version of lein.

Zach

Mr Speaker

unread,
Dec 20, 2010, 7:08:48 AM12/20/10
to Penumbra
Oh, yeah - you're right... when I run lein native-deps I get:

Expanding: /Users/mrspeaker/.m2/repository/penumbra/lwjgl/2.4.2/
lwjgl-2.4.2.jar into

Into nowhere! No directory is created in the project. I was using
"Leiningen 1.4.1-SNAPSHOT" then re-pulled to "Leiningen 1.4.1" but I
get the same result. I don't know if it's an issue with my setup, or a
problem with native-deps with Leiningen - I go looking over there...
thanks for the tip!

Earle.

On Dec 19, 8:04 pm, Zach Tellman <ztell...@gmail.com> wrote:
> Running 'lein native-deps' should create a /native directory in your
> project.  Your email seems to imply no such directory exists, so just
> try running native-deps again. If it still doesn't work, please
> respond with what version of leiningen you're using; there may be a
> version incompatibility between the native-deps plugin and the latest
> version of lein.
>
> Zach
>
>
>
>
>
>
>
> On Sun, Dec 19, 2010 at 4:43 AM, Mr Speaker <mrspea...@gmail.com> wrote:
> > I've been trying to follow the install instructions at
> >https://github.com/ztellman/penumbra/wiki/getting-startedand am

David Nolen

unread,
Dec 20, 2010, 11:28:54 AM12/20/10
to penumb...@googlegroups.com
On Mon, Dec 20, 2010 at 7:08 AM, Mr Speaker <mrsp...@gmail.com> wrote:
Oh, yeah - you're right... when I run lein native-deps I get:

Expanding: /Users/mrspeaker/.m2/repository/penumbra/lwjgl/2.4.2/
lwjgl-2.4.2.jar into

Into nowhere! No directory is created in the project. I was using
"Leiningen 1.4.1-SNAPSHOT" then re-pulled to "Leiningen 1.4.1" but I
get the same result. I don't know if it's an issue with my setup, or a
problem with native-deps with Leiningen - I go looking over there...
thanks for the tip!

Earle.

Yeah, native-deps sadly depends on Lein internals and things tend to break when Lein updates. I'll try to fix it this week. In the meantime, native-deps 1.0.4 is compatible with Lein 1.3.X

David 

Mr Speaker

unread,
Dec 28, 2010, 6:54:53 AM12/28/10
to Penumbra

> Yeah, native-deps sadly depends on Lein internals and things tend to break
> when Lein updates. I'll try to fix it this week. In the meantime,
> native-deps 1.0.4 is compatible with Lein 1.3.X

Thanks for updating! But I have issues (throws exceptions) when
running code: do I need to do anything extra to get the lwjgl library
on the java library path when using Leinengen?

I'm using Penumbra 0.6.0, and native-deps 1.0.5. If I start a clean
project with lein 1.4.1 and run the tests or repl it's fine. But if I
update my project.clj file to have the dependencies:

:dependencies [[org.clojure/clojure "1.2.0"]
[org.clojure/clojure-contrib "1.2.0"]
[penumbra "0.6.0-SNAPSHOT"]]
:native-dependencies [[penumbra/lwjgl "2.4.2"]]
:dev-dependencies [[native-deps "1.0.5"]]

"lein deps" looks good, and "lein native-deps" looks good too now
(thanks to your update!) but if I run "lein repl" I get:

Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at jline.ConsoleRunner.main(ConsoleRunner.java:69)
Caused by: java.lang.Exception: Couldn't connect (NO_SOURCE_FILE:0)
at clojure.lang.Compiler.eval(Compiler.java:5440)
at clojure.lang.Compiler.eval(Compiler.java:5391)
at clojure.core$eval.invoke(core.clj:2382)
etc...

And if I run "lein test" I get:

Exception in thread "main" java.lang.ClassCastException: java.io.File
cannot be cast to clojure.lang.Named (NO_SOURCE_FILE:0)
at clojure.lang.Compiler.eval(Compiler.java:5440)
at clojure.lang.Compiler.eval(Compiler.java:5391)
at clojure.core$eval.invoke(core.clj:2382)
etc...

Because the errors are different, I'm guessing it's something wrong
with my set up - but I don't know what!

Earle.

tbc++

unread,
Feb 21, 2011, 11:44:03 AM2/21/11
to Penumbra
Any updates on this? I'm having a terrible time trying to get penumbra
working. In addition my version of lein says that "lein native-deps"
is not a valid task.

Timothy

David Nolen

unread,
Feb 21, 2011, 1:35:08 PM2/21/11
to penumb...@googlegroups.com
To clarify a little you need to include native-deps as a dev-dependency, for example my Penumbra projects look something like this:

(defproject clj-nehe "0.1.0-SNAPSHOT"
  :description "The Nehe tutorials ported to Penumbra"
  :dependencies [[org.clojure/clojure "1.2.0"]
                 [org.clojure/clojure-contrib "1.2.0"]
                 [penumbra "0.6.0"]]
  :native-dependencies [[penumbra/lwjgl "2.4.2"]]
  :dev-dependencies [[native-deps "1.0.5"]
                     [swank-clojure "1.3.0-SNAPSHOT"]])

On Mon, Feb 21, 2011 at 12:25 PM, Zach Tellman <ztel...@gmail.com> wrote:
'lein native-deps' isn't built into Leiningen, it's something that you
have to declare as a dependency, run 'lein deps' to fetch, and then
run.  If you don't run 'lein native-deps', you'll get the exception
mentioned in the subject heading.

Zach

Zach Tellman

unread,
Feb 21, 2011, 1:25:54 PM2/21/11
to penumb...@googlegroups.com
'lein native-deps' isn't built into Leiningen, it's something that you
have to declare as a dependency, run 'lein deps' to fetch, and then
run. If you don't run 'lein native-deps', you'll get the exception
mentioned in the subject heading.

Zach

On Mon, Feb 21, 2011 at 8:44 AM, tbc++ <tbald...@gmail.com> wrote:

Timothy Baldridge

unread,
Feb 21, 2011, 1:52:02 PM2/21/11
to penumb...@googlegroups.com
Seeing that I am currently sitting in my cube at work, I will resist
the urge to stand up and start dancing. It works! I thank you much!

I used the example David gave, I had to switch penumbra "0.6.0" to
"0.6.0-SNAPSHOT" but from there it seemed to work fine, and the
"text.clj" file worked like a dream. Thanks!

Timothy

--
“One of the main causes of the fall of the Roman Empire was
that–lacking zero–they had no way to indicate successful termination
of their C programs.”
(Robert Firth)

Timothy Baldridge

unread,
Feb 21, 2011, 2:17:22 PM2/21/11
to penumb...@googlegroups.com
Actually, going back and reading over your docs, it seems much clearer
now. I think my issue came from the fact that I'm a total newb when it
comes to clojure (and java for that matter).

When I decided to start playing with Clojure, I bought two books on
the language and decided to start hacking. I went to google and looked
up "opengl clojure" and found penumbra.

The documentation states something about Leiningen being the
recommended method. Not knowing what the heck that is, I googled
"Leiningen". First I had a problem getting lein setup on my machine
(it's a win7 machine with roaming profiles. Those mucked up things a
bit), but after some time I got lein working. Somehow in all the
troubleshooting processes, I got confused and never went back to read
the penumbra docs.

So I think your documents are fine, I think I'll just write up a quick
tutorial on how to get penumbra up and running for a person who hasn't
touched clojure before.

Timothy

On Mon, Feb 21, 2011 at 1:00 PM, Zach Tellman <ztel...@gmail.com> wrote:
> So for future reference, how can I improve the instructions at
> https://github.com/ztellman/penumbra/wiki/Getting-Started to make it
> easier to get everything working?  Or is it just a matter of making
> them easier to find?
>
> Zach

Zach Tellman

unread,
Feb 21, 2011, 2:00:19 PM2/21/11
to penumb...@googlegroups.com
So for future reference, how can I improve the instructions at
https://github.com/ztellman/penumbra/wiki/Getting-Started to make it
easier to get everything working? Or is it just a matter of making
them easier to find?

Zach

eor

unread,
Feb 27, 2011, 2:22:54 AM2/27/11
to Penumbra
it's worth mentioning that one can set the java.library.path via
leiningen (project.clj).

(defproject penumbra "0.6.0-SNAPSHOT"
;; usual stuff

:jvm-opts ["-Djava.library.path=/me/my/penumbra/native/macosx/
x86_64/"]
)










On Feb 21, 2:00 pm, Zach Tellman <ztell...@gmail.com> wrote:
> So for future reference, how can I improve the instructions athttps://github.com/ztellman/penumbra/wiki/Getting-Startedto make it
> easier to get everything working?  Or is it just a matter of making
> them easier to find?
>
> Zach
>
> On Mon, Feb 21, 2011 at 10:52 AM, Timothy Baldridge
>
>
>
>
>
>
>
> <tbaldri...@gmail.com> wrote:
> > Seeing that I am currently sitting in my cube at work, I will resist
> > the urge to stand up and start dancing. It works! I thank you much!
>
> > I used the example David gave, I had to switch penumbra "0.6.0" to
> > "0.6.0-SNAPSHOT" but from there it seemed to work fine, and the
> > "text.clj" file worked like a dream. Thanks!
>
> > Timothy
>
> > On Mon, Feb 21, 2011 at 12:35 PM, David Nolen <dnolen.li...@gmail.com> wrote:
> >> To clarify a little you need to include native-deps as a dev-dependency, for
> >> example my Penumbra projects look something like this:
> >> (defproject clj-nehe "0.1.0-SNAPSHOT"
> >>   :description "The Nehe tutorials ported to Penumbra"
> >>   :dependencies [[org.clojure/clojure "1.2.0"]
> >>                  [org.clojure/clojure-contrib "1.2.0"]
> >>                  [penumbra "0.6.0"]]
> >>   :native-dependencies [[penumbra/lwjgl "2.4.2"]]
> >>   :dev-dependencies [[native-deps "1.0.5"]
> >>                      [swank-clojure "1.3.0-SNAPSHOT"]])
> >> On Mon, Feb 21, 2011 at 12:25 PM, Zach Tellman <ztell...@gmail.com> wrote:
>
> >>> 'lein native-deps' isn't built into Leiningen, it's something that you
> >>> have to declare as a dependency, run 'lein deps' to fetch, and then
> >>> run.  If you don't run 'lein native-deps', you'll get the exception
> >>> mentioned in the subject heading.
>
> >>> Zach
>
Reply all
Reply to author
Forward
0 new messages