I had the exact same problem yesterday.
When switching from 3.6.1 to 3.7 i got the same error:
VerifyError Error #1079: Native methods are not allowed in loaded
code.

Compilation goes fine, but running unit tests or starting the
application gives this error.
Going back to 3.6.1 fixes the error.
I have a relative simple project that uses flex 4.
building with maven with stacktraces turned on gives the following
result:

org.apache.maven.lifecycle.LifecycleExecutionException: Accept timed
outC:\workspaces 3.5\flocks\flocksFlexDefault\target\test-classes
\TestRunner.swf
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:
719)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:
556)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:
535)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:
387)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.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: Accept
timed outC:\workspaces 3.5\flocks\flocksFlexDefault\target\test-classes
\TestRunner.swf
        at
org.sonatype.flexmojos.test.FlexUnitMojo.tearDown(FlexUnitMojo.java:
315)
        at
org.sonatype.flexmojos.test.FlexUnitMojo.execute(FlexUnitMojo.java:
165)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:
490)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:
694)
        ... 17 more
Caused by: org.sonatype.flexmojos.test.TestRunnerException: Accept
timed outC:\workspaces 3.5\flocks\flocksFlexDefault\target\test-classes
\TestRunner.swf
        at
org.sonatype.flexmojos.test.DefaultTestRunner.run(DefaultTestRunner.java:
87)
        at
org.sonatype.flexmojos.test.FlexUnitMojo.run(FlexUnitMojo.java:279)
        at
org.sonatype.flexmojos.test.FlexUnitMojo.execute(FlexUnitMojo.java:
164)
        ... 19 more
Caused by: java.net.SocketTimeoutException: Accept timed out
        at java.net.PlainSocketImpl.socketAccept(Native Method)
        at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:390)
        at java.net.ServerSocket.implAccept(ServerSocket.java:453)
        at java.net.ServerSocket.accept(ServerSocket.java:421)
        at
org.sonatype.flexmojos.test.monitor.AbstractSocketThread.openClientSocket(AbstractSocketThread.java:
124)
        at
org.sonatype.flexmojos.test.monitor.AbstractSocketThread.run(AbstractSocketThread.java:
62)
        at java.lang.Thread.run(Thread.java:619)

But that's just because the flashplayer runs into an exception while
running the unit tests.
Googling the error seems to indicate a problem with the rsl libraries.
But playing around with the playerglobal for instance doesn't seem to
help.
I've reverted back to 3.6.1 for now and that solves the problem.

For reference i'll paste my pom file:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://
www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://
maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>
  <modelVersion>4.0.0</modelVersion>

  <groupId>example</groupId>
  <artifactId>DefaultFlex</artifactId>
  <version>0.1</version>
  <packaging>swf</packaging>

  <name>DefaultFlex Project</name>

  <properties>
        <flex.framework.version>4.0.0.14159</flex.framework.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <build>
    <sourceDirectory>src/main/flex</sourceDirectory>
    <testSourceDirectory>src/test/flex</testSourceDirectory>
    <plugins>
      <plugin>
        <groupId>org.sonatype.flexmojos</groupId>
        <artifactId>flexmojos-maven-plugin</artifactId>
        <version>3.7</version>
        <extensions>true</extensions>
                <configuration>
                        <sourceFile>Main.mxml</sourceFile>
                        <targetPlayer>10.0.45</targetPlayer>
                        <definesDeclaration>
                                <property>
                                <name>BUILD::buildNumber</name>
                                        
<value>"${project.version}-${BUILD_NUMBER}"</value>
                                </property>
                </definesDeclaration>
                </configuration>

                <dependencies>

          <dependency>
            <groupId>com.adobe.flex</groupId>
            <artifactId>compiler</artifactId>
            <version>${flex.framework.version}</version>
            <type>pom</type>
          </dependency>

        </dependencies>

      </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>com.adobe.flex.framework</groupId>
      <artifactId>flex-framework</artifactId>
      <version>${flex.framework.version}</version>
      <type>pom</type>
    </dependency>

    <dependency>
        <groupId>com.adobe.flex.framework</groupId>
        <artifactId>playerglobal</artifactId>
        <version>${flex.framework.version}</version>
        <classifier>10</classifier>
        <type>swc</type>
    </dependency>

    <dependency>
      <groupId>com.adobe.flexunit</groupId>
      <artifactId>flexunit</artifactId>
      <version>4.0-rc-1</version>
      <type>swc</type>
      <scope>test</scope>
    </dependency>

  </dependencies>

</project>


On 1 jun, 14:09, Marvin Froeder <[email protected]> wrote:
> mvn -e
>
> On Tue, Jun 1, 2010 at 9:07 AM, Marcello Teodori <[email protected]
>
>
>
> > wrote:
> > To me, compilation is ok but it complains when the copy-flex-mojos
> > goal gets called and this is only using 3.0-beta-1, 2.2.0 is ok:
>
> > [ERROR] Failed to execute goal org.sonatype.flexmojos:flexmojos-maven-
> > plugin:3.7:copy-flex-resources (default) on project
> > cobevo4_java_webapp: A type incompatibility occured while executing
> > org.sonatype.flexmojos:flexmojos-maven-plugin:3.7:copy-flex-resources:
> > com.boxysystems.jgoogleanalytics.JGoogleAnalyticsTracker cannot be
> > cast to com.boxysystems.jgoogleanalytics.JGoogleAnalyticsTracker
>
> > --m
>
> > On Jun 1, 11:17 am, stephanos <[email protected]> wrote:
> > > Well, I got the very same error message. Also using Flash player v10,
> > > downgrading to 3.6.1 makes it go away.
> > > Obviously something is wrong with 3.7. Don't know how I / we can help
> > > ("narrow it down") - suggestions welcome.
>
> > > Cheers,
> > > stephanos
>
> > > On May 29, 3:09 pm, Marvin Froeder <[email protected]> wrote:
>
> > > > No idea, if you want me to take a look you need to narrow down the
> > problem
> > > > first.
>
> > > > Sent from DROID
>
> > > > Em 29/05/2010 08:01, "SimonW" <[email protected]>escreveu:
>
> > > > Hi all,
>
> > > > I have a relatively complex Flex (SDK 4.0) project with several
> > > > Library projects, a module project and some Flex projects.
>
> > > > By now I used Flexmojos 3.6 and 3.6.1 to build the project. Today I
> > > > have tried out the new Flexmojos 3.7 version (thanks for that!),
> > > > however I am able to reproduce an issue: The project actually compiles
> > > > successfully, but once I launch the application, I retrieve this Flash
> > > > Builder error:
>
> > > > VerifyError Error #1079: Native methods are not allowed in loaded
> > > > code.
>
> > > > When I switch back to Flexmojos 3.6.1, everything is fine and the
> > > > application runs properly.
>
> > > > Here is a sample POM of one of the Flex apps:
>
> > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > <project xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="
> >http://www.w3.org/2001/XMLSchema-instance";
> > > >        xsi:schemaLocation="
> >http://maven.apache.org/POM/4.0.0http://maven.apache.org/maven-v4_0_0...";>
> > > > ...
> > > > ...
> > > > ...
> > > > ...
>
> > > >        <build>
> > > >                <sourceDirectory>src/main/flex</sourceDirectory>
> > > >                <testSourceDirectory>src/test/flex</testSourceDirectory>
>
> > > >                <resources>
> > > >                        <resource>
>
> >  <directory>src/main/resources</directory>
> > > >                        </resource>
> > > >                        <resource>
> > > >                                <directory>src/main/flex</directory>
> > > >                        </resource>
> > > >                </resources>
>
> > > >                <plugins>
> > > >                        <plugin>
>
> >  <groupId>org.sonatype.flexmojos</groupId>
>
> > > >  <artifactId>flexmojos-maven-plugin</artifactId>
> > > >                                <version>${flexmojos.version}</version>
> > > >                                <extensions>true</extensions>
> > > >                                <configuration>
>
> > > >                                        <compiledLocales>
> > > >                                                <locale>en_US</locale>
> > > >                                                <locale>de_DE</locale>
> > > >                                        </compiledLocales>
>
> > > >  <mergeResourceBundle>true</mergeResourceBundle>
> > > >                                        <accessible>true</accessible>
> > > >                                        <optimize>true</optimize>
>
> >  <targetPlayer>10.0.0</targetPlayer>
>
> >  <showWarnings>true</showWarnings>
> > > >                                        <linkReport>true</linkReport>
>
> > > >  <allowSourcePathOverlap>true</allowSourcePathOverlap>
>
> >  <contextRoot>test-web</contextRoot>
>
> >  <sourceFile>Main.mxml</sourceFile>
> > > >                                        <output>Test.swf</output>
> > > >                                </configuration>
>
> > > >                                <dependencies>
> > > >                                        <dependency>
>
> > > >  <groupId>com.adobe.flex</groupId>
>
> > > >  <artifactId>compiler</artifactId>
>
> > > >  <version>${flex4.sdk}</version>
> > > >                                                <type>pom</type>
> > > >                                        </dependency>
> > > >                                </dependencies>
> > > >                        </plugin>
> > > >                </plugins>
> > > >        </build>
>
> > > >        <dependencies>
> > > >                <dependency>
> > > >                        <groupId>com.adobe.flex.framework</groupId>
> > > >                        <artifactId>flex-framework</artifactId>
> > > >                        <version>${flex4.sdk}</version>
> > > >                        <type>pom</type>
> > > >                </dependency>
> > > >                <dependency>
> > > >                        <groupId>com.adobe.flex.framework</groupId>
> > > >                        <artifactId>framework</artifactId>
> > > >                        <version>${flex4.sdk}</version>
> > > >                        <type>swc</type>
> > > >                </dependency>
> > > >                <dependency>
> > > >                        <groupId>com.adobe.flex.framework</groupId>
> > > >                        <artifactId>rpc</artifactId>
> > > >                        <version>${flex4.sdk}</version>
> > > >                        <type>rb.swc</type>
> > > >                        <classifier>en_US</classifier>
> > > >                </dependency>
>
> > > >                <dependency>
> > > >                        <groupId>com.adobe.flex.framework</groupId>
> > > >                        <artifactId>sparkskins</artifactId>
> > > >                        <version>${flex4.sdk}</version>
> > > >                        <type>swc</type>
> > > >                        <scope>theme</scope>
> > > >                </dependency>
> > > >                <dependency>
> > > >                        <groupId>com.adobe.flex.framework</groupId>
> > > >                        <artifactId>spark</artifactId>
> > > >                        <version>${flex4.sdk}</version>
> > > >                        <type>swc</type>
> > > >                </dependency>
> > > >        </dependencies>
>
> > > >        <profiles>
> > > >                <profile>
> > > >                        <id>m2e</id>
> > > >                        <activation>
> > > >                                <property>
> > > >                                        <name>m2e.version</name>
> > > >                                </property>
> > > >                        </activation>
> > > >                        <build>
> > > >                                <plugins>
> > > >                                        <plugin>
>
> > > >  <groupId>org.maven.ide.eclipse</groupId>
>
> > > >  <artifactId>lifecycle-mapping</artifactId>
>
> > > >  <version>0.9.9-SNAPSHOT</version>
> > > >                                                <configuration>
>
> > > >  <mappingId>customizable</mappingId>
> > > >                                                        <configurators>
>
> >  <configurator
> > > > id="org.maven.ide.eclipse.configuration.flex.configurator" />
> > > >                                                        </configurators>
> > > >                                                        <mojoExecutions>
>
> > > >  <mojoExecution>org.apache.maven.plugins:maven-resources-
> > > > plugin::</mojoExecution>
>
> >  </mojoExecutions>
> > > >                                                </configuration>
> > > >                                        </plugin>
> > > >                                </plugins>
> > > >                                <pluginManagement>
> > > >                                        <plugins>
> > > >                                                <plugin>
>
> > > >  <groupId>org.apache.maven.plugins</groupId>
>
> > > >  <artifactId>maven-resources-plugin</artifactId>
>
> > > >  <version>2.4.3</version>
> > > >                                                </plugin>
> > > >                                        </plugins>
> > > >                                </pluginManagement>
> > > >                        </build>
> > > >                </profile>
> > > >        </profiles>
> > > > </project>
>
> > > > Is this a bug (because it is reproducable)? Or is the POM wrong?
>
> > > > Thanks!
> > > > Simon
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Flex Mojos" group.
> > > > To post to this group, send email to [email protected]
> > > > To unsubscribe from this group, send email to
> > > > [email protected]<flex-mojos%2bunsubscr...@googlegrou
> > > >  ps.com>
> > <flex-mojos%2bunsubscr...@googlegrou ps.com>
> > > > For more options, visit this group athttp://
> > groups.google.com/group/flex-mojos
>
> > > >http://flexmojos.sonatype.org/
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Flex Mojos" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]<flex-mojos%2bunsubscr...@googlegrou 
> > ps.com>
> > For more options, visit this group at
> >http://groups.google.com/group/flex-mojos
>
> >http://flexmojos.sonatype.org/

-- 
You received this message because you are subscribed to the Google
Groups "Flex Mojos" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/flex-mojos

http://flexmojos.sonatype.org/

Reply via email to