My Oracle Support Banner

Targeting War Inside Ear With Weblogic.Deployer is not working (Doc ID 1487298.1)

Last updated on NOVEMBER 05, 2024

Applies to:

Oracle WebLogic Server - Version 10.3.3 to 10.3.6
Java Cloud Service - Version 10.3.6.0 and later
Oracle WebLogic Server for OCI - Version 10.3.6 and later
Oracle Cloud Infrastructure - Version N/A and later
Information in this document applies to any platform.

Symptoms

When deploying and targeting a web application to a virtual host, the module-targeting syntax is inconsistent between deploying to context root and uri. In Deploying Applications and Modules with weblogic.Deployer, "Using Module-Level Targeting for Deploying an Enterprise Application," the following is stated:

An Enterprise application (EAR file) differs from other deployment units because an EAR can contain other module types (WAR and JAR archives). When you deploy an Enterprise application using the Administration Console, you can target all of the archive's modules together as a single deployment unit, or target individual modules to different servers, clusters, or virtual hosts.

You can also use module-level targeting to deploy only a subset of the modules available in an EAR. This can simplify packaging and distribution of applications by packaging multiple modules in a single, distributable EAR, but targeting only the modules you need to each domain.

Module-Targeting Syntax

To target individual modules in an Enterprise application, use the module_name@target_name syntax. For example ...

However Targeting Deployments to Servers, Clusters, and Virtual Hosts says:

Deploying to One or More Targets

To deploy to a single WebLogic Server target, list the configured target name after the -targets option to weblogic.Deployer. For example, to deploy a Web application to a configured virtual host named companyHost, use the command:

java weblogic.Deployer -adminurl http://localhost:7001 -username weblogic -password password -deploy -targets companyHost c:\localfiles\myWebApp.ear

This example does not adhere to the module_name@target_name syntax and does not produce the desired targeting. Using -targets myWebApp@companyHost results in the web application appearing not to be targeted when seen in the WebLogic Server Administration Console. In contrast, the module_name@target_name syntax works when deploying to context-root. For example:

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
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.