0

I am pulling my hair out trying to resolve the following error:

Exception in thread "main" java.io.FileNotFoundException: Could not locate composer/midi/short_message__init.class or composer/midi/short_message.clj on classpath: , compiling:(events.clj:12:1)

The reference to short-message is in the namespace declaration of events.clj:

(ns composer.ui.events
  (:use [seesaw core border chooser])
  (:require [composer.midi
             [io :as io]
             [time :as time]
             [player :as player]
             [short-message :as short]]))

And here is the namespace declaration of short-message itself in short-message.clj:

(ns composer.midi.short-message
  (:require [composer.algorithm.transform :refer :all]
            [composer.algorithm.markov.transform :refer :all]
            [composer.midi [io :refer :all] [message :as message]]))

short-message is in the same directory as all other files in composer.midi, and yet this seems to be the only one that is resulting in an issue. Indeed, after verifying the target directory in my project, this is the only namespace which doesn't seem to contain a corresponding class file. I thought it could be an error with the code, but if I try to load the file with (load-file "src/composer/midi/short-message.clj") at the REPL I don't have any issues.

1
  • Hrm. It appears that short-message.clj is not a valid filename. Changing it to short_message appears to have done the trick... very strange. Commented Apr 12, 2014 at 23:08

1 Answer 1

1

Your comment is right. In clojure dashes in namespaces correspond to underscore in filenames. So your file name should be short_message.clj as you found.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.