Plugin - working in debug, but not in production

Answered

Hi there,

I created a plugin and it works fine, when I debug it.

 

    path\JetBrains\WebStorm 2016.1.1

 

Then I build it [prepare all plugin modules] and install it inside Webstorm and it crashes:

 

    Cannot load project: com.intellij.ide.plugins.PluginManager$StartupAbortedException: com.intellij.diagnostic.PluginException: myPlugin.FileOpenedProjectComponent PluginClassLoader[myPlugin, 1.0] [Plugin: myPlugin]

 

When I build the plugin from my other computer (Professional Edition) it all worked.

Now that I build it from the Community Edition it's not working.

 

Any idea? Need more information?

Kurt

8 comments
Comment actions Permalink

Please share the complete error log with the stacktrace. Can you also share the plugin so that we can check it?

0
Comment actions Permalink

How do I get the stacktrace?

0
Comment actions Permalink

Here is the stacktrace:

2016-05-18 09:51:54,210 [  35271]  ERROR - m.PlatformProjectOpenProcessor - WebStorm 2016.1.2  Build #WS-145.971.23
2016-05-18 09:51:54,210 [ 35271] ERROR - m.PlatformProjectOpenProcessor - JDK: 1.8.0_77
2016-05-18 09:51:54,210 [ 35271] ERROR - m.PlatformProjectOpenProcessor - VM: Java HotSpot(TM) Server VM
2016-05-18 09:51:54,210 [ 35271] ERROR - m.PlatformProjectOpenProcessor - Vendor: Oracle Corporation
2016-05-18 09:51:54,210 [ 35271] ERROR - m.PlatformProjectOpenProcessor - OS: Windows 10
2016-05-18 09:51:54,210 [ 35271] ERROR - m.PlatformProjectOpenProcessor - Last Action:
2016-05-18 09:51:59,196 [ 40257] INFO - ellij.project.impl.ProjectImpl - 15 project components initialized in 124 ms
2016-05-18 09:51:59,196 [ 40257] INFO - le.impl.ModuleManagerComponent - 0 module(s) loaded in 0 ms
2016-05-18 09:52:13,597 [ 54658] INFO - roject.impl.ProjectManagerImpl - com.intellij.diagnostic.PluginException: myPlugin.FileOpenedProjectComponent PluginClassLoader[de.mgd.sapui5MVColors, 1.0] [Plugin: de.mgd.sapui5MVColors]
com.intellij.ide.plugins.PluginManager$StartupAbortedException: com.intellij.diagnostic.PluginException: myPlugin.FileOpenedProjectComponent PluginClassLoader[de.mgd.sapui5MVColors, 1.0] [Plugin: de.mgd.sapui5MVColors]
at com.intellij.ide.plugins.PluginManager.handleComponentError(PluginManager.java:251)
at com.intellij.openapi.components.impl.PlatformComponentManagerImpl.handleInitComponentError(PlatformComponentManagerImpl.java:43)
at com.intellij.openapi.components.impl.ComponentManagerImpl.a(ComponentManagerImpl.java:432)
at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:96)
at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:90)
at com.intellij.openapi.project.impl.ProjectImpl.init(ProjectImpl.java:282)
at com.intellij.openapi.project.impl.ProjectManagerImpl.a(ProjectManagerImpl.java:231)
at com.intellij.openapi.project.impl.ProjectManagerImpl.access$300(ProjectManagerImpl.java:68)
at com.intellij.openapi.project.impl.ProjectManagerImpl$8.compute(ProjectManagerImpl.java:531)
at com.intellij.openapi.project.impl.ProjectManagerImpl$8.compute(ProjectManagerImpl.java:527)
at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:198)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:563)
at com.intellij.openapi.progress.impl.CoreProgressManager$8.run(CoreProgressManager.java:357)
at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:142)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:446)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:392)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:127)
at com.intellij.openapi.application.impl.ApplicationImpl$13$1.run(ApplicationImpl.java:633)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:369)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.intellij.diagnostic.PluginException: myPlugin.FileOpenedProjectComponent PluginClassLoader[de.mgd.sapui5MVColors, 1.0] [Plugin: de.mgd.sapui5MVColors]
... 25 more
Caused by: java.lang.ClassNotFoundException: myPlugin.FileOpenedProjectComponent PluginClassLoader[de.mgd.sapui5MVColors, 1.0]
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:64)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at com.intellij.openapi.components.impl.ComponentManagerImpl.a(ComponentManagerImpl.java:412)
... 22 more
0
Comment actions Permalink
myPlugin.FileOpenedProjectComponent

is not present in plug-in distribution. Are you sure it's packaged properly? Attach a sample project to reproduce.

0
Comment actions Permalink

seems I did not replace some parts of the trace. I tried to replace de.mgd.sapui5MVColor with myPlugin

Sorry about that

0
Comment actions Permalink

But it works, when I debug the plugin. why not when build it?

0
Comment actions Permalink

Packaging may be different for debug and production. Check the target jars.

-1

Please sign in to leave a comment.