Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Exception in thread "main" java.lang.reflect.InvocationTargetException #3838

bpillalamarri ·

Hi,

I followed the instructions for creating a new plugin using http://wiki.pmease.com/display/QB70/Write+Your+First+Plugin. However, while executing Step #9 (Let's examine the result by launching QuickBuild through the Bootstrap configuration like below), I get into an error.
Can someone help me to solve the issue please?

Here is the error's stack trace:

2017-10-10 14:27:18,827 INFO - Caching plugin libraries...
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.pmease.quickbuild.bootstrap.Bootstrap.boot(Bootstrap.java:613)
at com.pmease.quickbuild.bootstrap.Bootstrap.main(Bootstrap.java:128)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.pmease.quickbuild.bootstrap.BootstrapUtils.wrapAsUnchecked(BootstrapUtils.java:56)
at com.pmease.quickbuild.equinoxadapter.EquinoxAdapter.startup(EquinoxAdapter.java:61)
... 6 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.pmease.quickbuild.equinoxadapter.EquinoxAdapter.startup(EquinoxAdapter.java:59)
... 6 more
Caused by: java.lang.NoClassDefFoundError: com/example/myplugin/Myplugin (wrong name: com/example/myplugin/MyPlugin)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.pmease.quickbuild.Quickbuild.loadPluginModules(Quickbuild.java:513)
at com.pmease.quickbuild.Quickbuild.start(Quickbuild.java:241)
... 11 more

  • replies 8
  • views 3606
  • stars 0
robinshen ADMIN ·

What is your Eclipse version and JDK version?

bpillalamarri ·

My eclipse version: Eclipse Mars and JDK- JDK1.8

robinshen ADMIN ·

This is tutorial is a bit outdated and we should update it. In "workspace setup" page, please make sure to specify compile level as 1.7 (the tutorial is using 1.6 which is incorrect)

bpillalamarri ·

Hi,

I tried building the plugin with 1.7, still no luck! :-( Please suggest how else can I fix the issue. See attached!

2017-10-12_09-05-27.jpg
bpillalamarri ·

Thanks. Changing the compile environment to 1.7 fixed the issue. I was using 1.8 before. Is there an issue with compiling with 1.8?

robinshen ADMIN ·

1.8 is also fine.

bpillalamarri ·

Hi Robin,

I'm running into this issue again and toggling between 1.7 and 1.8 is not fixing the issue. Any other workarounds?

robinshen ADMIN ·

Make sure your Eclipse version has PDE environment installed, and also clean the project to see if it works.