Open ghost opened 13 years ago
Yes, this is a known problem and hard to overcome with the Java version of the underlying parboiled parsing framework. One way around this is to reimplement the markdown parser using parboiled for Scala which does not require runtime class generation and loading and will therefore run play nicely with GAE. It's planned...
Got the same problem but not on AppEngine. I'm using Java Server Pages on a tomcat Server through Netbeans... I get this error:
WARNING: StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor
at org.parboiled.Parboiled.createParser(Parboiled.java:54)
at org.pegdown.PegDownProcessor.
A ClassNotFoundException
is not the same as an IllegalAccessException
.
Apparently you have no (or the wrong version of) ASM on the classpath.
what is an ASM? And how can I fix this?
I added these libraries to my project: pegdown-1.1.0.jar
, parboiled-core-1.1.1.jar
, parboiled-java-1.1.1.jar
, parboiled-scala_2.10-1.1.1.jar
.
My code looks like this:
PegDownProcessor mdown = new PegDownProcessor();
mdown.mardownToHtml(aString);
And it always throws this exception. Any idea how to fix this?
In order to use pegdown 1.1.0 you need to have the following libraries on your classpath:
All these are available from maven central.
Thanks! It works now :)
Von meinem iPhone gesendet
Am 04.10.2012 um 14:19 schrieb Mathias notifications@github.com:
In order to use pegdown 1.1.0 you need to have the following libraries on your classpath:
pegdown-1.1.0.jar parboiled-core-1.0.2.jar parboiled-java-1.0.2.jar asm-all-3.3.1.jar All these are available from maven central.
— Reply to this email directly or view it on GitHub.
Is this still an issue? Because I'm using Pegdown 1.3.0 on GAE 1.7.7 succesfully. I have only tested it on a local GAE dev server so far but there should be no difference, right?
Since I've little experience with GAE I don't know. Maybe the latest versions of GAE have relaxed the class-loading restrictions that earlier versions suffered from. pegdown (or rather the underlying parboiled-for-java) need to be able to load classes from generated bytecode at runtime. If that is allowed all is well.
This component cannot be used on GAE due to reflection restrictions (http://code.google.com/appengine/docs/java/runtime.html - see chapter Reflection).
Stack trace is below: Caused by: java.lang.SecurityException: java.lang.IllegalAccessException: Reflection is not allowed on protected final java.lang.Class java.lang.ClassLoader.findLoadedClass(java.lang.String) at com.google.appengine.runtime.Request.process-0cd4e3037a565acb(Request.java) at java.lang.reflect.Method.setAccessible(Method.java:134) at org.parboiled.transform.AsmUtils.findLoadedClass(AsmUtils.java:173)