Building a task provider

Hello,

I'm trying to create a custom task provider (for HP Quality Center), which will eventually be open-sourced for the community. However, I'm having trouble creating the simplest provider.

I downloaded the bugzilla-task-provider from https://github.com/nickhristov/bugzilla-intellij-task-provider (direct download from: https://github.com/nickhristov/bugzilla-intellij-task-provider/zipball/master).

Using IDEA 10.0.3 Ultimate, I imported the contents of the file as a Plugin module, edited the run-configuration and tried to debug it. The new IDEA instance ran with the following exception:

C:\dev\redcat\trunk\sdks\jdk\bin\java -Xms512m -Xmx1024m -XX:MaxPermSize=250m -ea -Xbootclasspath/a:C:/dev/redcat/trunk/tools/idea\lib\boot.jar -Didea.config.path=C:\Users\cohennad\.IntelliJIdea10\system\plugins-sandbox\config -Didea.system.path=C:\Users\cohennad\.IntelliJIdea10\system\plugins-sandbox\system -Didea.plugins.path=C:\Users\cohennad\.IntelliJIdea10\system\plugins-sandbox\plugins -Didea.launcher.port=7533 -Didea.launcher.bin.path=C:\dev\redcat\trunk\tools\idea\bin -Dfile.encoding=windows-1252 -classpath C:\dev\redcat\trunk\sdks\jdk\lib\tools.jar;C:/dev/redcat/trunk/tools/idea\lib\idea_rt.jar;C:/dev/redcat/trunk/tools/idea\lib\idea.jar;C:/dev/redcat/trunk/tools/idea\lib\bootstrap.jar;C:/dev/redcat/trunk/tools/idea\lib\extensions.jar;C:/dev/redcat/trunk/tools/idea\lib\util.jar;C:/dev/redcat/trunk/tools/idea\lib\openapi.jar;C:/dev/redcat/trunk/tools/idea\lib\jdom.jar;C:/dev/redcat/trunk/tools/idea\lib\log4j.jar;C:\dev\redcat\trunk\tools\idea\lib\idea_rt.jar com.intellij.rt.execution.application.AppMain com.intellij.idea.Main
[   8291]  ERROR - nsions.impl.ExtensionPointImpl - Extension 'class org.bugzilla.tasks.BugzillaRepositoryType' should be instance of 'class com.intellij.tasks.TaskRepositoryType'
com.intellij.openapi.extensions.ExtensionException
    at com.intellij.openapi.extensions.impl.ExtensionPointImpl.getExtensions(ExtensionPointImpl.java:180)
    at com.intellij.openapi.extensions.Extensions.getExtensions(Extensions.java:99)
    at com.intellij.openapi.extensions.Extensions.getExtensions(Extensions.java:87)
    at com.intellij.tasks.TaskManager.<clinit>(TaskManager.java:89)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.a(ComponentManagerImpl.java:476)
    at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.a(ComponentManagerImpl.java:466)
    at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.access$100(ComponentManagerImpl.java:452)
    at com.intellij.openapi.components.impl.ComponentManagerImpl.a(ComponentManagerImpl.java:119)
    at com.intellij.openapi.components.impl.ComponentManagerImpl.initComponents(ComponentManagerImpl.java:383)
    at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:89)
    at com.intellij.openapi.project.impl.ProjectImpl.init(ProjectImpl.java:245)
    at com.intellij.openapi.project.impl.ProjectManagerImpl.a(ProjectManagerImpl.java:269)
    at com.intellij.openapi.project.impl.ProjectManagerImpl.b(ProjectManagerImpl.java:297)
    at com.intellij.openapi.project.impl.ProjectManagerImpl.access$400(ProjectManagerImpl.java:76)
    at com.intellij.openapi.project.impl.ProjectManagerImpl$6.run(ProjectManagerImpl.java:470)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl$3.run(ProgressManagerImpl.java:255)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:482)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl$4.run(ProgressManagerImpl.java:267)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:205)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:233)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:196)
    at com.intellij.openapi.application.impl.ApplicationImpl$8$1.run(ApplicationImpl.java:575)
    at com.intellij.openapi.application.impl.ApplicationImpl$6.run(ApplicationImpl.java:383)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
    at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:131)
[   8377]  ERROR - nsions.impl.ExtensionPointImpl - IntelliJ IDEA 10.0.3  Build #IU-103.255
[   8377]  ERROR - nsions.impl.ExtensionPointImpl - JDK: 1.6.0_23
[   8377]  ERROR - nsions.impl.ExtensionPointImpl - VM: Java HotSpot(TM) 64-Bit Server VM
[   8377]  ERROR - nsions.impl.ExtensionPointImpl - Vendor: Sun Microsystems Inc.
[   8377]  ERROR - nsions.impl.ExtensionPointImpl - OS: Windows 7
[   8377]  ERROR - nsions.impl.ExtensionPointImpl - Last Action:




I can see that the Bugzilla plugin was loaded (see screenshot) , but I can't see the "Bugzilla" server as one of the options in the servers dialog.

As per the instructions on the bugzilla-task-provider page, I made sure that the IntelliJ IDEA Plugin SDK will point to the same Ultimate edition (ie not Community), though I'm not sure it's required.I have also manually added all the files from the /lib directory to the module dependencies as well as the tasks-api.jar from my IDEA's plugins/tasks/lib directory.

UPDATE:

After reading through some of the forum posts (e..g http://devnet.jetbrains.net/message/5291990#5291990), I have removed all IDEA specific jars from the module classpath: idea.jar, openapi.jar, idea_rt, idea_jsp_openapi.jar, tasks-api.jar and tasks-core.jar . I'm now getting a new exception when I'm trying to open the tasks window:

C:\dev\redcat\trunk\sdks\jdk\bin\java -Xms512m -Xmx1024m -XX:MaxPermSize=250m -ea -Xbootclasspath/a:C:/dev/redcat/trunk/tools/idea\lib\boot.jar -Didea.config.path=C:\Users\cohennad\.IntelliJIdea10\system\plugins-sandbox\config -Didea.system.path=C:\Users\cohennad\.IntelliJIdea10\system\plugins-sandbox\system -Didea.plugins.path=C:\Users\cohennad\.IntelliJIdea10\system\plugins-sandbox\plugins -Didea.launcher.port=7533 -Didea.launcher.bin.path=C:\dev\redcat\trunk\tools\idea\bin -Dfile.encoding=windows-1252 -classpath C:\dev\redcat\trunk\sdks\jdk\lib\tools.jar;C:/dev/redcat/trunk/tools/idea\lib\idea_rt.jar;C:/dev/redcat/trunk/tools/idea\lib\idea.jar;C:/dev/redcat/trunk/tools/idea\lib\bootstrap.jar;C:/dev/redcat/trunk/tools/idea\lib\extensions.jar;C:/dev/redcat/trunk/tools/idea\lib\util.jar;C:/dev/redcat/trunk/tools/idea\lib\openapi.jar;C:/dev/redcat/trunk/tools/idea\lib\jdom.jar;C:/dev/redcat/trunk/tools/idea\lib\log4j.jar;C:\dev\redcat\trunk\tools\idea\lib\idea_rt.jar com.intellij.rt.execution.application.AppMain com.intellij.idea.Main
[  18821]  ERROR - com.intellij.ide.IdeEventQueue - Error during dispatching of java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=com.intellij.openapi.util.EdtRunnable$1@753f7224,notifier=null,catchExceptions=false,when=1303725189850] on sun.awt.windows.WToolkit@1af304c8
java.lang.LinkageError: loader constraint violation: loader (instance of com/intellij/ide/plugins/cl/PluginClassLoader) previously initiated loading for a different type with name "com/intellij/util/Consumer"
    at com.intellij.tasks.actions.OpenTaskAction.actionPerformed(OpenTaskAction.java:40)
    at com.intellij.ui.popup.PopupFactoryImpl$ActionPopupStep$1.run(PopupFactoryImpl.java:503)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.a(FocusManagerImpl.java:486)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.e(FocusManagerImpl.java:475)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.d(FocusManagerImpl.java:459)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.access$200(FocusManagerImpl.java:50)
    at com.intellij.openapi.wm.impl.FocusManagerImpl$1.runEdt(FocusManagerImpl.java:78)
    at com.intellij.openapi.util.EdtRunnable$1.run(EdtRunnable.java:25)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
    at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:652)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:505)
    at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:404)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:368)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
[  18854]  ERROR - com.intellij.ide.IdeEventQueue - IntelliJ IDEA 10.0.3  Build #IU-103.255
[  18854]  ERROR - com.intellij.ide.IdeEventQueue - JDK: 1.6.0_23
[  18854]  ERROR - com.intellij.ide.IdeEventQueue - VM: Java HotSpot(TM) 64-Bit Server VM
[  18854]  ERROR - com.intellij.ide.IdeEventQueue - Vendor: Sun Microsystems Inc.
[  18854]  ERROR - com.intellij.ide.IdeEventQueue - OS: Windows 7
[  18854]  ERROR - com.intellij.ide.IdeEventQueue - Last Action:


UPDATE 2:

I finally got this working! Turns out that "util.jar" is also an IDEA library that had to be removed. With the removal of that library everything is now working. Hope this helps someone out there.... :)



Attachment(s):
list.png
plugins.png

Please sign in to leave a comment.