4 Replies Latest reply on Mar 20, 2010 4:52 AM by Shailesh S. Gokhale

    IncompatibleClassChangeError -  Expecting non-static method ...

    Shailesh S. Gokhale

      Hi,

       

      I am trying to setup a flex-client maven project as described in the article http://www.adobe.com/devnet/flex/articles/fullstack_pt1.html

       

      The intended architecture is to have a flex client with BlazeDS integrating with Spring/ Hibernate. I have setup the maven pom.xml for the parent as well as the client projects as described in the article.

       

      When I try to build the parent project with 'mvn clean install' I get the following error.

       

      --- BEGIN Error Message ---

      [FATAL ERROR] Container realm = plexus.core

      urls[0] = file:/C:/apache-maven-2.2.1/bin/../lib/maven-2.2.1-uber.jar

      [INFO] ------------------------------------------------------------------------

      [ERROR] FATAL ERROR

      [INFO] ------------------------------------------------------------------------

      [INFO] Expecting non-static method macromedia.asc.semantics.FlowAnalyzer.inheritContextSlots(Lmacromedia/asc/semantics/Objec tValue;Lmacromedia/asc/semantics/ObjectValue;Lmacromedia/asc/semantics/Builder;Lma

      [INFO] ------------------------------------------------------------------------

      [INFO] Trace

      java.lang.IncompatibleClassChangeError: Expecting non-static method macromedia.asc.semantics.FlowAnalyzer.inheritContextSlots(Lmacromedia/asc/semantics/Objec tValue;Lmacromedia/asc/semantics/ObjectValue;Lmacromedia/asc/semantics/Builder;Lma

              at flex2.compiler.abc.Compiler.inheritSlots(Compiler.java:511)

              at flex2.compiler.abc.Compiler.analyze2(Compiler.java:304)

              at flex2.compiler.API.analyze(API.java:2523)

              at flex2.compiler.API.analyze(API.java:2423)

              at flex2.compiler.API.batch2(API.java:386)

              at flex2.compiler.API.batch(API.java:1108)

              at flex2.compiler.API.compile(API.java:1281)

              at flex2.tools.oem.Application.compile(Application.java:1028)

              at flex2.tools.oem.Application.recompile(Application.java:980)

              at flex2.tools.oem.Application.compile(Application.java:636)

              at flex2.tools.oem.Application.build(Application.java:413)

              at info.rvin.mojo.flexmojo.compiler.AbstractFlexCompilerMojo.build(AbstractFlexCompilerMojo. java:1555)

              at info.rvin.mojo.flexmojo.compiler.AbstractFlexCompilerMojo.run(AbstractFlexCompilerMojo.ja va:835)

              at info.rvin.mojo.flexmojo.AbstractIrvinMojo.execute(AbstractIrvinMojo.java:144)

              at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)

              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor .java:694)

              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifec ycleExecutor.java:556)

              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor. java:535)

              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultL ifecycleExecutor.java:387)

              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleE xecutor.java:348)

              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java :180)

              at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)

              at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)

              at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)

              at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              at java.lang.reflect.Method.invoke(Method.java:597)

              at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)

              at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)

              at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

              at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

      ---- END Error Message ----

       

      Following are the dependency entries in the client pom.xml

       

      --- BEGIN pom.xml Entries ---

       

      <build>

          <sourceDirectory>src/main/flex</sourceDirectory>

          <defaultGoal>install</defaultGoal>

          <plugins>

      <plugin>

      <groupId>info.rvin.mojo</groupId>

      <artifactId>flex-compiler-mojo</artifactId>

      <version>1.0-beta8</version>

      <extensions>true</extensions>

      <configuration>

      <locales>

      <param>en_US</param>

      </locales>

      </configuration>

      <dependencies>

      <dependency>

      <groupId>com.adobe.flex.compiler</groupId>

      <artifactId>swfutils</artifactId>

      <version>3.2.0.3958</version>

      </dependency>

      <dependency>

      <groupId>com.adobe.flex.compiler</groupId>

      <artifactId>flex-messaging-common</artifactId>

      <version>3.2.0.3958</version>

      </dependency>

      <dependency>

      <groupId>com.adobe.flex.compiler</groupId>

      <artifactId>asc</artifactId>

      <version>3.2.0.3958</version>

      </dependency>

      <dependency>

      <groupId>org.apache.velocity</groupId>

      <artifactId>velocity</artifactId>

      <version>1.5</version>

      </dependency>

      <dependency>

      <groupId>org.w3c.css</groupId>

      <artifactId>sac</artifactId>

      <version>1.3</version>

      </dependency>

      </dependencies>

      </plugin>

          </plugins>

        </build>

       

      ---- End pom.xml Entries ----

       

      Am I missing something? Please suggest.

       

      Thanks

      Shailesh S. Gokhale

        • 2. Re: IncompatibleClassChangeError -  Expecting non-static method ...
          Shailesh S. Gokhale Level 1

          Hey ! Thanks for the information.

           

          Flexmojos 3.6 seems to have resolved many issues. I am now getting the following errors.

           

          -- begin error messages --

           

          [ERROR] Unable to resolve resource bundle "core" for locale "en_US".
          [ERROR] Unable to resolve resource bundle "core" for locale "en_US".
          [ERROR] Unable to resolve resource bundle "skins" for locale "en_US".
          [ERROR] Unable to resolve resource bundle "core" for locale "en_US".
          [ERROR] Unable to resolve resource bundle "effects" for locale "en_US".
          [ERROR] Unable to resolve resource bundle "core" for locale "en_US".
          [ERROR] Unable to resolve resource bundle "containers" for locale "en_US".
          [ERROR] Unable to resolve resource bundle "styles" for locale "en_US".
          [ERROR] Unable to resolve resource bundle "core" for locale "en_US".
          [ERROR] Unable to resolve resource bundle "skins" for locale "en_US".
          [INFO] ------------------------------------------------------------------------
          [ERROR] BUILD ERROR
          [INFO] ------------------------------------------------------------------------
          [INFO] Error compiling!
          [INFO] ------------------------------------------------------------------------
          [INFO] Trace
          org.apache.maven.lifecycle.LifecycleExecutionException: Error compiling!
                  at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor .java:719)
                  at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifec ycleExecutor.java:556)
                  at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor. java:535)
                  at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultL ifecycleExecutor.java:387)
                  at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleE xecutor.java:348)
                  at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java :180)
                  at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
                  at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
                  at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
                  at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:597)
                  at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
                  at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
                  at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
                  at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
          Caused by: org.apache.maven.plugin.MojoExecutionException: Error compiling!
                  at org.sonatype.flexmojos.compiler.AbstractFlexCompilerMojo.build(AbstractFlexCompilerMojo.j ava:2495)
                  at org.sonatype.flexmojos.compiler.AbstractFlexCompilerMojo.run(AbstractFlexCompilerMojo.jav a:1282)
                  at org.sonatype.flexmojos.AbstractIrvinMojo.execute(AbstractIrvinMojo.java:183)
                  at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
                  at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor .java:694)
                  ... 17 more

           

          --- end error messages ---

           

          I have deleted and reinstalled (manually - as maven is not able to locate the file on the repository) "framework-3.0.0.3.0.0.477-en_US.rb.swc". I am new to flex and am trying to get flex/ blazeds/ spring/ hibernate/ mysql up and running. Please advise.

           

          Thanks

          Shailesh S. Gokhale

          • 4. Re: IncompatibleClassChangeError -  Expecting non-static method ...
            Shailesh S. Gokhale Level 1

            Hi,

             

            Sorry for being naive but this is what transpired since the last post to this thread.

             

            After several attempts to get my mxml's compiled (the persistent problem was that the compiler was not able to resolve the resource bundles for the framework components) I finally decided to extract the properties files (core, containers, collections et al.) into the src/main/locales/en_US directory.

             

            Having done this the build is now successful. My final question (hopefully) on this thread will be - what is it that I could be missing that made the compiler not to locate the resource bundles from the framework-3.0.0.3.0.0.477-en_US.rb.swc file which is also mentioned as a dependency in the pom.xml.

             

            Some  explanation would help - especially since I think I have done everything that the documentation suggests (or have I ?!)

             

            Thanks

            Shailesh S. Gokhale