File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Network Interface Detection issue with jdk1.6 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Network Interface Detection issue with jdk1.6" Watch "Network Interface Detection issue with jdk1.6" New topic
Author

Network Interface Detection issue with jdk1.6

Anantha Krishnan
Greenhorn

Joined: Jan 31, 2006
Posts: 2
Hi,
We are trying to use jdk1.6.0_18 with Weblogic 11gR1 (10.3.2).

The environment requires configuring a Virtual IP through Veritas Cluster into one of the Solaris 10 local containers.
As soon as the Virtual IP is plumbed in, the Weblogic server fails to come up and the following error is shown.

<BEA-000386> <Server subsystem failed. Reason: java.lang.AssertionError: An error occurred while retrieving the n
etwork addresses for this machine. The most likely cause is an error in the network configuration of this machine.
java.lang.AssertionError: An error occurred while retrieving the network addresses for this machine. The most likely cause is
an error in the network configuration of this machine.
at weblogic.server.channels.AddressUtils$AddressMaker.getAllAddresses(AddressUtils.java:89)
at weblogic.server.channels.AddressUtils$AddressMaker.><clinit>(AddressUtils.java:47)
at weblogic.server.channels.AddressUtils.getLocalHost(AddressUtils.java:117)
at weblogic.cluster.ClusterHelper.getMachineName(ClusterHelper.java:44)
at weblogic.cluster.ClusterService.startService(ClusterService.java:102)
at weblogic.server.ServiceActivator.start(ServiceActivator.java:98)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)

Caused By: java.net.SocketException: No such device or address
at java.net.NetworkInterface.getAll(Native Method)
at java.net.NetworkInterface.getNetworkInterfaces(NetworkInterface.java:282)
at weblogic.server.channels.AddressUtils$AddressMaker.getAllAddresses(AddressUtils.java:57)
at weblogic.server.channels.AddressUtils$AddressMaker.<clinit>(AddressUtils.java:47)
at weblogic.server.channels.AddressUtils.getLocalHost(AddressUtils.java:117)
at weblogic.cluster.ClusterHelper.getMachineName(ClusterHelper.java:44)
at weblogic.cluster.ClusterService.startService(ClusterService.java:102)
at weblogic.server.ServiceActivator.start(ServiceActivator.java:98)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)



We do not get any error when using jdk1.5 with Weblogic 9.2

The issue has been found to be with one of the core jdk methods...

public static void main(String args[]) throws Exception {
Enumeration niEnum = NetworkInterface.getNetworkInterfaces();


This method fails whenever there is a Virtual IP plumbed into the Solaris container with jdk1.6
The server is able to start without any exception on the container IP as soon as the VIP is unplumbed.

Has anyone faced this issue before???
Anantha Krishnan
Greenhorn

Joined: Jan 31, 2006
Posts: 2
This class seems to work fine on jdk1.5.0_21

Further to this there seems to be a change which went in in jdk1.6.0

(Picked up from the release note of jdk1.6.0)

Enhancement to NetworkInterface
Provides a number of new methods for accessing state and configuration information relating to a system's network adapters. This includes information such as the broadcast address, subnet mask, MAC addresses, and MTU size. See java.net.NetworkInterface
The new class java.net.InterfaceAddress encapsulates all information about a NetworkInterface's IP addresses, including the broadcast address, and subnet prefix length (subnet mask)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Network Interface Detection issue with jdk1.6