Just a follow-up -- in case anyone else here ever encounters this issue. I found the root cause.
Running mvn clean gwt:compile fails for me because I now have order- dependency in the build. mvn clean wipes out the classes/* directory gwt:compile then tries to compile the GWT code, but needs classes b/c it tries to resolve the class specified by the @GinModules annotation. I discovered this via a total fluke. I changed some whitespace in the Eclipse IDE and saved, and lo and behold gwt:compile worked from cmd line. I cleaned everything and tried gwt:compile again and it failed. Eclipse auto-build creates the /classes/* folder gwt:compile needs. I just need to fix my pom.xml to get the order straight (compile java classes first, then gwt:compile) Hope this helps anyone else that might run into this subtle issue. On Aug 18, 5:01 pm, davis <davisf...@zenoconsulting.biz> wrote: > Thank god for online source. line 704 of TypeOracleMediator: > > http://code.google.com/p/google-web-toolkit/source/browse/releases/1.... > > if (expectedElementValueType.isArrayType() <-- NPE > > the object is passed into the method from above (line 441-442): > > TypeBinding expectedElementValueType = mvp.binding.returnType; > Object elementValue = getAnnotationElementValue(logger, > expectedElementValueType, expressionValue); > > It seems "mvp.binding.returnType" returns null -- anyone familiar with > GWT code know what might be the root cause? > > On Aug 18, 4:46 pm, davis <davisf...@zenoconsulting.biz> wrote: > > > I just added google-gin to my project. I set it up and configured it > > properly, and I've been running hosted mode all day, and it has been > > doing DI just fine -- as expected. > > > However, now when I try to compile, I get this stack trace: > > > Refreshing TypeOracle > > [INFO] Processing types in compilation unit: file:/C:/SVN/da- > > gwt-webapp/src/main/java/com/example/client/presenter/gin/ > > LoginGinjector.java > > [INFO] Found type 'LoginGinjector' > > [INFO] Resolving annotation '@GinModules > > (com.example.client.presenter.gin.UserModule.class)' > > [INFO] [ERROR] > > [INFO] java.lang.ClassNotFoundException: > > com.example.client.presenter.gin.UserModule > > > which stems from this: > > > [INFO] [ERROR] Unexpected > > [INFO] java.lang.NullPointerException > > [INFO] at > > com.google.gwt.dev.javac.TypeOracleMediator.getAnnotationElementValue > > (TypeOracleMediator.java:704) > > [INFO] at > > com.google.gwt.dev.javac.TypeOracleMediator.createAnnotationInstance > > (TypeOracleMediator.java:442) > > > I am using GWT 1.7.0. A google search showed several others have > > similar issues when annotations are added to their project. > > > I'm using maven to build (codehaus plugin), and it has the correct > > classpath: > > > C:\Program Files\Java\jdk1.6.0_14\jre\bin\java -Xmx512m -classpath > > > "C:\SVN\da-gwt-webapp\war\WEB-INF\classes"; > > "C:\Docume~1\dford\.m2\repository\com\google\gwt\inject\gin\1.0- > > SNAPSHOT\gin-1.0-SNAPSHOT.jar" > > > [other stuff deleted] > > > gin-1.0-SNAPSHOT.jar I built today from SVN revision 109 of google- > > gin. The annotation class for @GinModules does exist in the jar at > > com.google.gwt.inject.client.GinModules > > > I'm at a loss for why this is failing. Can someone help? > > > Thanks! > > > Davis --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~----------~----~----~----~------~----~------~--~---