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

Convert to AsciiDoc throws java.lang.NoSuchMethodError #268

Closed
axiopisty opened this issue Jun 7, 2019 · 1 comment
Closed

Convert to AsciiDoc throws java.lang.NoSuchMethodError #268

axiopisty opened this issue Jun 7, 2019 · 1 comment

Comments

@axiopisty
Copy link

AsciiDoc Plugin Version: 0.26.15

IntelliJ IDEA 2019.1.3 (Ultimate Edition)
Build #IU-191.7479.19, built on May 27, 2019
JRE: 1.8.0_202-release-1483-b58 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.4.0-148-generic

I tried to convert my README.md file to README.adoc using the feature "Convert to AsciiDoc" The conversion process failed with the following stack trace:

java.lang.NoSuchMethodError: org.jsoup.select.Elements.get(I)Lorg/jsoup/nodes/Element;
	at com.laamella.markdown_to_asciidoc.html.TableToAsciiDoc.convert(TableToAsciiDoc.java:15)
	at com.laamella.markdown_to_asciidoc.ToAsciiDocSerializer.visit(ToAsciiDocSerializer.java:155)
	at org.pegdown.ast.HtmlBlockNode.accept(HtmlBlockNode.java:29)
	at com.laamella.markdown_to_asciidoc.ToAsciiDocSerializer.visitChildren(ToAsciiDocSerializer.java:460)
	at com.laamella.markdown_to_asciidoc.ToAsciiDocSerializer.visit(ToAsciiDocSerializer.java:59)
	at org.pegdown.ast.RootNode.accept(RootNode.java:51)
	at com.laamella.markdown_to_asciidoc.ToAsciiDocSerializer.toAsciiDoc(ToAsciiDocSerializer.java:40)
	at com.laamella.markdown_to_asciidoc.Converter.convertMarkdownToAsciiDoc(Converter.java:45)
	at org.asciidoc.intellij.actions.ConvertToAsciiDocAction$1$1.run(ConvertToAsciiDocAction.java:51)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:220)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:178)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:168)
	at org.asciidoc.intellij.actions.ConvertToAsciiDocAction$1.run(ConvertToAsciiDocAction.java:47)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1054)
	at org.asciidoc.intellij.actions.ConvertToAsciiDocAction.actionPerformed(ConvertToAsciiDocAction.java:44)
	at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:261)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:278)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.lambda$actionPerformed$0(ActionMenuItem.java:292)
	at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:283)
	at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:107)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:282)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$0(ActionMenuItem.java:111)
	at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88)
	at com.intellij.openapi.application.TransactionGuardImpl.lambda$submitTransaction$1(TransactionGuardImpl.java:111)
	at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:120)
	at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:121)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:111)
	at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:524)
	at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:35)
	at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:546)
	at java.awt.Component.processMouseEvent(Component.java:6550)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3325)
	at java.awt.Component.processEvent(Component.java:6315)
	at java.awt.Container.processEvent(Container.java:2239)
	at java.awt.Component.dispatchEventImpl(Component.java:4899)
	at java.awt.Container.dispatchEventImpl(Container.java:2297)
	at java.awt.Component.dispatchEvent(Component.java:4721)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
	at java.awt.Container.dispatchEventImpl(Container.java:2283)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4721)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:766)
	at java.awt.EventQueue.access$500(EventQueue.java:98)
	at java.awt.EventQueue$3.run(EventQueue.java:715)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
	at java.awt.EventQueue$4.run(EventQueue.java:739)
	at java.awt.EventQueue$4.run(EventQueue.java:737)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:736)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:729)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:674)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:373)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

I'm assuming this problem was caused because I have an html table embedded in my markdown file. An altered and minimal example of the table looks something like this:

<table>
  <thead>
    <tr>
      <th>METHOD</th>
      <th>PATH</th>
      <th>DESCRIPTION</th>
    </tr>
  </thead>
  <tbody>
    <tr align="left" valign="top">
      <td>GET</td>
      <td>/health</td>
      <td>Returns the applications health status.</td>
    </tr>
    <tr align="left" valign="top">
      <td>POST</td>
      <td>
/api/clicks/
<br/>
<br/>
Example of required POST body:
<br/>
<pre>{
  "cost": 0.75,
  "currencyCode": "USD",
  "customerId":  "string"
}</pre>
      </td>
      <td>
      Create a click.
      </td>
    </tr>
  </tbody>
</table>
ahus1 added a commit that referenced this issue Jun 7, 2019
@ahus1 ahus1 self-assigned this Jun 7, 2019
@ahus1 ahus1 added the bug label Jun 7, 2019
@ahus1
Copy link
Contributor

ahus1 commented Jun 7, 2019

A dependency was missing. I took the chance to update to version 1.1 of the converter.

There is a version 0.26.17 available from Github Releases that fixes the problem. Please give it a try and comment on this issue with your results.

I tried the snippet you provided and it now converts.

I noticed that during the conversion the <pre> content is getting lost. If you want this to be changed, you should open a ticket in the upstream project: https://github.com/bodiam/markdown-to-asciidoc

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

No branches or pull requests

2 participants