On Monday, March 25, 2013 1:25:29 AM UTC+1, Kris wrote:
>
> GWT 2.5.1
> Maven 3.0.4
>
> Hi, suddenly I get this error, and I google it for a while now, and can 
> see others had the problem.
> But no solution... 
>
> * java.lang.NullPointerException*
> *[ERROR]  at 
> com.google.gwt.dev.util.DiskCache.transferToStream(DiskCache.java:187)*
> *[ERROR]  at 
> com.google.gwt.dev.util.DiskCacheToken.writeObject(DiskCacheToken.java:91)
> *
> *[ERROR]  at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)*
> *[ERROR]  at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> *
>

The only reason this can happen is if the JVM is shutting down while 
threads are trying to write to the DiskCache, which would be abnormal.
And indeed it is: your problem is not this NPE, it's an internal compiler 
error:
[INFO] [ERROR] Unexpected internal compiler error
[INFO] java.lang.NoSuchFieldError: warningThreshold
[INFO]  at 
com.google.gwt.dev.javac.JdtCompiler.getCompilerOptions(JdtCompiler.java:413)

And this NoSuchFieldError can only happen if you have JDT/ECJ in your 
classpath (from a version incompatible with the one bundled within GWT).

You're best option is to use separate client and server code in distinct 
artifacts (see https://github.com/tbroyer/gwt-maven-archetypes for 
examples, 
https://groups.google.com/d/topic/codehaus-mojo-gwt-maven-plugin-users/vrLAcqp5oAg/discussion
 
for the rationale; see also 
https://plus.google.com/113945685385052458154/posts/RDrK7ukVFqJ if you're 
OK to try alpha software) but a short-term solution is to use 
gwtSdkFirstInClasspath: 
http://mojo.codehaus.org/gwt-maven-plugin/compile-mojo.html#gwtSdkFirstInClasspath

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to