- This topic has 10 replies, 4 voices, and was last updated 14 years, 7 months ago by Brian Fernandes.
-
AuthorPosts
-
Ron PerichMemberWe have a funny (but very frustrating) problem where two of the developers can run JUnit on the project and two of the developers cannot. Those who cannot run it simply get a <terminated> in there console with no output whatsoever. Also, there is nothing in the .metadata/log file that is of use.
We did some troubleshooting and it led us down the path that there may be a classpath issue.
When we have forty jars in the project’s classpath, using Eclipse to run JUnit tests works. The minute we add the 41st, it fails to start and we get a blank <terminated>
Does anyone have a suggestion as to how to correct?
support-shaliniMemberrperich69,
I have escalated this issue to the dev team member. They will get back to you on this.
Ron PerichMemberThank you in advance for your help with this matter. We had a similar issue with running ANT but we were somehow, after a lot of screwing around with JVM settings and classpath, able to correct. Attempting to do TDD without using the built-in JUnit runner is difficult, to say the least.
Brian FernandesModeratorrperich,
Is the 41st one that you add always the same JAR? Or adding any JAR as the 41st causes it to fail?
If it is the same JAR, which one is it? There could be something in your classpath that is conflicting with JUnit, and in some cases the order in which the classes appear makes a difference. For the developers who can run JUnit in your team, can you compare the .classpath files from their project root with the developers who can not? That might shed some light on this issue.
Hope this helps.
Ron PerichMember@Support-Brian wrote:
rperich,
Is the 41st one that you add always the same JAR? Or adding any JAR as the 41st causes it to fail?
If it is the same JAR, which one is it? There could be something in your classpath that is conflicting with JUnit, and in some cases the order in which the classes appear makes a difference. For the developers who can run JUnit in your team, can you compare the .classpath files from their project root with the developers who can not? That might shed some light on this issue.
Hope this helps.
Our classpath’s are the same. My JUnit works, and their JUnit tests do not.
It can be ANY jar added as the 41st JAR. As long as the JAR file added/removed doesn’t cause a compile issue with the project (within the space of the test), when we add the 41st, we can no longer run the JUnit.
Ron PerichMemberWe also put some tracing onto the startup of the JUnit test and we get this error upon adding the 41st jar:
…..
[Loaded java.text.AttributedCharacterIterator$Attribute from D:\java\jdk1.5.0_06\jre\lib\rt.jar]
[Loaded java.text.Format$Field from D:\java\jdk1.5.0_06\jre\lib\rt.jar]
[Loaded java.text.MessageFormat$Field from D:\java\jdk1.5.0_06\jre\lib\rt.jar]
Could not connect to: : 2686 [Loaded java.lang.Shutdown from D:\java\jdk1.5.0_06\jre\lib\rt.jar]
[Loaded java.lang.Shutdown$Lock from D:\java\jdk1.5.0_06\jre\lib\rt.jar]java.net.SocketException: Unrecognized Windows Sockets error: 10106: create
at java.net.Socket.createImpl(Socket.java:387)
at java.net.Socket.<init>(Socket.java:360)
at java.net.Socket.<init>(Socket.java:178)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.connect(RemoteTestRunner.java:570)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:381)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)Flat profile of 38.33 secs (205 total ticks): main
…..
niranjenbabuMemberCan we know the solution for this?
support-shaliniMemberniranjenbabu,
The dev team is investigating this issue. They will get back to you on this
Brian FernandesModeratorrperich,
As far as the .classpath – I assume you have checked that the order is exactly the same and the JARs on the two machines are the same too?
The only idea I have would be to look at your memory settings when running the JUnit test. Something that could be tested by adding a NOP JAR (a dummy JAR with a single simple class for instance) to the list of JARs – it should work with that as the 41st JAR but perhaps not if you add a “real” JAR. You could then try to increase your memory settings in the Arguments tab of your JUnit configuration, or perhaps try running your test with a later version of the JDK – perhaps JDK 1.6 instead of 1.5.
Other than that, I’m afraid we’re out of ideas. MyEclipse does not modify the JUnit functionality that is provided in Eclipse in anyway, so this would be an Eclipse issue. What version of MyEclipse are you using?
Ron PerichMemberYes, the order and JARs are exactly the same between the projects (these are checked into our CM system)
We will try out your suggestions, but if I am not mistaken we have already done that. What is interesting is that two developers on the team are experiencing the same issue, but not me.
We are all using the exact same version of MyEclipse ( 8.0-20091120) as we like to maintain consistency between IDEs. However, the other two people have software installed on their machines that I don’t have, some of which may have touched Windows environmental variables. We tried to verify using a command window, but you never know.
We are going to attempt to jack around with the settings. I have been researching this error, too, and may have come across something. IF we find the solution, we’ll post it.
Brian FernandesModeratorFrom my own research, I turned up these threads:
http://dev.eclipse.org/mhonarc/lists/pde-dev/msg01041.html
http://dev.eclipse.org/mhonarc/lists/eclipse-dev/msg06675.htmlAs you mention the other developers have more software installed – in non Eclipse settings I have seen this reported when some external application is occupying the same port – though in your case it does not make sense as it manifests itself only on addition of the 41st JAR.
If you do figure out something, we would definitely want to know, thanks!
-
AuthorPosts