|
|
|
|
Re: JavaIoFileSystemAccess - null pointer [message #1053366 is a reply to message #1053364] |
Sat, 04 May 2013 16:04 |
|
Hi,
are you sure you create the access with guice? and what does that has todo with Xtext version?
the class is contained in the org.eclipse.xtext-xxxxjar.
i have no idea what you do in your classloading.
i have no idea how you use the JavaIoFileSystemAccess, where you use it aso.
so a bit more of context of what you are exactly doing
(example code) would help
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
Re: JavaIoFileSystemAccess - null pointer [message #1053367 is a reply to message #1053366] |
Sat, 04 May 2013 16:26 |
Bruce L. Messages: 81 Registered: June 2011 |
Member |
|
|
Thanks for the reply
No, I am NOT using guice.
I don't want to do it, it is not necessary with org.eclipse.xtext_2.2.1... .jar (I never used guice for JavaIoFileSystemAccess before, and it always worked)
As I said, a trivial code such as this
public static void main(String[] args) {
JavaIoFileSystemAccess fileWriter = new JavaIoFileSystemAccess();
fileWriter.setOutputPath("out");
fileWriter.generateFile("bla", "content");
return;
}
reproduces the problem, i.e. raises the null pointer exception
The classpath of my project is very simple, it includes some external jars, including org.eclipse.xtext_2.2.1... .jar
The project (let me call it 'P') is a regular java project, where i want to use the code generator of a DSL of mine; therefore the project depends on some xtext jars. It also has a dependency on my DSL project (a "project reference" in Eclipse)
I have the feeling that Eclipse is "linking" my project with org.eclipse.xtext_2.3.1... .jar even though the classpath is configured with the version 2.2.1 of the jar
Maybe the problem is that the DSL project is actually using the 2.3.1 jars (this is the default "plugin dependencies", in the project properties), so maybe it overrides the classpath of 'P'.
Hope this gives you a little bit more of context info
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02920 seconds