You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to instrument classes from an Eclipse plug-in. I tried first from a simple Maven project and it worked well, but within the Eclipse plug-in environment I get the following stack trace:
Caused by: java.lang.NullPointerException
at org.eclipse.jdt.internal.compiler.batch.FileSystem.<init>(FileSystem.java:141)
at org.eclipse.jdt.internal.compiler.batch.Main.getLibraryAccess(Main.java:3086)
at spoon.support.compiler.jdt.JDTBatchCompiler.getUnits(JDTBatchCompiler.java:107)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.buildUnits(JDTBasedSpoonCompiler.java:410)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.buildUnitsAndModel(JDTBasedSpoonCompiler.java:372)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.buildSources(JDTBasedSpoonCompiler.java:348)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.build(JDTBasedSpoonCompiler.java:119)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.build(JDTBasedSpoonCompiler.java:102)
at spoon.Launcher.buildModel(Launcher.java:700)
at spoon.Launcher.run(Launcher.java:651)
at cl2t.instrumentation.instrumenters.SpoonInstrumenter.instrumentTarget(SpoonInstrumenter.java:51)
at cl2t.Cl2tRunner.lambda$1(Cl2tRunner.java:69)
at java.util.ArrayList.forEach(ArrayList.java:1249)
at cl2t.Cl2tRunner.run(Cl2tRunner.java:69)
at cl2t.handlers.DiscoveryHandler.execute(DiscoveryHandler.java:35)
at cl2t.handlers.StatementHandler.execute(StatementHandler.java:22)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:295)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
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 org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
... 37 more
What I'm doing is this:
launcher = new Launcher();
launcher.setArgs(new String[]{"--output-type", "nooutput"})
String classFile = InstrumentationUtils.getSrcFile(target);
File file = new File(classFile);
System.out.println(file.exists()); //true
FileSystemFile fsf = new FileSystemFile(file);
launcher.addInputResource(fsf);
launcher.addProcessor(new CompileProcessor());
launcher.run();
When running on debug, I saw that the error comes from the following line in the FileSystem class:
protected FileSystem(Classpath[] paths, String[] initialFileNames, boolean annotationsFromClasspath) {
final int length = paths.length; //paths = null
...
Should I add other command line options or is this the same bug as the 2 other issues #1191 and #1116 ?
Best Regards,
Thibault
The text was updated successfully, but these errors were encountered:
Hello,
I'm trying to instrument classes from an Eclipse plug-in. I tried first from a simple Maven project and it worked well, but within the Eclipse plug-in environment I get the following stack trace:
What I'm doing is this:
When running on debug, I saw that the error comes from the following line in the FileSystem class:
Should I add other command line options or is this the same bug as the 2 other issues #1191 and #1116 ?
Best Regards,
Thibault
The text was updated successfully, but these errors were encountered: