My Oracle Support Banner

Cannot Deploy A Web Service Application If The DAS Has No Http-listeners Defined on Oracle GlassFish Server 3.1.1 (build 12) (Doc ID 1488763.1)

Last updated on APRIL 04, 2017

Applies to:

Oracle GlassFish Server - Version 3.1.1 and later
Linux x86-64

Symptoms

## Application Server Version ###
Version = Oracle GlassFish Server 3.1.1 (build 12), JRE version 1.7.0

Steps to reproduce the issue:

1. Configure the domain with DAS, config-nodes, cluster and instance:
   Domain Administration Server (DAS) on Server1
   Configured Node-1 on Server1
   Configured Node-2 on Server2
   Configured Cluster

   Create Instance1 on Node-1
   Create Instance2 on Node-2


2. Deploy a sample HelloWordWS.war to the cluster
   --> result ok
3. Undeploy the sample HelloWordWS.war
4. Remove http-listener and https-listener from DAS (these listeners are not needed, because the application is deployed to the cluster)
5. Restart All
6. Deploy the application to the cluster

--> Observe NullPointerException as shown below:

[#|2011-09-16T17:08:27.875+0200|SEVERE|oracle-glassfish3.1.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=28;_ThreadName=Thread-2;|Exception while invoking class org.glassfish.webservices.WebServicesDeployer prepare method|#]

[#|2011-09-16T17:08:27.876+0200|SEVERE|oracle-glassfish3.1.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=28;_ThreadName=Thread-2;|Exception while preparing the app|#]

[#|2011-09-16T17:08:27.877+0200|SEVERE|oracle-glassfish3.1.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=28;_ThreadName=Thread-2;|The log message is null.
java.lang.RuntimeException
    at org.glassfish.webservices.WebServicesDeployer.prepare(WebServicesDeployer.java:193)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:872)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410)
(...)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
    at org.glassfish.webservices.WsUtil.getWebServerInfoForDAS(WsUtil.java:1548)
    at org.glassfish.webservices.WebServicesDeployer.doWebServicesDeployment(WebServicesDeployer.java:619)
    at org.glassfish.webservices.WebServicesDeployer.prepare(WebServicesDeployer.java:184)
    ... 52 more
|#]

 


This problem is also reproducible on GF 3.1.2 b10 also when all the non-admin listeners are deleted from the DAS.

Result:

Caused by: java.lang.NullPointerException
       at org.glassfish.webservices.WsUtil.getWebServerInfoForDAS(WsUtil.java:1548)
       at org.glassfish.webservices.WebServicesDeployer.doWebServicesDeployment(WebServicesDeployer.java:634)
       at org.glassfish.webservices.WebServicesDeployer.prepare(WebServicesDeployer.java:184)

 
There could be a scenario where the user may opt to remove the non-admin listeners and run into this problem.

 

Changes

Removed the non-admin listeners, ports 8080 and 8181 and with the Admin Lister at 4848 still there.

-bash-3.00$ grep 4848 domain.xml

<network-listener port="4848" protocol="admin-listener" transport="tcp" name="admin-listener" thread-pool="admin-thread-pool"></network-listener>
<system-property name="ASADMIN_LISTENER_PORT" value="24848"></system-property>
<system-property name="ASADMIN_LISTENER_PORT" value="24848"></system-property>
-bash-3.00$

 
It is observed that with a target of Cluster (not 'server'), the deployment of a Web Service application ends up with a NullPointerException which points to the lack of HTTP listeners in the DAS.


 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.