|
Ok, I'll look at it some more. Could you post the test error report with the full stacktrace?
Ok, it works now. The problem is that my hostname was defined neither in DNS nor local /etc/hosts. So when the name cannot be resolved the following error occurs:
... java.net.UnknownHostException: ersin_er_mobile: ersin_er_mobile at java.net.InetAddress.getLocalHost(InetAddress.java:1308) at org.apache.mina.transport.socket.nio.DatagramTrafficControlTest.connect(DatagramTrafficControlTest.java:50) ... Could you try to change DatagramTrafficControlTest.java line 50 into
SocketAddress addr = new InetSocketAddress( "localhost", port ); and see if that takes care of the problem when your hostname isn't in /etc/hosts? This way the test passes but some new tests fail:
------------------------------------------------------- T E S T S ------------------------------------------------------- Using port 1025 for testing. * Without localAddress Using port 1025 for testing. * Without localAddress Using port 1025 for testing. * Without localAddress [surefire] Running org.apache.mina.examples.echoserver.ConnectorTest [surefire] Tests run: 3, Failures: 0, Errors: 3, Time elapsed: 0.823 sec <<<<<<<< FAILURE !! Using port 1025 for testing. Using port 1025 for testing. Using port 1025 for testing. [surefire] Running org.apache.mina.examples.echoserver.AcceptorTest [surefire] Tests run: 3, Failures: 0, Errors: 3, Time elapsed: 0.308 sec <<<<<<<< FAILURE !! Results : [surefire] Tests run: 6, Failures: 0, Errors: 6 [INFO] ---------------------------------------------------------------------------- [ERROR] BUILD ERROR [INFO] ---------------------------------------------------------------------------- I see that this is caused by same type of method call which is getLocalHost(). So the problem is certain I think. Thanks. Ok great! I'll have a look at these tests. It would be great if the tests would pass even if no network is available (except for the loopback interface of course).
I've now changed every occurence of InetAddress.getLocalHost() to use "localhost" or similar. I've also changed InetAddressEditorTest to only do lookups of external hosts if there is a network connection. MINA shoud now build without a network connection and without the current host's name resolving to an IP. I've verified this on my system.
I also had to downgrade easymockclassextension to 1.1 since 1.2 isn't in ibiblio and maven fails if it can't connect to ibiblio. Maven tried to download the easymockclassextension 1.2 pom on every build. If network is up it will only display a warning and the build succeeds but when network is down the build will always fail even if I have the JAR in my local repo. Ersin, I really hope it works this time! :-) More problems but this time with deps for easymock on fresh checkout and fresh build. Here's what I get:
[INFO] ---------------------------------------------------------------------------- [INFO] Building mina-spring [INFO] task-segment: [clean, install] [INFO] ---------------------------------------------------------------------------- [INFO] [clean:clean] [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. Downloading: http://cvs.apache.org/maven-snapshot-repository/easymock/easymockclassextension/1.1/easymockclassextension-1.1.pom [WARNING] Unable to get resource from repository apache.snapshots (http://cvs.apache.org/maven-snapshot-repository) Downloading: http://m2.safehaus.org/easymock/easymockclassextension/1.1/easymockclassextension-1.1.pom 474b downloaded [WARNING] *** CHECKSUM FAILED - Error retrieving checksum file for easymock/easymockclassextension/1.1/easymockclassextension-1.1.pom - IGNORING Downloading: http://cvs.apache.org/maven-snapshot-repository/cglib/cglib-nodep/2.1/cglib-nodep-2.1.pom [WARNING] Unable to get resource from repository apache.snapshots (http://cvs.apache.org/maven-snapshot-repository) Downloading: http://m2.safehaus.org/cglib/cglib-nodep/2.1/cglib-nodep-2.1.pom [WARNING] Unable to get resource from repository safehaus (http://m2.safehaus.org) Downloading: http://repo1.maven.org/maven2/cglib/cglib-nodep/2.1/cglib-nodep-2.1.pom [INFO] ---------------------------------------------------------------------------- [ERROR] BUILD ERROR [INFO] ---------------------------------------------------------------------------- [INFO] Error building POM (may not be this project's POM). Project ID: cglib:cglib-nodep Reason: Error getting POM for 'cglib:cglib-nodep' from the repository: Error transferring file cglib:cglib-nodep:pom:2.1 from the specified remote repositories: central (http://repo1.maven.org/maven2), safehaus (http://m2.safehaus.org), apache.snapshots (http://cvs.apache.org/maven-snapshot-repository) [INFO] ---------------------------------------------------------------------------- [INFO] For more information, run Maven with the -e switch [INFO] ---------------------------------------------------------------------------- [INFO] Total time: 6 minutes 20 seconds [INFO] Finished at: Thu Jan 19 15:37:27 EST 2006 [INFO] Final Memory: 8M/16M [INFO] ---------------------------------------------------------------------------- Very very odd when I try to build again it all works this time. I'm confused.
I have the same error as Alex, everytime I try to compile the project on my Ubuntu (Debian based) laptop.
It works without any problem on my FC3 desktop. WeirdWeirdWeird, I say ! How utterly annoying! It works like a charm on *my* Ubuntu laptop! :-s I also got some warnings the first time I built after I changed the pom but it hasn't failed on me so far. What happens if you run maven with the -e switch?
BTW, I'm using Maven 2.0.1
Me too. And ubuntu 4.10. But I can't test it right now, because my laptop is at the office.
I didn't had any warning. The test just wail, like it can't bind. I'm on FC4 and cannot reproduce it anymore :(. I think it might have been a connectivity issue for me as I observed from this error message above:
Project ID: cglib:cglib-nodep Reason: Error getting POM for 'cglib:cglib-nodep' from the repository: Error transferring file cglib:cglib-nodep:pom:2.1 Error transferring. The second build was able to download just fine though. I tried to reproduce it by deleting my repo but no luck. It seems that this issue has a brother :
However, I don't have anymore problem with the -Djava.net.preferIPv4Stack=true in mvn script. In eclipse, I must add it to the eclipse.sh script I created to launch eclipse. But it seems that Mina should be tested with -Djava.net.preferIPv6Stack=true, and if it fails, be fixed. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||
[surefire] Running org.apache.mina.transport.socket.nio.DatagramTrafficControlTest
[surefire] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.254 sec <<<<<<<< FAILURE !!