WS7RC3: NullPointerException when installing on Solaris

Hi there,

I'm trying the Webserver 7.0 RC3 candidate but when I run the setup program (using the GUI) and agree to the license it crashes the moment when I specify a directory to install to (/opt/local/sun/webserver7). It doesn't matter if the directory exists or not, the installer crashes (and dumps core) no matter what:

Exception in thread"AWT-EventQueue-0" java.lang.NullPointerException

at SolarisNativeToolkit.getComponent(SolarisNativeToolkit.java:1376)

at SolarisPlatformToolkit.getComponent(SolarisPlatformToolkit.java:1398)

at com.sun.wizards.core.SystemInterface.getComponent(SystemInterface.jav

a:491)

at com.sun.wizards.services.RemoteRegistryServiceProxy.getComponent(Remo

teRegistryServiceProxy.java:101)

at com.sun.wizards.services.RemoteRegistryService.getComponent(RemoteReg

istryService.java:101)

at com.sun.web.installer.util.ProductUtil.removeInvalidRegistryEntries(P

roductUtil.java:336)

at com.sun.web.installer.web.dialogs.DirectorySelectionListener.componen

tFinishing(DirectorySelectionListener.java:53)

at com.sun.wizards.core.IteratorLayout.next(IteratorLayout.java:1073)

at com.sun.wizards.core.WizardTreeManager.actualNextButtonPressed(Wizard

TreeManager.java:1308)

at com.sun.wizards.core.WizardTreeManager.nextButtonPressed(WizardTreeMa

nager.java:1344)

at com.sun.wizards.core.WizardTreeManager.dispatchNavigationEvent(Wizard

TreeManager.java:484)

at com.sun.wizards.core.WizardTreeManager.run(WizardTreeManager.java:446

)

at java.lang.Thread.run(Thread.java:595)

at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh

read.java:242)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre

ad.java:163)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

I think it might be a privilige related problem because it only happens whenever I run the installer through the use of <i>pfexec</i> which grants me administrative access on this machine (Primary Administrator). Running the program directly (pfexec ./setup) or through a priviledged shell (pfexec sh -c "./setup") makes no difference. And finally, the most obvious approach by using "su" to become root also results in the installer crashing with an exception.

Although I can overcome this problem by creating the installation directory before hand, granting myself access, and then performing the installation as a regular user I don't think this is the way it should be.

Can anyone shed some light on this ?

[2985 byte] By [Lion-O] at [2007-11-26 11:45:26]
# 1

this sounds more like one of the following

- you need to give permission to access your current X session by doing something like

xhost +

from your current machine.

- your DISPLAY variable is not set properly. u can check by doing

echo $DISPLAY. if this is empty, then you will need to provide a valid hostname like

export DISPLAY=<hostname>:0.0

hope this helps

chilideveloper at 2007-7-7 11:54:59 > top of Java-index,Web & Directory Servers,Web Servers...
# 2

Impossible.

This has nothing to do with X related settings because the GUI normally appears. As I said in my message: I accept the license, I specify the directory in which to install and then it crashes.

If this would be X related the installer wouldn't present an error but default to console based installation. You can test this when trying to login as root using "su -" and then start the installer.

LionO at 2007-7-7 11:54:59 > top of Java-index,Web & Directory Servers,Web Servers...
# 3

I've done more testing and I'm pretty convinced to have hit upon a weird bug. Especially when considering that everything else which is installed on this box (Java Enterprise System, Sun Studio, etc.) has been installed without issues in the same way.

A quick and dirty solution is to create the installation directory up front, make sure your regular userid has write permissions, and then continue the installation as usual (no errors will occur).

The only possible problem you'll encounter afterwards is that the installer has configured the webserver to run under your UID. This doesn't have to be an issue perse, but when using the regular HTTP port 80 (which is privileged) you need to either be root or have the right priviledges.

When trying this on a testmachine/environment where root privileges for the webserver are no problem the easiest way to overcome the error you get when merely trying to start the server as root:

[28/Nov/2006:00:44:15] info (10197): CORE1116: Sun Java System Web Server 7.0-Te

chnology-Preview-3 B09/13/2006 15:00

[28/Nov/2006:00:44:16] warning (10198): CORE3283: stderr: Error occurred during

initialization of VM

[28/Nov/2006:00:44:16] warning (10198): CORE3283: stderr: java.lang.Error: Prope

rties init: Could not determine current working directory.

[28/Nov/2006:00:44:16] catastrophe (10198): CORE4005: Internal error: unable to

create JVM

...is to edit the 'server.xml' file (to be found in the config directory in your server root path) and change the <user></user> setting to root.

Warning: when trying this thing on an untrusted network its not smart to run the webserver as root. In that case its probably better to create a regular user and grant him the "PRIV_NET_PRIVADDR" privilege.

(this is all on Solaris 10).

Message was edited by:

Lion-O

LionO at 2007-7-7 11:54:59 > top of Java-index,Web & Directory Servers,Web Servers...
# 4
well, I guess I didn't understand your problem either. the installer should have logged a error file under your install root directory/setup directory. can you provide the last few lines of this file. this can probably provide us some clue as to what went wrong.
chilideveloper at 2007-7-7 11:54:59 > top of Java-index,Web & Directory Servers,Web Servers...