Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConcurrentModificationException? #363

Open
linkerlin opened this issue Oct 25, 2018 · 9 comments

Comments

@linkerlin
Copy link

commented Oct 25, 2018

[ERROR] Failed to execute goal org.teavm:teavm-maven-plugin:0.5.1:compile (web-client) on project t1: Unexpected error occured: ConcurrentModificationException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.teavm:teavm-maven-plugin:0.5.1:compile (web-client) on project t1: Unexpected error occured
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Unexpected error occured
    at org.teavm.maven.TeaVMCompileMojo.execute (TeaVMCompileMojo.java:111)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: java.util.ConcurrentModificationException
    at java.util.HashMap.computeIfAbsent (HashMap.java:1134)
    at org.teavm.jso.impl.JSTypeHelper.isJavaScriptClass (JSTypeHelper.java:37)
    at org.teavm.jso.impl.JSTypeHelper.examineIfJavaScriptImplementation (JSTypeHelper.java:67)
    at org.teavm.jso.impl.JSTypeHelper.lambda$isJavaScriptImplementation$1 (JSTypeHelper.java:42)
    at java.util.HashMap.computeIfAbsent (HashMap.java:1133)
    at org.teavm.jso.impl.JSTypeHelper.isJavaScriptImplementation (JSTypeHelper.java:42)
    at org.teavm.jso.impl.JSObjectClassTransformer.transformClass (JSObjectClassTransformer.java:74)
    at org.teavm.dependency.DependencyClassSource.findAndTransformClass (DependencyClassSource.java:73)
    at java.util.HashMap.computeIfAbsent (HashMap.java:1133)
    at org.teavm.dependency.DependencyClassSource.get (DependencyClassSource.java:47)
    at org.teavm.dependency.DependencyClassSource.get (DependencyClassSource.java:33)
    at org.teavm.model.ClassReaderSource$2.add (ClassReaderSource.java:81)
    at org.teavm.model.ClassReaderSource$2.<init> (ClassReaderSource.java:54)
    at org.teavm.model.ClassReaderSource.lambda$getAncestors$1 (ClassReaderSource.java:49)
    at java.lang.Iterable.spliterator (Iterable.java:101)
    at org.teavm.model.ClassReaderSource.getAncestors (ClassReaderSource.java:86)
    at org.teavm.model.ClassReaderSource.resolve (ClassReaderSource.java:90)
    at org.teavm.model.ClassHolderSource.resolveMutable (ClassHolderSource.java:33)
    at org.teavm.dependency.DependencyChecker.lambda$new$0 (DependencyChecker.java:87)
    at org.teavm.common.CachedMapper.map (CachedMapper.java:45)
    at org.teavm.dependency.DependencyChecker.linkMethod (DependencyChecker.java:325)
    at org.teavm.vm.TeaVM.entryPoint (TeaVM.java:251)
    at org.teavm.tooling.TeaVMTool.generate (TeaVMTool.java:390)
    at org.teavm.maven.TeaVMCompileMojo.execute (TeaVMCompileMojo.java:106)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
[ERROR] 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
@konsoletyper

This comment has been minimized.

Copy link
Owner

commented Oct 25, 2018

Please, try 0.6.0-dev-567 from bintray

@CyborTronik

This comment has been minimized.

Copy link

commented Nov 4, 2018

I have similar issue.
What do you mean by bintray? if is about this one https://bintray.com/bintray/jcenter/org.teavm%3Ateavm then there is no such version

@CyborTronik

This comment has been minimized.

Copy link

commented Nov 4, 2018

Just tested with 0.6.0-SNAPSHOT (compiled from master branch).
The mvn install stuck at generating js phase.
I've upgraded maven-war-plugin from 2.4 to 3.2.2 (would be nice to fix that in maven archetype)
Looks OK now

@konsoletyper

This comment has been minimized.

Copy link
Owner

commented Nov 6, 2018

@CyborTronik I mean this one: https://bintray.com/konsoletyper/teavm/teavm-dev In this page you can see the list of versions.

You can reach this link several ways. First, there's a badge in readme header. Second, in readme you can see instructions to set up preview builds.

As for freezing mvn install I don't know anything. I build TeaVM often on my machine, travis CI builds TeaVM on every commit, but neither of us ever encountered this problem. What is your environment?

@lea-raya

This comment has been minimized.

Copy link

commented Feb 18, 2019

Hi,
Got the same error when building on openjdk-10, but when building on openjdk-8, got another one :
Method bla.bla…Bla.handleEvent(Lorg/teavm/jso/dom/events/Event;)V is claimed to be synchronous, but it is has invocations of asynchronous methods

@konsoletyper

This comment has been minimized.

Copy link
Owner

commented Feb 18, 2019

@lea-raya did you try 0.6.0-dev version?

@konsoletyper

This comment has been minimized.

Copy link
Owner

commented Feb 18, 2019

As for second error, see this: http://teavm.org/docs/runtime/coroutines.html

@lea-raya

This comment has been minimized.

Copy link

commented Feb 18, 2019

Thanks for the second error.
I wrapped my handleEvent(…) implementation inside new Thread(() -> { … }).start();

@lea-raya

This comment has been minimized.

Copy link

commented Feb 18, 2019

Otherwise, as mentionned 0.6.0-dev-567 did build without ConcurrentModificationException on openjdk-10 (but needed useSystemClassLoader on maven-surefire-plugin, may work better with ≥11)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.