Weblogic.Deployer Command-Line Listapps Throwing Java.lang.NullPointerException

(Doc ID 2190233.1)

Last updated on SEPTEMBER 18, 2017

Applies to:

Oracle WebLogic Server - Version 12.2.1.0.0 and later
Information in this document applies to any platform.

Symptoms

On : 12.2.1.0.0 version, WLS Core Components

When running the weblogic.Deployer command-line listapps command, under certain conditions it is throwing a java.lang.NullPointerException (NPE).  This happens with a versioned application.  Non-versioned applications do not get the NPE.

Note: A domain consists of an Admin Server and cluster with X number of managed servers.  The Admin Server is NOT part of the cluster.  The versioned application is deployed to the cluster.

 
Here is the full stack-trace:

java.lang.NullPointerException
  at weblogic.deploy.api.tools.deployer.ListappsOperation.getActiveState(ListappsOperation.java:83)
  at weblogic.deploy.api.tools.deployer.ListappsOperation.report(ListappsOperation.java:61)
  at weblogic.deploy.api.tools.deployer.Deployer.perform(Deployer.java:140)
  at weblogic.deploy.api.tools.deployer.Deployer.runBody(Deployer.java:88)
  at weblogic.utils.compiler.Tool.run(Tool.java:159)
  at weblogic.utils.compiler.Tool.run(Tool.java:116)
  at weblogic.Deployer.run(Deployer.java:74)
  at weblogic.Deployer.main(Deployer.java:55)
null


 

Changes


The issue can be reproduced at will with the following steps:

1. Deploy a versioned application to a Cluster

Running the following command with a versioned application- example:

java weblogic.Deployer -adminurl t3://myserver.us.oracle.com:7011 -username weblogic -password welcome1 -listapps weblogic.Deployer invoked with options: -adminurl t3://myserver.us.oracle.com:7011 -username weblogic -listapps
java.lang.NullPointerException

2. Running the command with the same scenario, but the application is not versioned:

java weblogic.Deployer -adminurl t3://myserver.us.oracle.com:7011 -username weblogic -password welcome1 -listapps weblogic.Deployer invoked with options: -adminurl t3://myserver.us.oracle.com:7011 -username weblogic -listapps helloworld
Number of Applications Found : 1

Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms