-
1. Re: [Errai 4]Errors and warnings from generated java code
mbarkley May 20, 2016 10:39 AM (in response to hr.stoyanov)Hi Hristo,
Those errors/warnings are happening while Errai attempts to generate your ServerMarshallerFactoryImpl.class file. Your application will work without that file because Errai also supports dynamic marshalling using reflection, but dynamic marshalling is only meant for development so this is worth fixing.
Errai uses the javax.tools.ToolProvider to load a JavaCompiler. We don't explicitly set the source level anywhere and the default for the JDK 8 javac is 1.8 so I am not sure what is happening. Is it possible you have an old tools.jar somewhere that is being found? You can enable logging for the ToolProvider with the "sun.tools.ToolProvider" system property, which might help you figure out which javac it's loading.
-
2. Re: [Errai 4]Errors and warnings from generated java code
hr.stoyanov May 22, 2016 2:29 AM (in response to mbarkley)Max,
1. One easy way to shut up the warnings in the generated sources is to use
@SuppressWarnings("all") or any of the other variants.
2. If you look at line #74 of the output I attached, I explicitly specify -sourceLevel 1.8, which does not help either. I do not have java 7 anywhere, so I am puzzled why the code generation assumes that
I opened an issue for that:
[ERRAI-943] Malformed generated java sources - JBoss Issue Tracker
-
3. Re: [Errai 4]Errors and warnings from generated java code
mbarkley May 24, 2016 11:51 AM (in response to hr.stoyanov)Hristo,
- The warnings only print if there is an error generating the class, so it's usually not an issue.
- That is setting sourceLevel 1.8 for the GWT compiler. This is a javac compilation error.
I tried reproducing this with our tutorial by adding portable types with various combinations of default methods but I did not experience any compilation issues. Without your help creating a reproducer that you can share, there isn't much I can do.
-
4. Re: [Errai 4]Errors and warnings from generated java code
hr.stoyanov May 24, 2016 5:17 PM (in response to mbarkley)Ok, let me try to prepare code example