Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8141439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T12:30:32+00:00 2026-06-06T12:30:32+00:00

I am having some trouble trying to adjust the deployment settings of our application

  • 0

I am having some trouble trying to adjust the deployment settings of our application in weblogic. I feel what I’m trying to do ought to be quite simple, but it’s not working as expected.

I am just trying to override the context-root in weblogic.xml and the JNDI name for the data source, so these can both be configured at deployment time.

I have removed the application.xml from the ear file, so that shouldn’t be affecting the overrides.

What I have so far:

weblogic.xml:

<context-root>mosaic</context-root>

<resource-description>
  <res-ref-name>jdbc/LogicalDS</res-ref-name>
  <jndi-name>LogicalDS</jndi-name>
</resource-description>

web.xml

<resource-ref>
  <description>A logical reference to the datasource - mapped in deployment plan</description>
  <res-ref-name>jdbc/LogicalDS</res-ref-name>
  <res-type>javax.sql.DataSource</res-type>
  <res-auth>Container</res-auth>
</resource-ref>

plan.xml

<?xml version="1.0" encoding="UTF-8"?>
 <wls:deployment-plan xmlns:wls="http://xmlns.oracle.com/weblogic/deployment-plan" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"     xsi:schemaLocation="http://xmlns.oracle.com/weblogic/deployment-plan http://xmlns.oracle.com/weblogic/deployment-plan/1.0/deployment-plan.xsd http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/j2ee_1_4.xsd" global-variables="true">
 <!--weblogic-version:10.3.5-->
 <wls:application-name>mosaic.ear</wls:application-name>
 <wls:variable-definition>
    <wls:variable>
        <wls:name>datasource_name</wls:name>
        <wls:value xsi:nil="true"></wls:value>
        <wls:description>The name of the datasource to map to the mosaic application</wls:description>
    </wls:variable>
    <wls:variable>
        <wls:name>new_context_root</wls:name>
        <wls:value xsi:nil="true"></wls:value>
        <wls:description>URL to deploy Mosaic at</wls:description>
    </wls:variable>
 </wls:variable-definition>
<wls:module-override>
    <wls:module-name>mosaic.war</wls:module-name>
    <wls:module-type>war</wls:module-type>
    <wls:module-descriptor>
        <wls:root-element>weblogic-web-app</wls:root-element>
        <wls:uri>WEB-INF/weblogic.xml</wls:uri>
        <wls:variable-assignment>
            <wls:name>new_context_root</wls:name>
            <wls:xpath>/weblogic-web-app/context-root</wls:xpath>
            <wls:operation>replace</wls:operation>
        </wls:variable-assignment>
        <wls:variable-assignment>
            <wls:description>Data source for mosaic application</wls:description>
            <wls:name>datasource_name</wls:name>
            <wls:xpath>/weblogic-web-app/resource-env-description/resource-env-ref-name</wls:xpath>
            <wls:operation>replace</wls:operation>
        </wls:variable-assignment>
        <wls:variable-assignment>
            <wls:name>datasource_name</wls:name>
            <wls:xpath>/weblogic-web-app/resource-description/[res-ref-name="jdbc/LogicalDS"]/jndi-name</wls:xpath>
            <wls:operation>replace</wls:operation>
        </wls:variable-assignment>
    </wls:module-descriptor>
  </wls:module-override>
</wls:deployment-plan>

Nothing happens when I use the deployment plan, and none of the variables appear under the Deployment Plan configuration screens in the admin console. From what I understand, I should at least be asked for these variables, since I have specified that they are null in the deployment plan.

When I use WLST to browse the tree, I find that the runtime configuration just stays as the values in the deployment descriptors.

I have verified the deployment plan is being used in the general tab of the admin console.

Can anyone help me find out what I am doing wrong here ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T12:30:34+00:00Added an answer on June 6, 2026 at 12:30 pm

    I see that you have “datasource_name” variable replacement twice. Is that intended? Your xpath appears to be incorrect:

    resource-description/[res-ref-name=
    etc.

    Should it be:

    resource-description[res-ref-name=
    etc.

    My suggestion is to change one thing at at time, for example, the web app context first, and test. The web app context can be also set in the admin console, so you should see the value there.

    There are few good articles about deployment plan:

    https://blogs.oracle.com/jamesbayer/entry/11gr1_update_and_a_deployment

    http://m-button.blogspot.com/2008/08/how-to-use-deployment-plan.html

    A good resource mapping doc:

    http://docs.oracle.com/cd/E15523_01/web.1111/e13737/packagedjdbc.htm
    (look for the diagram near the bottom).

    Is your variable a “replace” or “define”?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to deploy my rails application with capistrano, but I'm having some trouble
I'm trying to convert some Haskell code to F# but I'm having some trouble
I'm trying to add a UIButton to a UIView, but am having some trouble
im fairly new to android development, but i'm having some trouble trying to make
Been having some trouble trying to integrate the admob sdk into my application to
I'm trying to parse some JSON but I'm having some trouble. Here's what I
I am trying to make my UITableView Editable but I'm having some trouble with
I am trying to build a mobile app but am having some trouble getting
I'm trying to use Morphia for a project but I'm having some trouble getting
I'm having some trouble trying to incorporate a read and write statement into evaluateStatementInner

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.