Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.NoClassDefFoundError: clojure/lang/ITransientMap #5

Closed
kamaldeep-ebay opened this issue Sep 17, 2014 · 9 comments
Closed

Comments

@kamaldeep-ebay
Copy link

when i tried to start riemann got the following error in main class . confirmed that the jar
riemann-jvm-profiler-0.1.0-standalone.jar
riemann-jvm-profiler-0.1.0.jar

are in classpath

Exception in thread "main" java.lang.NoClassDefFoundError: clojure/lang/ITransientMap
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2484)
at java.lang.Class.getMethod0(Class.java:2727)
at java.lang.Class.getMethod(Class.java:1639)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:294)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338)
Caused by: java.lang.ClassNotFoundException: clojure.lang.ITransientMap
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 6 more
FATAL ERROR in native method: processing of -javaagent failed
Abort trap: 6

@ralph-tice
Copy link

What does lein --version output ? Are you trying to run riemann-jvm-profiler against riemann, or a client application? And did you build with lein uberjar per the instructions?

@kamaldeep-ebay
Copy link
Author

hi,

thanks for replying...

./lein --version
Leiningen 2.5.0 on Java 1.6.0_65 Java HotSpot(TM) 64-Bit Server VM

yes i m running against riemann. i already have the riemann dashboard up .. i build the uberjar as per the instructions.

@ralph-tice
Copy link

I only ask because the typical use case is to run riemann-jvm-profiler as the profiler in the client application you want to profile. If you apply the -javaagent JVM option to your Riemann server that means you are profiling Riemann itself rather than your client application.

You only need the riemann-jvm-profiler-0.1.0-standalone.jar in your classpath, not both. Does that resolve your issue? If not, by what mechanism are you including the jar in your classpath? Can you share the entire java command being issued?

@kamaldeep-ebay
Copy link
Author

No i m using the jvm-profiler to profile another application . for testing right now , i m using a sample java application that i m profiling.

Thanks for that suggestion , i placed only the standalone jar and got the same error.
if i use the standalone jar in the javaagent then i get the below error
https://gist.github.com/kamaldeep-ebay/0250f4ea1b862e1fc946

the command i used
java -javaagent:'riemann-jvm-profiler-master/target/riemann-jvm-profiler-0.1.0.jar=host=localhost' Test

java -javaagent:'riemann-jvm-profiler-master/target/riemann-jvm-profiler-0.1.0-standalone.jar=host=localhost' Test

@ralph-tice
Copy link

Try without the single quotes
On Sep 17, 2014 10:46 PM, "kamaldeep-ebay" notifications@github.com wrote:

No i m using the jvm-profiler to profile another application . for testing
right now , i m using a sample java application that i m profiling.

Thanks for that suggestion , i placed only the standalone jar and got a
different error.
https://gist.github.com/kamaldeep-ebay/0250f4ea1b862e1fc946

the command i used
java
-javaagent:'riemann-jvm-profiler-master/target/riemann-jvm-profiler-0.1.0-standalone.jar=host=localhost'
Test


Reply to this email directly or view it on GitHub
#5 (comment)
.

@kamaldeep-ebay
Copy link
Author

sry i got same error

java -javaagent:riemann-jvm-profiler-master/target/riemann-jvm-profiler-0.1.0.jar=host=localhost Test
Exception in thread "main" java.lang.NoClassDefFoundError: clojure/lang/ITransientMap
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2484)
at java.lang.Class.getMethod0(Class.java:2727)
at java.lang.Class.getMethod(Class.java:1639)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:294)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338)
Caused by: java.lang.ClassNotFoundException: clojure.lang.ITransientMap
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 6 more

@ralph-tice
Copy link

Sorry, you want to use the standalone jar --
riemann-jvm-profiler-0.1.0-standalone.jar
On Sep 17, 2014 10:58 PM, "kamaldeep-ebay" notifications@github.com wrote:

sry i got same error

java
-javaagent:riemann-jvm-profiler-master/target/riemann-jvm-profiler-0.1.0.jar=host=localhost
Test
Exception in thread "main" java.lang.NoClassDefFoundError:
clojure/lang/ITransientMap
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2484)
at java.lang.Class.getMethod0(Class.java:2727)
at java.lang.Class.getMethod(Class.java:1639)
at
sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:294)
at
sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338)
Caused by: java.lang.ClassNotFoundException: clojure.lang.ITransientMap
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 6 more


Reply to this email directly or view it on GitHub
#5 (comment)
.

@kamaldeep-ebay
Copy link
Author

@jeroenvandijk
Copy link

@kamaldeep-ebay I had the same error as you did. To fix it, you either have to switch to java 7 or include the [org.codehaus.jsr166-mirror/jsr166y "1.7.0"] dependency in your project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants