Skip to main content

Eclipse/Ubuntu TWB plugin issue

1 reply [Last post]
svenyonson
Offline
Joined: 2010-04-21
Points: 0

I am unable to create a new run configuration for an OCAP project in eclipse. This occurs when running eclipse 3.42 on Ubuntu 9.10.
Steps to reproduce:
1. Run -> Run Configurations
2. Select OCAP Simulation from list
3. Click the new configuration button.
4. Nothing happens ( A "New_Configuration" form does not appear )
5. The error log has a message: Unhandled event loop exception ( Plugin org.eclipse.ui )

Snippet from the stack trace:
java.lang.NullPointerException
at org.tvt.platform.utils.NetUtils.getMACAddress(NetUtils.java:60)
at org.tvt.platform.simulator.launch.ocap.OcapSystemPropertiesManager.setDefaults(OcapSystemPropertiesManager.java:263)
at org.tvt.platform.simulator.ui.component.ocap.OcapSystemPropertiesComponent.setDefaults(OcapSystemPropertiesComponent.java:363)
at org.tvt.platform.simulator.ui.launch.ocap.OcapSystemPropertiesTab.setDefaults(OcapSystemPropertiesTab.java:82)
at org.tvt.platform.simulator.ui.launch.ocap.OcapLaunchConfigurationTabGroup.setDefaults(OcapLaunchConfigurationTabGroup.java:150)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupWrapper.setDefaults(LaunchConfigurationTabGroupWrapper.java:186)
at org.eclipse.debug.internal.ui.launchConfigurations.CreateLaunchConfigurationAction.performAction(CreateLaunchConfigurationAction.java:77)
at org.eclipse.debug.internal.ui.launchConfigurations.AbstractLaunchConfigurationAction$1.run(AbstractLaunchConfigurationAction.java:103)

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
mmillard
Offline
Joined: 2008-11-05
Points: 0

This appears to be a specific problem with the JDK/JRE that is being used in conjunction with Ubuntu and Eclipse 3.4.2. The code that is failing is:

InetAddress address = InetAddress.getLocalHost();
/*
* Get NetworkInterface for the current host and then read the
* hardware address.
*/
NetworkInterface ni = NetworkInterface.getByInetAddress(address);
byte[] mac = ni.getHardwareAddress();

java.net.InetAddress is invalid for getLocalHost(). This causes java.net.NetworkInterface.getByInetAddress() to return a null reference.