Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Error while compiling GWT module got IncompatibleClassChangeError

    Hi,

    Am upgrading GWT-2.4/smartgwt-3.0 to GWT-2.6.1/smartgwt-4.0 but while compiling gwt through eclipse i got error posted below.

    Code:
    Compiling module com.fisglobal.rtaof.rtaofclient.RtaofClient
       Validating units:
          Ignored 2 units with compilation errors in first pass.
    Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
       [ERROR] An internal compiler exception occurred
    com.google.gwt.dev.jjs.InternalCompilerException: Unexpected error during visit.
    	at com.google.gwt.dev.jjs.ast.JVisitor.translateException(JVisitor.java:110)
    	at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:276)
    	at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
    	at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:117)
    	at com.google.gwt.dev.jjs.ast.JCastOperation.traverse(JCastOperation.java:65)
    	at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
    	at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
    	at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
    	at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:117)
    	at com.google.gwt.dev.jjs.ast.JDeclarationStatement.traverse(JDeclarationStatement.java:48)
    	at com.google.gwt.dev.jjs.ast.JModVisitor$ListContextImmutable.traverse(JModVisitor.java:170)
    	at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemoveImmutable(JModVisitor.java:336)
    	at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:83)
    	at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
    	at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
    	at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:138)
    	at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:134)
    	at com.google.gwt.dev.jjs.ast.JMethodBody.traverse(JMethodBody.java:82)
    	at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
    	at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
    	at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
    	at com.google.gwt.dev.jjs.ast.JMethod.visitChildren(JMethod.java:449)
    	at com.google.gwt.dev.jjs.ast.JMethod.traverse(JMethod.java:418)
    	at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
    	at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
    	at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
    	at com.google.gwt.dev.jjs.impl.UnifyAst.mainLoop(UnifyAst.java:940)
    	at com.google.gwt.dev.jjs.impl.UnifyAst.exec(UnifyAst.java:665)
    	at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:672)
    	at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:34)
    	at com.google.gwt.dev.Precompile.precompile(Precompile.java:271)
    	at com.google.gwt.dev.Precompile.precompile(Precompile.java:223)
    	at com.google.gwt.dev.Precompile.precompile(Precompile.java:139)
    	at com.google.gwt.dev.Compiler.run(Compiler.java:167)
    	at com.google.gwt.dev.Compiler.run(Compiler.java:132)
    	at com.google.gwt.dev.Compiler$1.run(Compiler.java:99)
    	at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:55)
    	at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:50)
    	at com.google.gwt.dev.Compiler.main(Compiler.java:106)
    Caused by: java.lang.IncompatibleClassChangeError: Found interface com.google.gwt.core.ext.typeinfo.JClassType, but class was expected
    	at com.google.gwt.maps.jsio.rebind.JSWrapperGenerator.generate(JSWrapperGenerator.java:277)
    	at com.google.gwt.core.ext.IncrementalGenerator.generateNonIncrementally(IncrementalGenerator.java:40)
    	at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:676)
    	at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)
    	at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:79)
    	at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:276)
    	at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:265)
    	at com.google.gwt.dev.DistillerRebindPermutationOracle.getAllPossibleRebindAnswers(DistillerRebindPermutationOracle.java:91)
    	at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.handleGwtCreate(UnifyAst.java:387)
    	at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.handleMagicMethodCall(UnifyAst.java:465)
    	at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.endVisit(UnifyAst.java:255)
    	at com.google.gwt.dev.jjs.ast.JMethodCall.traverse(JMethodCall.java:244)
    	at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
    	at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
    	... 37 more
          [ERROR] at MapImpl.java(45): GWT.create(MapImpl.class)
             com.google.gwt.dev.jjs.ast.JMethodCall
          [ERROR] at MapImpl.java(45): (MapImpl) GWT.create(MapImpl.class)
             com.google.gwt.dev.jjs.ast.JCastOperation
          [ERROR] at MapImpl.java(45): final static MapImpl impl = (MapImpl) GWT.create(MapImpl.class)
             com.google.gwt.dev.jjs.ast.JDeclarationStatement
          [ERROR] at MapImpl.java(41): {
      final static MapImpl impl = (MapImpl) GWT.create(MapImpl.class);
    }
             com.google.gwt.dev.jjs.ast.JBlock
          [ERROR] at MapImpl.java(41): {
      final static MapImpl impl = (MapImpl) GWT.create(MapImpl.class);
    }
             com.google.gwt.dev.jjs.ast.JMethodBody
          [ERROR] at MapImpl.java(41): private static final void $clinit();
    
             com.google.gwt.dev.jjs.ast.JMethod
    also am using gwt-log-3.3.0
    gwt-maps-1.1.0
    java 1.7

    #2
    Guys, any updates ?

    Comment


      #3
      Hi umeshwiki

      in case of such an error always make sure to
      - run a "clean"
      - delete GWT unitcache files
      - run a "build"

      Basically: Get rid of all generated / automatically copied files.

      If you did so, write that, because this will be the first hint anyway. Also always include the full SmartGWT version.

      Best regards,
      Blama

      Comment


        #4
        Hi Blama,

        Thanks for your reply, i did but still having same issue. Is that need to change the version on gwt-map.jar ? and whet do you mean by full version of smartgwt version ?. I did downloaded from one of the site available freely bith gwt/smartgwt versions.


        Thanks,

        Comment


          #5
          Hi umeshwiki,

          I meant the nightly version you use. From the Smartclient homepage (http://www.smartclient.com/product/download.jsp) you always get the most current one. If you grab a licensed version from http://smartclient.com/builds/SmartGWT you can see the build date in the path. You can also see it in the developer console or at server start-up (Pro version or better) in the server logs.

          Regarding gwt-map.jar I can't help.

          Otherwise: You could try to switch to newer GWT first and if it works to newer SmartGWT - or vice versa. I'd think that the GWT change here is the bigger one and seems more related to an AST error during compile.

          Please note that for both versions you are not using the most current release:
          I'm pretty sure that Isomorphic will suggest using at least SmartGWT 4.1p or 5.0p.
          For GWT I'm not sure if GWT 2.7 is already recommended. A switch to GWT 2.7 will be more complicated than a switch to 2.6.1 (because of the Development Mode / SuperDevMode switch).

          Best regards,
          Blama

          Comment


            #6
            GWT 2.7.0 is not recommended at this time due to lack of support for script tags in module definitions.
            http://forums.smartclient.com/showth...t=31789&page=2

            Comment

            Working...
            X