This isn’t a constructive post – I am going to vent about yet another reason I feel the combination of Maven-Subversion-Eclipse-AspectJ is the Bermuda triangle (er, make that square) of Java development.
I hit a hang tonight in Eclipse that comes from m2eclipse. I have seen this before, am irritated and I just want to vent about it.
Our toolset:
- Eclipse 3.5
- AspectJ Dev Tools 2.0.2
- m2eclipse .10.0.2010
- Subclipse 1.6.10
We have many modules. When I work against trunk, I almost always set Maven to offline mode after doing a full build. I don’t need to be on the tip for what I do.
The reason I evoke Bermuda when referring to this combination is the general unreliability I have when working. Eclipse arbitrarily rebuilds entire projects with a single line of Java changed. AspectJ fails to weave. Eclipse hangs for minutes at a time. On and on. This post is about one cause of the hang issue.
Annoying Hangs in Eclipse
I sporadically get hung up on calls to the Maven repo or Subversion. Eclipse will hang for minutes. I have started to monitor the stack traces, and they are so far they are m2eclipse or subclipse related.
As a good open source citizen, I should really stop what I am doing for half a day when this happens to try and figure out what is going wrong. Better yet, see if anyone else has had the problem and already reported it.
After tonight’s 5 minute hang, I did a search. I found other people with the problem (from 2008), yet no answer.
"Worker-9" prio=10 tid=0x0ab96000 nid=0xdf7 in Object.wait() [0x5eacd000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0xaffea3e8> (a org.apache.maven.wagon.providers.http.JettyClientHttpWagon$WagonExchange)
at java.lang.Object.wait(Object.java:485)
at org.eclipse.jetty.client.HttpExchange.waitForDone(HttpExchange.java:134)
- locked <0xaffea3e8> (a org.apache.maven.wagon.providers.http.JettyClientHttpWagon$WagonExchange)
at org.apache.maven.wagon.providers.http.JettyClientHttpWagon.sendAndWait(JettyClientHttpWagon.java:245)
at org.apache.maven.wagon.providers.http.JettyClientHttpWagon.getIfNewer(JettyClientHttpWagon.java:347)
at org.apache.maven.wagon.providers.http.JettyClientHttpWagon.getIfNewer(JettyClientHttpWagon.java:302)
at org.apache.maven.repository.legacy.DefaultWagonManager.getRemoteFile(DefaultWagonManager.java:292)
at org.apache.maven.repository.legacy.DefaultWagonManager.getArtifact(DefaultWagonManager.java:99)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:247)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:507)
at org.apache.maven.repository.legacy.LegacyRepositorySystem.resolve(LegacyRepositorySystem.java:325)
at org.apache.maven.project.RepositoryModelResolver.resolveModel(RepositoryModelResolver.java:171)
at org.apache.maven.model.building.DefaultModelBuilder.readParentExternally(DefaultModelBuilder.java:582)
at org.apache.maven.model.building.DefaultModelBuilder.readParent(DefaultModelBuilder.java:449)
at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:182)
at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:117)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:117)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:81)
at org.maven.ide.eclipse.internal.embedder.MavenImpl.readProject(MavenImpl.java:418)
at org.maven.ide.eclipse.internal.project.MavenProjectManagerImpl$Refresher.phaseOne(MavenProjectManagerImpl.java:448)
at org.maven.ide.eclipse.internal.project.MavenProjectManagerImpl.refresh(MavenProjectManagerImpl.java:368)
at org.maven.ide.eclipse.internal.project.MavenProjectManagerRefreshJob.run(MavenProjectManagerRefreshJob.java:93)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
What am I going to do about it?
I know what I should do. Every time I hit an annoying problem, I should drop what I am doing and try and debug it.
I tried debugging the AspectJ issue, and gave up after a lot of problems getting a working debug environment with matching source files for everything. So I would like to help debug this one, but I just don’t have the desire to fight that again.
There is an easy workaround. I was not on my corporate VPN when this happened. I have only seen this problem when off the VPN. Therefore, I can just log into VPN all the time and the problem is avoided.
But I shouldn’t have to do that. My Maven settings clearly indicate an offline build.
If you are on this page, you must be having this same problem (I don’t have subscribers to this blog). Let me know with a comment. If others are annoyed maybe I will devote some time to debugging.
Here is another one I just hit, 5 minutes and going:
ReplyDeletejava.lang.Thread.State: RUNNABLE
at org.eclipse.jetty.io.nio.SelectorManager$SelectSet.stop(SelectorManager.java:742)
- locked <0xaca2d7b8> (a org.eclipse.jetty.io.nio.SelectorManager$SelectSet)
at org.eclipse.jetty.io.nio.SelectorManager.doStop(SelectorManager.java:218)
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:80)
- locked <0xaca38858> (a java.lang.Object)
at org.eclipse.jetty.client.SelectConnector.doStop(SelectConnector.java:124)
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:80)
- locked <0xaca388a0> (a java.lang.Object)
at org.eclipse.jetty.client.HttpClient.doStop(HttpClient.java:474)
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:80)
- locked <0xaca2cd90> (a java.lang.Object)
at org.apache.maven.wagon.providers.http.JettyClientHttpWagon.closeConnection(JettyClientHttpWagon.java:184)
at org.apache.maven.wagon.AbstractWagon.disconnect(AbstractWagon.java:222)
at org.apache.maven.repository.legacy.DefaultWagonManager.disconnectWagon(DefaultWagonManager.java:674)
at org.apache.maven.repository.legacy.DefaultWagonManager.getRemoteFile(DefaultWagonManager.java:410)
at org.apache.maven.repository.legacy.DefaultWagonManager.getArtifactMetadata(DefaultWagonManager.java:174)
at org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.resolve(DefaultRepositoryMetadataManager.java:126)
at org.apache.maven.repository.legacy.resolver.transform.AbstractVersionTransformation.resolveVersion(AbstractVersionTransformation.java:88)
at org.apache.maven.repository.legacy.resolver.transform.SnapshotTransformation.transformForResolve(SnapshotTransformation.java:77)
at org.apache.maven.repository.legacy.resolver.transform.DefaultArtifactTransformationManager.transformForResolve(DefaultArtifactTransformationManager.java:49)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:236)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:507)
at org.apache.maven.repository.legacy.LegacyRepositorySystem.resolve(LegacyRepositorySystem.java:325)
at org.apache.maven.project.RepositoryModelResolver.resolveModel(RepositoryModelResolver.java:171)
at org.apache.maven.model.building.DefaultModelBuilder.readParentExternally(DefaultModelBuilder.java:584)
at org.apache.maven.model.building.DefaultModelBuilder.readParent(DefaultModelBuilder.java:449)
at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:182)
at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:117)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:117)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:245)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:204)
at org.apache.maven.project.artifact.MavenMetadataSource.retrieveRelocatedProject(MavenMetadataSource.java:575)
at org.apache.maven.project.artifact.MavenMetadataSource.retrieve(MavenMetadataSource.java:188)
at org.apache.maven.repository.legacy.resolver.DefaultLegacyArtifactCollector.recurse(DefaultLegacyArtifactCollector.java:533)
at org.apache.maven.repository.legacy.resolver.DefaultLegacyArtifactCollector.collect(DefaultLegacyArtifactCollector.java:150)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:590)