Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4611460
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:16:15+00:00 2026-05-22T01:16:15+00:00

This is the recipe for the exception I’m getting (EDIT: ProtoImpl is defined in

  • 0

This is the recipe for the exception I’m getting (EDIT: ProtoImpl is defined in another ns, I’ll leave it out to ease the description):

myns.clj

(ns myns)

(defprotocol Proto
  (func [this]))

(extend-protocol Proto
  ProtoImpl
  (func [this] (do-something ...)))

interop.clj

(ns interop
  (:require [myns :as m]))

(defn startup
  []
  (m/func (ProtoImpl.)))

(gen-class :name interop.Interop
           :prefix "interop-"
           :methods [[boot [] void]])

(defn interop-boot
  [this]
  (startup)))

Both myns.clj and interop.clj are shipped within a webapp, the latter being also AOT compiled thus produging Interop.class available in the classpath right away. This is instantiated as a Spring bean.

When the webapp starts, it fails to bootstrap with the following exception:

[...]
    at myns__init.load(Unknown Source)
    at myns__init.<clinit>(Unknown Source)
[...]
    at interop.Interop.<clinit>(Unknown Source)
[...]
Caused by: NoClassDefFoundError: myns.Proto

What can cause this issue?


EDIT: I cannot reproduce the error anymore, I recompiled and re-run the application, which started up flawlessly… Still I would really like to understand in which situations such an issue can show up.

It looks to me like the class loader couldn’t find the class definition for Proto, which I assume is the role of clojure RT to load as soon as the relevant .clj source file is parsed. As you can see in the extract of the stack trace I receive, myns is being loaded, and it it exactly there that Proto is defined. How come I got a NoClassDefFoundError?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T01:16:15+00:00Added an answer on May 22, 2026 at 1:16 am

    Clojure Records are supposed to be imported. The following should work:

    (ns interop
      (:require [myns :as m])
      (:import  myns.Proto))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In Access 2003, I'm getting a Join expression not supported exception for this: SELECT
Can some help me with this exception? I am using the Navigation Recipe provided
I noticed that this recipe seems to use __rlshift__ , __ror__ like operators. But,
I have a rails model that looks something like this: class Recipe < ActiveRecord::Base
I have this markup in an MVC app. <div id=ingredientlistdiv> <% Recipe recipe =
This is starting to vex me. I recently decided to clear out my FTP,
I thought I had this all figured out, but I'm hitting a brick wall.
I have a string like this: classname = Recipe Now I have a module
I have this ncurses application that is doing the standard recipe for temporarily dropping
I'm trying to wrap my head around what is happening in this recipe ,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.