openjdk 7 error in socket

Ronald Klop ronald-freebsd8 at klop.yi.org
Fri Jan 16 05:50:35 PST 2009


On Fri, 16 Jan 2009 13:51:29 +0100, Ronald Klop  
<ronald-freebsd8 at klop.yi.org> wrote:

>
> Hi,
>
> I just build openjdk 7 on FreeBSD 7.1-amd64.
> It builds after I found this  
> http://mail.openjdk.java.net/pipermail/bsd-port-dev/2008-August/000006.html.
>
> I've problems running something which makes a network connection.
> java.net.SocketException: Invalid argument
>          at java.net.PlainSocketImpl.socketConnect(Native Method)
>          at  
> java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:310)
<removed part of the stacktrace>
>
> I don't set any special socket option. Not in Java and I don't have  
> special settings in FreeBSD also. Running GENERIC kernel.
>
> I'm using ipv4. This happens if I make a connection to mysql, but also  
> in the subclipse plugin in eclipse if I connect to the svn server.
> Is this a known issue? Can I solve this? Or provide more information?
>
> Ronald.

I spoke to soon.
http://mail.openjdk.java.net/pipermail/bsd-port-dev/2008-October/000102.html
The option -Djava.net.preferIPv4Stack=true helps, but it is a little  
inconvenient to add it to all java invocations. I asume a better fix is in  
the make? Or are there better workarounds?

Greetings,

Ronald. (who is now quite happily running tomcat and eclipse in openjdk 7)


More information about the freebsd-java mailing list