com.atlassian.plugin.PluginParseException: Unable to scan for host components in plugin classes

Atlassian JIRA | Kara Hatherly | 5 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    If JIM is made to generate a manifest at compilation time, JIRA subsequently chokes on installing the plugin, with the following output: {code} [INFO] [talledLocalContainer] com.atlassian.plugin.PluginParseException: Unable to scan for host components in plugin classes [INFO] [talledLocalContainer] at com.atlassian.plugin.osgi.factory.transform.stage.HostComponentSpringStage.execute(HostComponentSpringStage.java:62) ... [INFO] [talledLocalContainer] Caused by: java.io.IOException: Error parsing class file [INFO] [talledLocalContainer] at com.atlassian.plugin.osgi.util.ClassBinaryScanner.scanClassBinary(ClassBinaryScanner.java:66) [INFO] [talledLocalContainer] at com.atlassian.plugin.osgi.factory.transform.stage.HostComponentSpringStage.findUsedHostComponents(HostComponentSpringStage.java:195) [INFO] [talledLocalContainer] at com.atlassian.plugin.osgi.factory.transform.stage.HostComponentSpringStage.findUsedHostComponents(HostComponentSpringStage.java:209) [INFO] [talledLocalContainer] at com.atlassian.plugin.osgi.factory.transform.stage.HostComponentSpringStage.execute(HostComponentSpringStage.java:58) [INFO] [talledLocalContainer] ... 87 more [INFO] [talledLocalContainer] Caused by: java.lang.IllegalArgumentException: Invalid class file (or parsing is wrong), Not an assoc at a method ref [INFO] [talledLocalContainer] at aQute.lib.osgi.Clazz.getMethodDef(Clazz.java:1502) [INFO] [talledLocalContainer] at aQute.lib.osgi.Clazz.crawl(Clazz.java:1009) [INFO] [talledLocalContainer] at aQute.lib.osgi.Clazz.doCode(Clazz.java:958) [INFO] [talledLocalContainer] at aQute.lib.osgi.Clazz.doAttribute(Clazz.java:783) [INFO] [talledLocalContainer] at aQute.lib.osgi.Clazz.doAttributes(Clazz.java:751) [INFO] [talledLocalContainer] at aQute.lib.osgi.Clazz.parseClassFile(Clazz.java:560) [INFO] [talledLocalContainer] at aQute.lib.osgi.Clazz.parseClassFile(Clazz.java:369) [INFO] [talledLocalContainer] at aQute.lib.osgi.Clazz.parseClassFileWithCollector(Clazz.java:359) [INFO] [talledLocalContainer] at com.atlassian.plugin.osgi.util.ClassBinaryScanner.scanClassBinary(ClassBinaryScanner.java:38) {code} Not sure if bumping the bndlib version to 1.50 would help, but it couldn't hurt to test. I marked 5.0 as affects version, because that's the only one I tested with, but I don't think the version of bndlib has been changed. Note: to build JIM with manifest generation instructions, you need to change the pom to also use version 3.11.1 (or higher) of the maven-jira-plugin.

    Atlassian JIRA | 5 years ago | Kara Hatherly
    com.atlassian.plugin.PluginParseException: Unable to scan for host components in plugin classes
  2. 0

    If JIM is made to generate a manifest at compilation time, JIRA subsequently chokes on installing the plugin, with the following output: {code} [INFO] [talledLocalContainer] com.atlassian.plugin.PluginParseException: Unable to scan for host components in plugin classes [INFO] [talledLocalContainer] at com.atlassian.plugin.osgi.factory.transform.stage.HostComponentSpringStage.execute(HostComponentSpringStage.java:62) ... [INFO] [talledLocalContainer] Caused by: java.io.IOException: Error parsing class file [INFO] [talledLocalContainer] at com.atlassian.plugin.osgi.util.ClassBinaryScanner.scanClassBinary(ClassBinaryScanner.java:66) [INFO] [talledLocalContainer] at com.atlassian.plugin.osgi.factory.transform.stage.HostComponentSpringStage.findUsedHostComponents(HostComponentSpringStage.java:195) [INFO] [talledLocalContainer] at com.atlassian.plugin.osgi.factory.transform.stage.HostComponentSpringStage.findUsedHostComponents(HostComponentSpringStage.java:209) [INFO] [talledLocalContainer] at com.atlassian.plugin.osgi.factory.transform.stage.HostComponentSpringStage.execute(HostComponentSpringStage.java:58) [INFO] [talledLocalContainer] ... 87 more [INFO] [talledLocalContainer] Caused by: java.lang.IllegalArgumentException: Invalid class file (or parsing is wrong), Not an assoc at a method ref [INFO] [talledLocalContainer] at aQute.lib.osgi.Clazz.getMethodDef(Clazz.java:1502) [INFO] [talledLocalContainer] at aQute.lib.osgi.Clazz.crawl(Clazz.java:1009) [INFO] [talledLocalContainer] at aQute.lib.osgi.Clazz.doCode(Clazz.java:958) [INFO] [talledLocalContainer] at aQute.lib.osgi.Clazz.doAttribute(Clazz.java:783) [INFO] [talledLocalContainer] at aQute.lib.osgi.Clazz.doAttributes(Clazz.java:751) [INFO] [talledLocalContainer] at aQute.lib.osgi.Clazz.parseClassFile(Clazz.java:560) [INFO] [talledLocalContainer] at aQute.lib.osgi.Clazz.parseClassFile(Clazz.java:369) [INFO] [talledLocalContainer] at aQute.lib.osgi.Clazz.parseClassFileWithCollector(Clazz.java:359) [INFO] [talledLocalContainer] at com.atlassian.plugin.osgi.util.ClassBinaryScanner.scanClassBinary(ClassBinaryScanner.java:38) {code} Not sure if bumping the bndlib version to 1.50 would help, but it couldn't hurt to test. I marked 5.0 as affects version, because that's the only one I tested with, but I don't think the version of bndlib has been changed. Note: to build JIM with manifest generation instructions, you need to change the pom to also use version 3.11.1 (or higher) of the maven-jira-plugin.

    Atlassian JIRA | 5 years ago | Kara Hatherly
    com.atlassian.plugin.PluginParseException: Unable to scan for host components in plugin classes

    Root Cause Analysis

    1. com.atlassian.plugin.PluginParseException

      Unable to scan for host components in plugin classes

      at com.atlassian.plugin.osgi.factory.transform.stage.HostComponentSpringStage.execute()
    2. com.atlassian.plugin
      HostComponentSpringStage.execute
      1. com.atlassian.plugin.osgi.factory.transform.stage.HostComponentSpringStage.execute(HostComponentSpringStage.java:62)
      1 frame