Skip to content
This repository has been archived by the owner on Jan 2, 2022. It is now read-only.

Rendering engine for extension md (MarkdownEngine) cannot be loaded in core 2.6.1 #14

Open
kwin opened this issue Jul 13, 2018 · 7 comments
Assignees
Milestone

Comments

@kwin
Copy link

kwin commented Jul 13, 2018

After we upgraded to jbake-maven-plugin 0.3.1 the following error is emitted during goal generate:

...
Jul 13, 2018 9:11:03 AM com.orientechnologies.common.log.OLogManager log
INFO: Lowering disk cache size from 3,641MB to 3,639MB.
Jul 13, 2018 9:11:03 AM com.orientechnologies.common.log.OLogManager log
INFO: Storage 'memory:cache' is created under OrientDB distribution : 2.2.33 (build 77584cd6827f647cf4aa231cf27bd6f10bc04e2c, branch 2.2.x)
[WARNING] Unable to load a suitable rendering engine for extensions [md]
...

As soon as you downgrade the plugin's dependency of jbake-core to 2.6.0 the error no longer occurs.

You can e.g. reproduce by cloning and building https://github.com/apache/sling-site/tree/feature/upgrade-to-jbake-261.

@kwin
Copy link
Author

kwin commented Jul 13, 2018

The underlying exception being caught (and unfortunately neither rethrown nor logged) in https://github.com/jbake-org/jbake/blob/a402b14f1d3fcb5115254f778c9c5cd691578fc2/jbake-core/src/main/java/org/jbake/parser/Engines.java#L101 is java.lang.NoClassDefFoundError: com/vladsch/flexmark/ast/Node. This seems related to the issue: vsch/flexmark-java#194.

As soon as I explicitly add the dependency com.vladsch.flexmark:flexmark-util the NoClassDefFoundError vanishes. That is weird though as the util dependency should be transitively loaded anyways (as it has the scope "compile"). Maybe this is related to this change: jbake-org/jbake@9fadf4e#diff-8a087c632a84addcde17d49d7b1b6ce8.

@kwin
Copy link
Author

kwin commented Jul 13, 2018

Obviously "optional" dependencies in compile scope are not loaded for Maven plugins. The classpath dumper (enabled with -X) exposes the following classpath for jbake-maven-plugin 0.3.1

[DEBUG] org.jbake:jbake-maven-plugin:jar:0.3.1:
[DEBUG]    org.jbake:jbake-core:jar:2.6.1:compile
[DEBUG]       org.slf4j:slf4j-api:jar:1.7.25:compile
[DEBUG]       org.slf4j:jul-to-slf4j:jar:1.7.25:compile
[DEBUG]       commons-configuration:commons-configuration:jar:1.10:compile
[DEBUG]          commons-logging:commons-logging:jar:1.1.1:compile
[DEBUG]       org.apache.commons:commons-lang3:jar:3.7:compile
[DEBUG]       com.googlecode.json-simple:json-simple:jar:1.1.1:compile
[DEBUG]       com.orientechnologies:orientdb-core:jar:2.2.33:compile
[DEBUG]          org.xerial.snappy:snappy-java:jar:1.1.0.1:compile
[DEBUG]          net.java.dev.jna:jna:jar:4.5.0:compile
[DEBUG]          net.java.dev.jna:jna-platform:jar:4.5.0:compile
[DEBUG]          com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:jar:1.4.1:compile
[DEBUG]       org.jsoup:jsoup:jar:1.11.2:compile

While with dependency jbake-core 2.6.0 it looks differently because there all transitive dependencies were non-optional.

[DEBUG] org.jbake:jbake-maven-plugin:jar:0.3.1:
[DEBUG]    org.jbake:jbake-core:jar:2.6.0:runtime
[DEBUG]       org.slf4j:slf4j-api:jar:1.7.25:compile
[DEBUG]       org.slf4j:jul-to-slf4j:jar:1.7.25:runtime
[DEBUG]       ch.qos.logback:logback-classic:jar:1.2.3:runtime
[DEBUG]       ch.qos.logback:logback-core:jar:1.2.3:runtime
[DEBUG]       commons-configuration:commons-configuration:jar:1.10:runtime
[DEBUG]          commons-logging:commons-logging:jar:1.1.1:runtime
[DEBUG]       org.apache.commons:commons-vfs2:jar:2.2:runtime
[DEBUG]       org.apache.commons:commons-lang3:jar:3.7:compile
[DEBUG]       com.googlecode.json-simple:json-simple:jar:1.1.1:runtime
[DEBUG]          junit:junit:jar:4.10:runtime
[DEBUG]             org.hamcrest:hamcrest-core:jar:1.1:runtime
[DEBUG]       com.orientechnologies:orientdb-graphdb:jar:2.2.30:runtime
[DEBUG]          com.orientechnologies:orientdb-server:jar:2.2.30:runtime
[DEBUG]             com.orientechnologies:orientdb-client:jar:2.2.30:runtime
[DEBUG]             javax.mail:mail:jar:1.4.7:runtime
[DEBUG]                javax.activation:activation:jar:1.1:runtime
[DEBUG]             com.sun.xml.bind:jaxb-impl:jar:2.2.3:runtime
[DEBUG]                javax.xml.bind:jaxb-api:jar:2.2.2:runtime
[DEBUG]                   javax.xml.stream:stax-api:jar:1.0-2:runtime
[DEBUG]          com.orientechnologies:orientdb-tools:jar:2.2.30:runtime
[DEBUG]             com.fasterxml.jackson.core:jackson-databind:jar:2.6.0:runtime
[DEBUG]                com.fasterxml.jackson.core:jackson-annotations:jar:2.6.0:runtime
[DEBUG]                com.fasterxml.jackson.core:jackson-core:jar:2.6.0:runtime
[DEBUG]          com.orientechnologies:orientdb-core:jar:2.2.30:runtime
[DEBUG]             org.xerial.snappy:snappy-java:jar:1.1.0.1:runtime
[DEBUG]             net.java.dev.jna:jna:jar:4.5.0:runtime
[DEBUG]             net.java.dev.jna:jna-platform:jar:4.5.0:runtime
[DEBUG]          commons-collections:commons-collections:jar:3.2.2:runtime
[DEBUG]          com.tinkerpop.blueprints:blueprints-core:jar:2.6.0:runtime
[DEBUG]             org.codehaus.jettison:jettison:jar:1.3.3:runtime
[DEBUG]                stax:stax-api:jar:1.0.1:runtime
[DEBUG]             com.carrotsearch:hppc:jar:0.6.0:runtime
[DEBUG]       org.asciidoctor:asciidoctorj:jar:1.5.6:runtime
[DEBUG]          org.jruby:jruby-complete:jar:1.7.26:runtime
[DEBUG]          com.beust:jcommander:jar:1.35:runtime
[DEBUG]       org.codehaus.groovy:groovy-templates:jar:2.4.13:runtime
[DEBUG]          org.codehaus.groovy:groovy:jar:2.4.13:runtime
[DEBUG]          org.codehaus.groovy:groovy-xml:jar:2.4.13:runtime
[DEBUG]       org.freemarker:freemarker:jar:2.3.27-incubating:runtime
[DEBUG]       org.thymeleaf:thymeleaf:jar:3.0.9.RELEASE:runtime
[DEBUG]          ognl:ognl:jar:3.1.12:runtime
[DEBUG]             org.javassist:javassist:jar:3.20.0-GA:runtime
[DEBUG]          org.attoparser:attoparser:jar:2.0.4.RELEASE:runtime
[DEBUG]          org.unbescape:unbescape:jar:1.1.5.RELEASE:runtime
[DEBUG]       de.neuland-bfi:jade4j:jar:1.2.7:runtime
[DEBUG]          org.apache.commons:commons-jexl:jar:2.1.1:runtime
[DEBUG]          com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:jar:1.4.2:runtime
[DEBUG]          org.pegdown:pegdown:jar:1.6.0:runtime
[DEBUG]             org.parboiled:parboiled-java:jar:1.1.7:runtime
[DEBUG]                org.parboiled:parboiled-core:jar:1.1.7:runtime
[DEBUG]                org.ow2.asm:asm:jar:5.0.3:runtime
[DEBUG]                org.ow2.asm:asm-tree:jar:5.0.3:runtime
[DEBUG]                org.ow2.asm:asm-analysis:jar:5.0.3:runtime
[DEBUG]                org.ow2.asm:asm-util:jar:5.0.3:runtime
[DEBUG]       com.vladsch.flexmark:flexmark-all:jar:0.28.38:runtime
[DEBUG]          com.vladsch.flexmark:flexmark:jar:0.28.38:runtime
[DEBUG]          com.vladsch.flexmark:flexmark-ext-abbreviation:jar:0.28.38:runtime
[DEBUG]          com.vladsch.flexmark:flexmark-ext-anchorlink:jar:0.28.38:runtime
[DEBUG]          com.vladsch.flexmark:flexmark-ext-aside:jar:0.28.38:runtime
[DEBUG]          com.vladsch.flexmark:flexmark-ext-attributes:jar:0.28.38:runtime
[DEBUG]          com.vladsch.flexmark:flexmark-ext-autolink:jar:0.28.38:runtime
[DEBUG]             org.nibor.autolink:autolink:jar:0.6.0:runtime
[DEBUG]          com.vladsch.flexmark:flexmark-ext-definition:jar:0.28.38:runtime
[DEBUG]          com.vladsch.flexmark:flexmark-ext-emoji:jar:0.28.38:runtime
[DEBUG]          com.vladsch.flexmark:flexmark-ext-enumerated-reference:jar:0.28.38:runtime
[DEBUG]          com.vladsch.flexmark:flexmark-ext-escaped-character:jar:0.28.38:runtime
[DEBUG]          com.vladsch.flexmark:flexmark-ext-footnotes:jar:0.28.38:runtime
[DEBUG]          com.vladsch.flexmark:flexmark-ext-gfm-issues:jar:0.28.38:runtime
[DEBUG]          com.vladsch.flexmark:flexmark-ext-gfm-strikethrough:jar:0.28.38:runtime
[DEBUG]          com.vladsch.flexmark:flexmark-ext-gfm-tables:jar:0.28.38:runtime
[DEBUG]          com.vladsch.flexmark:flexmark-ext-gfm-tasklist:jar:0.28.38:runtime
[DEBUG]          com.vladsch.flexmark:flexmark-ext-gfm-users:jar:0.28.38:runtime
[DEBUG]          com.vladsch.flexmark:flexmark-ext-jekyll-front-matter:jar:0.28.38:runtime
[DEBUG]          com.vladsch.flexmark:flexmark-ext-jekyll-tag:jar:0.28.38:runtime
[DEBUG]          com.vladsch.flexmark:flexmark-ext-ins:jar:0.28.38:runtime
[DEBUG]          com.vladsch.flexmark:flexmark-ext-xwiki-macros:jar:0.28.38:runtime
[DEBUG]          com.vladsch.flexmark:flexmark-ext-superscript:jar:0.28.38:runtime
[DEBUG]          com.vladsch.flexmark:flexmark-ext-tables:jar:0.28.38:runtime
[DEBUG]          com.vladsch.flexmark:flexmark-ext-toc:jar:0.28.38:runtime
[DEBUG]          com.vladsch.flexmark:flexmark-ext-typographic:jar:0.28.38:runtime
[DEBUG]          com.vladsch.flexmark:flexmark-ext-wikilink:jar:0.28.38:runtime
[DEBUG]          com.vladsch.flexmark:flexmark-ext-yaml-front-matter:jar:0.28.38:runtime
[DEBUG]          com.vladsch.flexmark:flexmark-ext-youtube-embedded:jar:0.28.38:runtime
[DEBUG]          com.vladsch.flexmark:flexmark-formatter:jar:0.28.38:runtime
[DEBUG]          com.vladsch.flexmark:flexmark-html-parser:jar:0.28.38:runtime
[DEBUG]             org.jsoup:jsoup:jar:1.10.2:runtime
[DEBUG]          com.vladsch.flexmark:flexmark-jira-converter:jar:0.28.38:runtime
[DEBUG]          com.vladsch.flexmark:flexmark-pdf-converter:jar:0.28.38:runtime
[DEBUG]             com.openhtmltopdf:openhtmltopdf-core:jar:0.0.1-RC9:runtime
[DEBUG]             com.openhtmltopdf:openhtmltopdf-pdfbox:jar:0.0.1-RC9:runtime
[DEBUG]                org.apache.pdfbox:pdfbox:jar:2.0.4:runtime
[DEBUG]                   org.apache.pdfbox:fontbox:jar:2.0.4:runtime
[DEBUG]             com.openhtmltopdf:openhtmltopdf-rtl-support:jar:0.0.1-RC9:runtime
[DEBUG]                com.ibm.icu:icu4j:jar:58.1:runtime
[DEBUG]             com.openhtmltopdf:openhtmltopdf-jsoup-dom-converter:jar:0.0.1-RC9:runtime
[DEBUG]          com.vladsch.flexmark:flexmark-profile-pegdown:jar:0.28.38:runtime
[DEBUG]          com.vladsch.flexmark:flexmark-util:jar:0.28.38:runtime
[DEBUG]          com.vladsch.flexmark:flexmark-youtrack-converter:jar:0.28.38:runtime
[DEBUG]       org.eclipse.jetty:jetty-server:jar:9.2.24.v20180105:compile
[DEBUG]          javax.servlet:javax.servlet-api:jar:3.1.0:compile
[DEBUG]          org.eclipse.jetty:jetty-http:jar:9.2.24.v20180105:compile
[DEBUG]             org.eclipse.jetty:jetty-util:jar:9.2.24.v20180105:compile
[DEBUG]          org.eclipse.jetty:jetty-io:jar:9.2.24.v20180105:compile
[DEBUG]       args4j:args4j:jar:2.33:runtime
[DEBUG]    com.sparkjava:spark-core:jar:2.3:compile
[DEBUG]       org.slf4j:slf4j-simple:jar:1.7.12:compile
[DEBUG]       org.eclipse.jetty:jetty-webapp:jar:9.3.2.v20150730:compile
[DEBUG]          org.eclipse.jetty:jetty-xml:jar:9.3.2.v20150730:compile
[DEBUG]          org.eclipse.jetty:jetty-servlet:jar:9.3.2.v20150730:compile
[DEBUG]             org.eclipse.jetty:jetty-security:jar:9.3.2.v20150730:compile
[DEBUG]       org.eclipse.jetty.websocket:websocket-server:jar:9.3.2.v20150730:compile
[DEBUG]          org.eclipse.jetty.websocket:websocket-common:jar:9.3.2.v20150730:compile
[DEBUG]          org.eclipse.jetty.websocket:websocket-client:jar:9.3.2.v20150730:compile
[DEBUG]       org.eclipse.jetty.websocket:websocket-servlet:jar:9.3.2.v20150730:compile
[DEBUG]          org.eclipse.jetty.websocket:websocket-api:jar:9.3.2.v20150730:compile
[DEBUG]    org.apache.maven:maven-plugin-api:jar:3.3.9:compile
[DEBUG]       org.apache.maven:maven-model:jar:3.3.9:compile
[DEBUG]       org.apache.maven:maven-artifact:jar:3.3.9:compile
[DEBUG]       org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.3.2:compile
[DEBUG]          javax.enterprise:cdi-api:jar:1.0:compile
[DEBUG]             javax.annotation:jsr250-api:jar:1.0:compile
[DEBUG]          org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.3.2:compile
[DEBUG]    commons-lang:commons-lang:jar:2.6:compile
[DEBUG]    org.apache.maven:maven-settings:jar:3.3.9:compile
[DEBUG]    org.apache.maven:maven-core:jar:3.3.9:compile
[DEBUG]       org.apache.maven:maven-settings-builder:jar:3.3.9:compile
[DEBUG]          org.apache.maven:maven-builder-support:jar:3.3.9:compile
[DEBUG]       org.apache.maven:maven-repository-metadata:jar:3.3.9:compile
[DEBUG]       org.apache.maven:maven-model-builder:jar:3.3.9:compile
[DEBUG]          com.google.guava:guava:jar:18.0:compile
[DEBUG]       org.apache.maven:maven-aether-provider:jar:3.3.9:compile
[DEBUG]          org.eclipse.aether:aether-spi:jar:1.0.2.v20150114:compile
[DEBUG]       org.eclipse.aether:aether-impl:jar:1.0.2.v20150114:compile
[DEBUG]       org.eclipse.aether:aether-api:jar:1.0.2.v20150114:compile
[DEBUG]       org.eclipse.aether:aether-util:jar:1.0.2.v20150114:compile
[DEBUG]       com.google.inject:guice:jar:no_aop:4.0:compile
[DEBUG]          javax.inject:javax.inject:jar:1:compile
[DEBUG]          aopalliance:aopalliance:jar:1.0:compile
[DEBUG]       org.codehaus.plexus:plexus-interpolation:jar:1.21:compile
[DEBUG]       org.codehaus.plexus:plexus-classworlds:jar:2.5.2:compile
[DEBUG]       org.codehaus.plexus:plexus-component-annotations:jar:1.6:compile
[DEBUG]       org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3:compile
[DEBUG]          org.sonatype.plexus:plexus-cipher:jar:1.4:compile
[DEBUG]    org.sonatype.plexus:plexus-build-api:jar:0.0.7:compile
[DEBUG]    org.codehaus.plexus:plexus-utils:jar:3.0.22:compile
[DEBUG]    commons-io:commons-io:jar:2.4:compile

@kwin
Copy link
Author

kwin commented Jul 13, 2018

Actually it seems this was a deliberate thing: jbake-org/jbake#437. Would be good to explicitly mention in the readme under which circumstances additional dependencies need to be added and which Maven coordinates they have.

@jonbullock
Copy link
Member

Yeah, it's mentioned in the main JBake documentation but not on the plugin readme, which it should be.

@kwin
Copy link
Author

kwin commented Oct 27, 2018

Please compare also with the regression regarding this in 2.6.2 (#17 (comment)). Basically at least the template engines all(!) need to be listed as dependencies right now to get it to work!

@jderuette
Copy link

The exemple jBake site mentionned above : https://github.com/jonbullock/maven-jbake-site

@occupant23
Copy link

Hi,
I ran into the same issue today. It would be good to mention this in the README since this can cause some trouble. Furthermore, it would be nice to reference the example site @jderuette mentioned above in oder to have an easy time trying out JBake without installing the CLI of JBake.

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

No branches or pull requests

4 participants