Update deployment plan definition with WLST

Hello,
I would like to write a script in order to get the existing deployemnt plan of my deployed application (Deployement plan is yet modified, I don't want to use loadApplication). Then I would to update my deployement plan (update/add work manager constraints).
I can't find any WLST api to do that. The Weblogic console doesn't record the actions when I do it through the console.
I would like top the the same as this link http://download.oracle.com/docs/cd/E15051_01/wls/docs103/config_scripting/updateplan.html
But with a deploymenPlan got from the server and not from the filesystem
The only way I see is to use a Java parser un Jython to update the existing deployemnt plan and then, redeploy the application but This solution is very heavy in term of developpment. It should be more efficient when a built in parser
Could you please help me giving me some information about how to update deployement plans of a yet deployed application with WLST ?
Thank you !
C.

Thank you for answering.
In fact, I have found the solution for my use case according to the previous html link
The WLST plan seems to be accessible only by file system.
If your application is yet deployed with a deployment plan and you want to update this plan, you have to login on the admin server via WLST,get the application absolute path and the plan absoluth path :
cd ("AppDeployments/" + INTERNAL_APP_NAME)
appPath  = cmo.getAbsoluteSourcePath()
planPath = cmo.getAbsolutePlanPath()and then, load the existing plan :
plan = loadApplication(appPath, planPath)after that, you can use the api described at the following link http://download.oracle.com/docs/cd/E15051_01/wls/docs103/config_scripting/updateplan.html to update the plan.
Then, you have to redeploy the application :
redeploy(APP_NAME)Thank you for helping !
C.

Similar Messages

  • Deploy FEP definitions with WSUS without SCCM.

    Morning,
    Possibly a silly question but better to find out now than after configuring a VM with WSUS and finding out it won't work.
    One of our clients can't migrate from XP right now, to minimize risk we've denied their access to the internet on these machines. Now we are faced with FEP not being able to update anymore. I've looked up the IP adresses to allow them but they are many and
    constantly changing.
    WSUS could be an option for them but do we also need SCCM to deploy FEP definitions and updates via WSUS? I will find out myself how this works but I want to make sure it is possible.
    Thanks ;)

    Morning,
    Possibly a silly question but better to find out now than after configuring a VM with WSUS and finding out it won't work.
    One of our clients can't migrate from XP right now, to minimize risk we've denied their access to the internet on these machines. Now we are faced with FEP not being able to update anymore. I've looked up the IP adresses to allow them but they are many and
    constantly changing.
    WSUS could be an option for them but do we also need SCCM to deploy FEP definitions and updates via WSUS? I will find out myself how this works but I want to make sure it is possible.
    Thanks ;)
    I know Forefront Client Security definitions are in WSUS. FEP definitions should be available also. FEP 2010 is listed in the Proucts list in WSUS Products and Classifications. When using FCS definitions, I altered the frequency of WSUS checking with Microsoft
    for updates. The frequency I use is one check early in the am, One at 8 am, one at 1 pm, and one at 4 pm.
    So looks like all you have to do is choose that product in WSUS and sync. Let us know if the FEP product definitions get synced.
    Hope this helps.

  • Updating deployed EJB definitions

    Hi, all,
    Imagine the following scenario. You develop an EJB webapp and launch it. A few months go by and you enter a significant amount of data into the app's entity beans -- data that is mission-critical and must not be lost in the future under any circumstances.
    Then suddenly the need strikes for you to modify or expand your entity EJBs' class definitions -- say, change some of their fields' types or add totally new fields... How do you then upgrade your EJB class definitions without losing the data that has already been entered into the old definitions, but rather migrating that old object data to your new class definitions? Has anyone had to deal with such a situation in practice?
    To give you an example, suppose our web app has an entity bean class named "ContactPerson" but a few months after deploying the application and creating hundreds of ContactPerson instances we realize we need to associate a new attribute with each one of them -- like their Internet telephony ID. We want to append this new attribute to every existing and future ContactPerson bean instance -- without losing any contact person data the application already contains. Any ideas on how to do this?
    Thanks for any suggestions,
    D. P.

    1) changing and recompiling the EJB classes (to make
    them include new fields),This shouldn't be a problem. It's the usual stuff. The only thing you need to ensure is that all the old fields and their functionality doesn't go off during changing something.
    Still the major part would be the actual DAO stuff... EJBs would not be containing all the backend logic, or is it? Of course, you will need some change in the front-end too, if they are displaying something from the new fields.
    2) updating the back-end database in a way that
    reflects the new object structure but still contains
    the old dataThis can be done by means of loader scripts. And there shouldn't be a problem if you aren't removing any columns or changing their datatypes.
    3) making the new EJB's recognize and work seamlessly
    once again with the new database.This is a question of some testing. I bet you wouldn't be testing on a production box... so why worry about that right now?
    Cheers!
    ***Annie***

  • Automatic Update - deployment.properties problems with JRE 1.6.0_05

    Hi!
    This is a Automatic Updated daisable problem.
    I have change the update policy values in the registry but still have one more problem:
    I want to deploy JRE 1.6.0_05, in earlier versions ie 1.4 there has been a windows\sun\java\deployment where the initian deployment.properties file is located. But in the 1.6.X ther is no such folder and the deployment.properies file is still "copied" when you start ie "javacpl.exe" . I would like to disable the
    choice "Download JRE automatically" in the javacpl.exe to "Never download..." but the initial choice when the file deployment.properties is created is "alway download..." .
    Am I still save only with the registry key changes, or do I have to change the value in the deployment.properies and if so, where is the "original" copy that copies the file into C:\Document and Settings\[user]\Application data\Sun\Java\Deployment\
    kindly,
    manekin...

    Hey lynchmob,
    Try these steps to correct the problem, you need to be logged in as an administrator:
    1. Go to the group policy editor. You can get they by typing gpedit.msc into the Run dialog.
    2. Navigate to computer configuration->administrative templates->windows components->internet explorer.
    3. Disable "make proxy settings per-machine (rather than per-user)".
    4. Login with the user account and go to Internet Options.
    5. Go to the Connection tab.
    6. Click on the Lan Settings button.
    7. You may notice that the proxy settings are not correct. Change the proxy settings to be whatever is required for your proxy.
    8. Configure Java to use browser proxy settings.
    9. Open the java console.
    10. Set debug level to 5.
    11. Press 'p' to reload proxy settings. Use the trace messages to verify correct proxy settings were loaded.

  • Create a script to update, deploy, load data with version 9.3.1

    Hi,
    I'd like to know if it's possible run a script to execute:
    - Import dimensions by profile (by EPMA)
    - deploy an application (by EPMA)
    - load rule to load data (by essbase)
    - Calculation script (by essbase)
    we are using the version 9.3.1
    Thanks in advanced.
    Roby

    Hi,
    I don't believe there any batch command functionality for EPMA until version 11.
    It is possible you can try and create a scheduled taskflow in EPMA to import a dimension and then reploy, finally you could get it run a batch script which contained a maxl script to load and calculate essbase data.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Error to Deploy Search Definition in PeopleSoft HCM 9.2

    Hi Guys,
    Today i'm trying configure SES with my Peoplesoft. When i try to deploy Search Definition. I got this error "
    PeopleCode compile error (AddQueryFieldDefaultValueExpression is not a method of class CQRuntime. (2,52) ^ PPT) for program PTSF_FEED.SESFeedDataSource.OnExecute. (2,405)
    A PeopleCode program for the specified reference failed to compile correctly for the indicated reason. 
    In Application Designer, open the referenced program and examine the PeopleCode to locate the cause of the error."
    Any suggest for this problem ?
    Thanks before for yours reply.

    As stated in the following doc, this issue has been solved in PeopleTools 8.53.04 patch
    E-SES: Problems Deploying Search Definition With PeopleTools 8.53 And Oracle SES 11.1.2.2.0 [ID 1558997.1]

  • Update jta-datasource property with deployment plan

    hi,
    weblogic server needs the jta data source as a vendor parameter into the persistence xml? right?
    looks like:
    <properties>
    <property name="eclipselink.target-server" value="WebLogic_10" />
    <property name="javax.persistence.jtaDataSource" value="mysql" />
    </properties>
    so now i want to change the value (in my case mysql) to another with a deployment plan... but how does this work? i cannot change the attributes of the tag with my deployment plan, can i?
    my Deployment plan looks like:
    <variable-definition>
    <variable>
    <name>DataSource</name>
    <value>mysqltest</value>
    </variable>
    </variable-definition>
    <module-descriptor external="false">
    <root-element>persistence</root-element>
    <uri>META-INF/persistence.xml</uri>
    <variable-assignment>
    <name>JDBCDataSource</name>
    <xpath>/persistence/persistence-unit[name="serverpool"]/properties/property[name="javax.persistence.jtaDataSource"]</xpath>
    </variable-assignment>
    </module-descriptor>
    but after this my application dont work because the persistence xml isnt correct.
    so how can i change the attribte value of the tag property of my persistence.xm to change the jta-datasource of my application?
    thank you

    Firstly, I would validate with support that deployment plans cover the persistence.xml deployment descriptor. Someone else has encountered issues with deployment plans before and I believe they are only supported on certain types of deployment descriptor files. See this previous post:
    Problem with hibernate, JPA, and deployment plan
    Secondly even if it is supported, your XPATH is incorrect for the variable assignment. I'm not exactly sure what it would be since you're replacing an attribute value as opposed to the contents of an element itself, but it would look more like this:
    /persistence/persistence-unit/properties/property[@name='javax.persistence.jtaDataSource']@value
    But I'm sure that's wrong. I'm not sure I've seen an example that replaces an attribute value, the ones I've seen are usually a node value.

  • How do I change the context-root of a web app with a deployment plan?

    I've been trying to figure this out for several hours.
    I'm deploying a .ear file which sets the context root for the single web application it deploys in its application.xml deployment descriptor:
    <application>
    <display-name>MyApp</display-name>
    <module>
    <web>
    <web-uri>MyAppViewControler.war</web-uri>
    <context-root>MyApp</context-root>
    </web>
    </module>
    </application>
    I want to change the context-root from /MyApp to something else when deploying the ear file. It seemed to me that using a deployment plan was the way to do this. But when I use this plan:
    <deployment-plan>
    <application-name>MyApp<application-name>
    <variable-definition>
    <variable>
    <name>NEWCONTEXTROOT</name>
    <value>foobar</value>
    </variable>
    </variable-definition>
    <module-override>
    <module-name>MyApp</module-name>
    <module-type>ear</module-type>
    <module-descriptor external="false">
    <root-element>application</root-element>
    <uri>META-INF/application.xml</uri>
    <variable-assignment>
    <name>NEWCONTEXTROOT</name>
    <xpath>/application/module/web/context-root</xpath>
    </variable-assignment>
    </module-descriptor>
    </module-override>
    </deployment-plan>
    I get an error:
    weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND
    /bea/user_projects/domains/devod1/nullplan.xml:0: problem: cvc-complex-type.2.4a: Expected element 'web-uri@http://java.sun.com/xml/ns/javaee' instead of 'context-root@http://java.sun.com/xml/ns/javaee' here in element web@http://java.sun.com/xml/ns/javaee:<nullplan.xml>
    I looked at http://e-docs.bea.com/wls/docs103/pdf/deployment.pdf which says:
    "You cannot use a deployment plan to change the context-root in an application.xml
    file. However, if an application is deployed as a library, you can either change the
    context-root through an weblogic-application.xml file or use the deployment plan
    to change the context-root in an weblogic-application.xml file."
    I don't understand what this means. I'm not deploying my application as a library.
    Does anyone know how to change the context-root for an application?
    Any help would be greatly appreciated!

    Hi James,
    I am quite new to Welogic if i am wrong please correct me.I have re-deployed my application (.war) with this Plan.xml
    &lt;?xml version='1.0' encoding='UTF-8'?&gt;
    &lt;deployment-plan xmlns="http://www.bea.com/ns/weblogic/deployment-plan" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/deployment-plan http://www.bea.com/ns/weblogic/deployment-plan/1.0/deployment-plan.xsd" global-variables="false"&gt;
    &lt;application-name&gt;BrowserR08.003&lt;/application-name&gt;
    *&lt;variable-definition&gt;*
    * &lt;variable&gt;*
    * &lt;name&gt;CONTEXTROOT&lt;/name&gt;*
    * &lt;value&gt;BrowserWeb/servlet/BrowserServlet&lt;/value&gt;*
    * &lt;/variable&gt;*
    * &lt;/variable-definition&gt;*
    &lt;module-override&gt;
    &lt;module-name&gt;BrowserWeb.war&lt;/module-name&gt;
    &lt;module-type&gt;war&lt;/module-type&gt;
    &lt;module-descriptor external="true"&gt;
    &lt;root-element&gt;weblogic-web-app&lt;/root-element&gt;
    &lt;uri&gt;WEB-INF/weblogic.xml&lt;/uri&gt;
    &lt;hash-code&gt;1231953167814&lt;/hash-code&gt;
    *&lt;variable-assignment&gt;*
    * &lt;name&gt;CONTEXTROOT&lt;/name&gt;*
    * &lt;xpath&gt;/weblogic-web-app/context-root&lt;/xpath&gt;*
    * &lt;operation&gt;add&lt;/operation&gt;*
    * &lt;/variable-assignment&gt;*
    &lt;/module-descriptor&gt;
    &lt;module-descriptor external="false"&gt;
    &lt;root-element&gt;web-app&lt;/root-element&gt;
    &lt;uri&gt;WEB-INF/web.xml&lt;/uri&gt;
    &lt;/module-descriptor&gt;
    &lt;module-descriptor external="true"&gt;
    &lt;root-element&gt;wldf-resource&lt;/root-element&gt;
    &lt;uri&gt;META-INF/weblogic-diagnostics.xml&lt;/uri&gt;
    &lt;/module-descriptor&gt;
    &lt;/module-override&gt;
    &lt;config-root&gt;/export/home1/tecapp/BrowserR08.003/plan&lt;/config-root&gt;
    &lt;/deployment-plan&gt;
    I do not know wether i will require the other module descriptor definition in this Plzn.xml. Now when I go to following link.
    Deployments --&gt; MyApp --&gt; Testing
    It gives me following url as a test page:
    http://localhost:7001/BrowserWeb/servlet/BrowserServlet
    as soon as i click on to the above link it redirects me to following.
    http://localhost:7001/BrowserWeb/servlet/BrowserServlet/servlet/BrowserServlet
    Same if i remove these context-root part my normal Testing menu shows me following link as my webapp access path
    http://localhost:7001/BrowserWeb &lt;-- My war file name is BrowserWeb.war so it is default name of my deployed application if i am not wrong
    and as soon as i click on above link it redirects me to the following one.
    http://localhost:7001/BrowserWeb/servlet/BrowserServlet
    It means application server know that my full web access page is with '*servlet/BrowserServlet*' because its adding it in both the cases.
    What I want is a constant URL whcih does not change?
    Hope this helps :)

  • Replacing web.xml values with a deployment plan.  Not working on WL 10.3.2

    Hi All-
    I am trying to replace a value from web.xml with one in a weblogic deployment plan. I deployed the application on WL 10.3.2 and used the deployment plan below. No matter what I do it doesn't seem to want to take the value.
    web.xml:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <context-param>
    <param-name>TokenGroup</param-name>
    <param-value>oldvalue</param-value>
    </context-param>
    </web-app>
    Deployment Plan:
    <?xml version='1.0' encoding='UTF-8'?>
    <deployment-plan xmlns="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"
    global-variables="false">
    <application-name>APPName</application-name>
    <variable-definition>
    <variable>
    <name>TokenGroup</name>
    <value>Key123456</value>
    </variable>
    </variable-definition>
    <module-override>
    <module-name>APPName.war</module-name>
    <module-type>war</module-type>
    <module-descriptor external="false">
    <root-element>web-app</root-element>
    <uri>WEB-INF/web.xml</uri>
    <variable-assignment>
    <name>TokenGroup</name>
    <xpath>/web-app/context-param/[param-name="TokenGroup"]/param-value</xpath>
    <operation>replace</operation>
    </variable-assignment>
    </module-descriptor>
    </module-override>
    </deployment-plan>
    I've also tried other formats for the xpath such as:
    /web-app/context-param/{param-name="TokenGroup"}/param-value
    /web-app/context-param[param-name="TokenGroup"]/param-value
    Any ideas why this doesnt work?
    Thanks,
    Joe

    "web.xml"
    <?xml version='1.0' encoding='WINDOWS-1252'?>
    <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <context-param>
    <param-name>name</param-name>
    <param-value>Joe</param-value>
    </context-param>
    <context-param>
    <param-name>password</param-name>
    <param-value>password</param-value>
    </context-param>
    <servlet>
    <servlet-name>ParameterServlet</servlet-name>
    <servlet-class>ParameterServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>ParameterServlet</servlet-name>
    <url-pattern>/ParameterServlet</url-pattern>
    </servlet-mapping>
    </web-app>
    ParameterServlet
    import java.io.IOException;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletContext;
    import javax.servlet.ServletException;
    import javax.servlet.ServletOutputStream;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class ParameterServlet extends HttpServlet {
    private String dbName = "";
    private String dbPassword = "";
    public void init(ServletConfig config) throws ServletException {
    super.init(config);
    ServletContext context = getServletContext();
    dbName = context.getInitParameter("name");
    dbPassword = context.getInitParameter("password");
    public void doGet(HttpServletRequest req, HttpServletResponse res)
    throws IOException {
    ServletOutputStream out = res.getOutputStream();
    res.setContentType("text/html");
    out.println("<html><head><title>Basic Servlet</title></head>");
    out.println("<body>Database username is <b>" + dbName);
    out.println("</b><br>Database password is <b>" + dbPassword + "</b>");
    out.println("</body></html>");
    "Plan.xml"
    <?xml version='1.0' encoding='UTF-8'?>
    <deployment-plan xmlns="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" global-variables="false">
    <application-name>virtual</application-name>
    <variable-definition>
    <variable>
         <name>name</name>
         <value>akshay1</value>
         </variable>
         <variable>
         <name>password</name>
         <value>koul1</value>
         </variable>
    </variable-definition>
    <module-override>
    <module-name>virtual</module-name>
    <module-type>war</module-type>
    <module-descriptor external="false">
    <root-element>web-app</root-element>
    <uri>WEB-INF/web.xml</uri>
         <variable-assignment>
              <name>name</name>
              <xpath>/web-app/context-param/[param-name="name"]/param-value</xpath>
              <operation>replace</operation>
         </variable-assignment>
         <variable-assignment>
              <name>password</name>
              <xpath>/web-app/context-param/[param-name="password"]/param-value</xpath>
              <operation>replace</operation>
         </variable-assignment>
    </module-descriptor>
    </module-override>
    <config-root>C:\DOCUME~1\user\LOCALS~1\Temp\user\.\config\deployments\virtual\plan</config-root>
    </deployment-plan>
    It works for me... I think your "web.xml" is causing the issue.
    Try replacing
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    with
    <?xml version='1.0' encoding='WINDOWS-1252'?>
    <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    Hope this helps.
    -Akshay

  • Q: Changing login-config with a deployment plan

    Hi everybody,
    I have an application for which the developer sets the login-config in web.xml as follows:
    <login-config>
    <auth-method>BASIC</auth-method>
    <realm-name>Sec_Con-Realm</realm-name>
    </login-config>
    But I need it to be
    <login-config>
    <auth-method>CLIENT-CERT</auth-method>
    <realm-name>myrealm</realm-name>
    </login-config>
    So I defined a deployment plan like this:
    <?xml version='1.0' encoding='UTF-8'?>
    <deployment-plan xmlns="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">
    <application-name>AppTest</application-name>
    <variable-definition>
    <variable>
         <name>LoginConfig_AuthMethod</name>
         <value>CLIENT-CERT</value>
    </variable>
    <variable>
         <name>LoginConfig_RealmName</name>
         <value>myrealm</value>
    </variable>
         </variable-definition>
    <module-override>
    <module-name>AppTest.ear</module-name>
    <module-type>ear</module-type>
    <module-descriptor external="true">
    <root-element>weblogic-application</root-element>
    <uri>META-INF/weblogic-application.xml</uri>
    </module-descriptor>
    <module-descriptor external="false">
    <root-element>application</root-element>
    <uri>META-INF/application.xml</uri>
    </module-descriptor>
    <module-descriptor external="true">
    <root-element>wldf-resource</root-element>
    <uri>META-INF/weblogic-diagnostics.xml</uri>
    </module-descriptor>
    </module-override>
    <module-override>
    <module-name>AppTest.war</module-name>
    <module-type>war</module-type>
    <module-descriptor external="true">
    <root-element>weblogic-web-app</root-element>
    <uri>WEB-INF/weblogic.xml</uri>
    </module-descriptor>
    <module-descriptor external="false">
    <root-element>web-app</root-element>
    <uri>WEB-INF/web.xml</uri>
    <variable-assignment>
         <name>LoginConfig_AuthMethod</name>
              <xpath>/web-app/login-config/auth-method</xpath>
              <operation>replace</operation>
         </variable-assignment>
    <variable-assignment>
         <name>LoginConfig_RealmName</name>
              <xpath>/web-app/login-config/realm-name</xpath>
              <operation>replace</operation>
         </variable-assignment>
    </module-descriptor>
    </module-override>
    </deployment-plan>
    But apparently my deployment plan doesn't work. If I set web.xml manually to have CLIENT-CERT/myrealm the application works. When I leave it at BASIC/Sec_Con-Realm it doesn't and asks to enter user/passwd. It seams as if the deployment plan were ignored. I don't get any errors or such, just the wrong behavior.
    I use this WLST clause to deploy the EAR:
    deploy('AppTest', 'dist/AppTest.ear', targets='node4', planPath='config/plan.xml', timeout=600)
    The target WLS version is 10.3.4. Any clues?
    Regards
    Slawo.

    Ivan, I don't know if this will work or not, but if you look at Edwin's example here http://biemond.blogspot.com/2009/04/using-weblogic-deployment-plan-to.html he uses the following syntax xpath so that you know which context-param needs to be replaced:
    <variable-assignment>
    <name>org.mytests.env</name>
    <xpath>/web-app/context-param/[param-name="org.mytests.env"]/param-value</xpath>
    <operation>replace</operation>
    </variable-assignment>
    Give that a shot

  • Weblogic 10.3 - changing jndi-name with deployment plan fails

    I was trying to alter the global jndi name of a stateless ejb by using a deployment plan, but can't get it to work.
    - to be able to replace it later on with a deployment plan, I specify a jndi-name in weblogic-ejb-jar.xml (so I do not use the @mappedName)
    e.g.
    <?xml version="1.0" encoding="UTF-8"?>
    <weblogic-ejb-jar xmlns="http://www.bea.com/ns/weblogic/10.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/10.0 http://www.bea.com/ns/weblogic/10.0/weblogic-ejb-jar.xsd">
         <weblogic-enterprise-bean>
              <ejb-name>ExampleService</ejb-name>
              <enable-call-by-reference>true</enable-call-by-reference>
              <stateless-session-descriptor>
                   <business-interface-jndi-name-map>
                        <business-remote>com.example.ExampleServiceRemote</business-remote>
                        <jndi-name>com.example.ExampleService#com.example.ExampleServiceRemote</jndi-name>
                   </business-interface-jndi-name-map>
              </stateless-session-descriptor>
         </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    - during deployment I specify a deploymentPlan with following content:
    <variable-definition>
    <variable>
    <name>ejb_jndiname_ExampleService</name>
    <value>ExampleService</value>
    </variable>
    </variable-definition>
    <module-override>
    <module-name>ExampleService.jar</module-name>
    <module-type>ejb</module-type>
    <module-descriptor external="true">
    <root-element>weblogic-ejb-jar</root-element>
    <uri>meta-inf/weblogic-ejb-jar.xml</uri>
    <variable-assignment>
    <name>ejb_jndiname_ExampleService</name>
    <xpath>/weblogic-ejb-jar/weblogic-enterprise-bean/\[ejb-name="ExampleService"\]/stateless-session-descriptor/business-interface-jndi-name-map/\[business-remote="com.example.ExampleServiceRemote"\]/jndi-name</xpath>
    <operation>replace</operation>
    </variable-assignment>
    </module-descriptor>
    </module-override>
    - after deployment, the original jndi-name ("com.example.ExampleService#com.example.ExampleServiceRemote") is active in the jndi tree instead of "ExampleService"
    p.s. When I specified the jndi-name in weblogic-ejb.jar.xml as
         <weblogic-enterprise-bean>
              <ejb-name>ExampleService</ejb-name>
              <enable-call-by-reference>true</enable-call-by-reference>
              <jndi-name>com.example.ExampleService#com.example.ExampleServiceRemote</jndi-name>
         </weblogic-enterprise-bean>
    and the replace in the deployment plan as
    <variable-assignment>
    <name>ejb_jndiname_SecurityService</name>
    <xpath>/weblogic-ejb-jar/weblogic-enterprise-bean/\[ejb-name="ExampleService"\]/jndi-name</xpath>
    <operation>replace</operation>
    </variable-assignment>
    the replacement does work (checked by verifying the jndi-name within the deployed ear using the console), but the problem then is that the jndi-name does not appear in the jndi tree (that's why I tried the <business-interface-jndi-name-map>)
    Any ideas?
    Kind regards,
    Ben
    Edited by: user11230128 on 4-jun-2009 7:42

    After a Service Request and some trial and error, I got it to work after adding the following part in each 'jar module override' section of the deployment plan:
    <module-descriptor external="false">
    <root-element>ejb-jar</root-element>
    <uri>META-INF/ejb-jar.xml</uri>
    </module-descriptor>
    Apparantly this is needed even though there is no ejb-jar.xml in the jar.
    So the deployment plan has to be something like:
    <variable-definition>
    <variable>
    <name>ejb_jndiname_ExampleService</name>
    <value>ExampleService</value>
    </variable>
    </variable-definition>
    <module-override>
    <module-name>ExampleService.jar</module-name>
    <module-type>ejb</module-type>
    <module-descriptor external="false">
    <root-element>weblogic-ejb-jar</root-element>
    <uri>meta-inf/weblogic-ejb-jar.xml</uri>
    <variable-assignment>
    <name>ejb_jndiname_ExampleService</name>
    <xpath>/weblogic-ejb-jar/weblogic-enterprise-bean/[ejb-name="ExampleService"]/stateless-session-descriptor/business-interface-jndi-name-map/[business-remote="com.example.ExampleServiceRemote"]/jndi-name</xpath>
    <operation>replace</operation>
    </variable-assignment>
    </module-descriptor>
    <module-descriptor external="false">
    <root-element>ejb-jar</root-element>
    <uri>META-INF/ejb-jar.xml</uri>
    </module-descriptor>
    </module-override>
    ...

  • Remote deploys from Windows to Linux fail with deployment plans on WLS 10.0

    Hi there,
    We're using WLS 10.0.1 running in a RHEL environment (actually CentOS release 4.7 for development), and attempting to perform remote deploys from Windows work stations using the weblogic.Deployer ant task.
    It works fine when not using deployment plans, or when performing a remote deploy from a unix based work station such as a Mac. However, introducing a deployment plan causes a failure only when run from Windows.
    The log trace follows:
    weblogic.Deployer -debug -remote -verbose -upload -noexit -name obpservices -source C:\work\obf\ver4.0\services\target\obpservices.war -targets obEnterpriseServer -adminurl t3://wlsdev:7001 -user weblogic -password ******** -redeploy -plan C:\work\obf\ver4.0\services/src/runtime/deployment-plans/steves-deployment-plan.xml
    weblogic.Deployer invoked with options: -debug -remote -verbose -upload -noexit -name obpservices -source C:\work\obf\ver4.0\services\target\obpservices.war -targets obEnterpriseServer -adminurl t3://wlsdev:7001 -user weblogic -redeploy -plan C:\work\obf\ver4.0\services/src/runtime/deployment-plans/steves-deployment-plan.xml
    [WebLogicDeploymentManagerImpl.<init>():103] : Constructing DeploymentManager for J2EE version V1_4 deployments
    [WebLogicDeploymentManagerImpl.getNewConnection():146] : Connecting to admin server at wlsdev:7001, as user weblogic
    [ServerConnectionImpl.getEnvironment():288] : setting environment
    [ServerConnectionImpl.getEnvironment():291] : getting context using t3://wlsdev:7001
    [ServerConnectionImpl.getMBeanServer():239] : Connecting to MBeanServer at service:jmx:t3://wlsdev:7001/jndi/weblogic.management.mbeanservers.domainruntime
    [ServerConnectionImpl.getMBeanServer():239] : Connecting to MBeanServer at service:jmx:t3://wlsdev:7001/jndi/weblogic.management.mbeanservers.runtime
    [DomainManager.resetDomain():36] : Getting new domain
    [DomainManager.resetDomain():39] : Using pending domain: false
    [MBeanCache.addNotificationListener():96] : Adding notification listener for weblogic.deploy.api.spi.deploy.mbeans.TargetCache@359df4
    [MBeanCache.addNotificationListener():103] : Added notification listener for weblogic.deploy.api.spi.deploy.mbeans.TargetCache@359df4
    [MBeanCache.addNotificationListener():96] : Adding notification listener for weblogic.deploy.api.spi.deploy.mbeans.ModuleCache@375edb
    [MBeanCache.addNotificationListener():103] : Added notification listener for weblogic.deploy.api.spi.deploy.mbeans.ModuleCache@375edb
    [ServerConnectionImpl.initialize():171] : Connected to WLS domain: obportal_domain
    [ServerConnectionImpl.setRemote():482] : Running in remote mode
    [ServerConnectionImpl.init():161] : Initializing ServerConnection : [email protected]9a
    [BasicOperation.dumpTmids():691] : Incoming tmids:
    [BasicOperation.dumpTmids():693] : {Target=obEnterpriseServer, WebLogicTargetType=server, Name=obpservices}, targeted=true
    [RedeployOperation.setupPaths():86] : in place redeploy: false from moduleArchive: C:\work\obf\ver4.0\services\target\obpservices.war
    [RedeployOperation.setupPaths():95] : redeploy src path: C:\work\obf\ver4.0\services\target\obpservices.war
    [BasicOperation.deriveAppName():140] : appname established as: obpservices
    <20/10/2009 10:47:57 AM EST> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating redeploy operation for application, obpservices [archive: C:\work\obf\ver4.0\services\target\obpservices.war], to obEnterpriseServer .>
    [ServerConnectionImpl.upload():658] : Uploaded app to /opt/bea/user_projects/domains/obportal_domain/servers/AdminServer/upload/obpservices
    [BasicOperation.dumpTmids():691] : Incoming tmids:
    [BasicOperation.dumpTmids():693] : {Target=obEnterpriseServer, WebLogicTargetType=server, Name=obpservices}, targeted=true
    [BasicOperation.loadGeneralOptions():608] : Delete Files:false
    Timeout :3600000
    Targets:
    obEnterpriseServer
    ModuleTargets={}
    SubModuleTargets={}
    Files:
    null
    Deployment Plan: \opt\bea\user_projects\domains\obportal_domain\servers\AdminServer\upload\obpservices\plan\steves-deplo
    yment-plan.xml
    App root: \opt\bea\user_projects\domains\obportal_domain\servers\AdminServer\upload\obpservices
    App config: \opt\bea\user_projects\domains\obportal_domain\servers\AdminServer\upload\obpservices\plan
    Deployment Options: {isRetireGracefully=true,isGracefulProductionToAdmin=false,isGracefulIgnoreSessions=false,rmiGracePeriod=-1,retireTimeoutSecs=-1,undeployAllVersions=false,archiveVersion=null,planVersion=null,isLibrary=false,libSpecVersion=null,libImplVersion=null,stageMode=null,clusterTimeout=3600000,altDD=null,altWlsDD=null,name=obpservices,securityModel=null,securityValidationEnabled=false,versionIdentifier=null,isTestMode=false,forceUndeployTimeout=0,defaultSubmoduleTargets=true,timeout=0}
    [BasicOperation.execute():425] : Initiating redeploy operation for app, obpservices, on targets:
    [BasicOperation.execute():427] : obEnterpriseServer
    [RedeployOperation.initializeTask():55] : Starting task with path: \opt\bea\user_projects\domains\obportal_domain\servers\AdminServer\upload\obpservices\app\obpservices.war
    java.io.FileNotFoundException: \opt\bea\user_projects\domains\obportal_domain\servers\AdminServer\upload\obpservices\plan\steves-deployment-plan.xml (No such file or directory)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:106)
    at weblogic.deploy.internal.adminserver.operations.AbstractOperation.parsePlan(AbstractOperation.java:1027)
    at weblogic.deploy.internal.adminserver.operations.AbstractOperation.execute(AbstractOperation.java:133)
    at weblogic.management.deploy.internal.DeployerRuntimeImpl$2.run(DeployerRuntimeImpl.java:816)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.management.deploy.internal.DeployerRuntimeImpl.performDeployerActions(DeployerRuntimeImpl.java:810)
    at weblogic.management.deploy.internal.DeployerRuntimeImpl.redeploy(DeployerRuntimeImpl.java:568)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at weblogic.management.jmx.modelmbean.WLSModelMBean.invoke(WLSModelMBean.java:443)
    at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
    at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
    at weblogic.management.mbeanservers.domainruntime.internal.FederatedMBeanServerInterceptor.invoke(FederatedMBeanServerInterceptor.java:248)
    at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.invoke(WLSMBeanServerInterceptorBase.java:153)
    at weblogic.management.mbeanservers.internal.SecurityMBeanMgmtOpsInterceptor.invoke(SecurityMBeanMgmtOpsInterceptor.java:63)
    at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.invoke(WLSMBeanServerInterceptorBase.java:153)
    at weblogic.management.mbeanservers.internal.SecurityInterceptor.invoke(SecurityInterceptor.java:443)
    at weblogic.management.mbeanservers.internal.AuthenticatedSubjectInterceptor$10.run(AuthenticatedSubjectInterceptor.java:377)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.management.mbeanservers.internal.AuthenticatedSubjectInterceptor.invoke(AuthenticatedSubjectInterceptor.java:375)
    at weblogic.management.jmx.mbeanserver.WLSMBeanServer.invoke(WLSMBeanServer.java:310)
    at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1408)
    at javax.management.remote.rmi.RMIConnectionImpl.access$100(RMIConnectionImpl.java:81)
    at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1245)
    at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1348)
    at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:782)
    at javax.management.remote.rmi.RMIConnectionImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:479)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:475)
    at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:59)
    at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:1016)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
    [ServerConnectionImpl.close():334] : Closing DM connection
    [ServerConnectionImpl.close():354] : Unregistered all listeners
    [ServerConnectionImpl.closeJMX():374] : Closed JMX connection
    [ServerConnectionImpl.closeJMX():386] : Closed Runtime JMX connection
    [ServerConnectionImpl.closeJMX():398] : Closed Edit JMX connection
    Note the file path that cannot be found: "\opt\bea\user_projects\domains\obportal_domain\servers\AdminServer\upload\obpservices\plan\steves-deployment-plan.xml ".
    Of course this file does actually exist when the correct path separators are used.
    Is this a bug? Is there anything we can do about it? The chances of us upgrading WLS are very remote unfortunately.
    Thanks in advance,
    Steve C

    This is something you should definitely file an Oracle support ticket for. It's entirely possible there's a patch for this.

  • Deployment plan to update web.xml

    Hello,
    Is it possible to use a deployement plan to update the web.xml file of an war inside an ear ?
    I would like to map a servlet on a new URI using a new workmanager by configuration (I mean once my application is built) I suppose it is possible to use the deployment plan to add a section inside the web.xml.
    For example, I would like to add the folowing section :
    <servlet>
    <servlet-name>DummyServlet</servlet-name>
    <servlet-class>com.company.servlets.DummyServlet</servlet-class>
    <init-param>
    <param-name>wl-dispatch-policy</param-name>
    <param-value>DummyWorkManager</param-value>
    </init-param>
    </servlet>
    <servlet-mapping>
    <servlet-name>DummyServlet</servlet-name>
    <url-pattern>/myDummyServlet</url-pattern>
    </servlet-mapping>
    Thank you for helping me on this point
    Best Regards,
    C.

    To my knowledge you can not add elements to your deployment descriptors, but you can change them, for example
    say we have the following ejb-jar.xml
    <ejb-jar ...>
        <enterprise-beans>
            <session>
                <ejb-name>Bedrijf</ejb-name>
                <env-entry>
                    <env-entry-name>something</env-entry-name>
                    <env-entry-type>java.lang.String</env-entry-type>
                    <env-entry-value>iets</env-entry-value>
                </env-entry>
            </session>
        </enterprise-beans>
    </ejb-jar>and we want to change the value of something. Now we can generate a plan.xml (for example by using weblogic.Plangenerator
    http://download.oracle.com/docs/cd/E13222_01/wls/docs90/deployment/wlplangenerator.html). When we do this for an EAR
    file we get something like the following:
    <?xml version='1.0' encoding='UTF-8'?>
    <deployment-plan xmlns="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">
      <application-name>test</application-name>
      <variable-definition>
        <variable>
          <name>SessionDescriptor_timeoutSecs_12870427304900</name>
          <value>1800</value>
        </variable> 
        <variable>
            <name>something</name>
            <value>anders</value>
        </variable>
      </variable-definition>
      <module-override>
        <module-name>EJBSessionBeans.ear</module-name>
        <module-type>ear</module-type>
        <module-descriptor external="true">
          <root-element>weblogic-application</root-element>
          <uri>META-INF/weblogic-application.xml</uri>
          <variable-assignment>
            <name>SessionDescriptor_timeoutSecs_12870427304900</name>
            <xpath>/weblogic-application/session-descriptor/timeout-secs</xpath>
          </variable-assignment>
        </module-descriptor>
        <module-descriptor external="false">
          <root-element>application</root-element>
          <uri>META-INF/application.xml</uri>
        </module-descriptor>
        <module-descriptor external="true">
          <root-element>wldf-resource</root-element>
          <uri>META-INF/weblogic-diagnostics.xml</uri>
        </module-descriptor>
      </module-override>
      <module-override>
        <module-name>Model.jar</module-name>
        <module-type>ejb</module-type>
        <module-descriptor external="true">
          <root-element>weblogic-ejb-jar</root-element>
          <uri>META-INF/weblogic-ejb-jar.xml</uri>
        </module-descriptor>
        <module-descriptor external="false">
          <root-element>ejb-jar</root-element>
          <uri>META-INF/ejb-jar.xml</uri>
           <variable-assignment>
            <name>something</name>
            <xpath>/ejb-jar/enterprise-beans/session/[ejb-name="Bedrijf"]/env-entry/[env-entry-name="something"]/env-entry-value</xpath>
            <operation>replace</operation>
          </variable-assignment>
        </module-descriptor>
      </module-override>
      <module-override>
        <module-name>Userinterface.war</module-name>
        <module-type>war</module-type>
        <module-descriptor external="true">
          <root-element>weblogic-web-app</root-element>
          <uri>WEB-INF/weblogic.xml</uri>
          <hash-code>1287042734068</hash-code>
        </module-descriptor>
        <module-descriptor external="false">
          <root-element>web-app</root-element>
          <uri>WEB-INF/web.xml</uri>
        </module-descriptor>
      </module-override>
      <config-root>...</config-root>
    </deployment-plan>To this plan.xml we added a variable definition
    <variable-definition>
          <variable>
            <name>something</name>
            <value>anders</value>
        </variable>
    </variable-definition>To change the contents of the variable something we add the following to the ejb-jar module section
    <module-descriptor external="false">
          <variable-assignment>
            <name>something</name>
            <xpath>/ejb-jar/enterprise-beans/session/[ejb-name="Bedrijf"]/env-entry/[env-entry-name="something"]/env-entry-value</xpath>
            <operation>replace</operation>
          </variable-assignment>
        </module-descriptor>The same steps can be followed when you want to change the contents of your web.xml (but note that the elements must be present
    otherwise the xpath assignment will not work)

  • Deployment Plan with dependent Metadata in AIA11g

    Hi,
    when I generate the Deployment Plan there is only the link to ApplicationConnectorServiceLibrary and ApplicationObjectLibrary. How to link dependent Metadata like customized XREF, DVM and AIAConfigurationProperties, in gererated Deployment Plan? Is it possible with Annotation in composite? Or must I copy the whole Metadata to new server and do an manually update of MDS?
    Thanks in advance
    Marcel

    Hi Marcel,
    In your case the Deployment plan needs to be customized before using it in the install driver.
    For uploading the XREF, DVM and AIAConfigurationProperties into MDS, include your file location
    <!--UpdateMetadata wlserver="pips.test" >
    <fileset dir="${AIA_HOME}/AIAMetaData">
    <include name="config/AIAConfigurationProperties.xml" />
    <include name="xref/**" />
    </fileset>
    </UpdateMetadata -->
    Using Install driver, you can automate every configuration required before composite deployments.
    Thanks,
    Ashok

  • Cluster environment with Deployment Plan losing variable values

    Hi all,
    Our environment uses Weblogic Server 10.2, with 2 Managed Servers in Cluster, in Feisty Fawn Ubuntu.
    Our app has a bunch of variables configured in the web.xml with custom values, most of which are endpoint and JDBC related. Our web.xml has some default values in these variables, and we created a Deployment Plan to change these values in deployment-time.
    The problem is that, after a random amount of time, the cluster is "losing" these configurations. At first, everything goes fine, but then, we start receiving errors because the endpoint being used is not the Deployment Plan's anymore, but the one from web.xml. It's completely random, and come and go without notice.
    Is there a known bug about this? Is this a configuration issue?
    Any help would be appreciated!
    Thanks,
    Francisco

    Are you redeploying the applications at all?
    Francisco Cavedon wrote:
    Hi all,
    Our environment uses Weblogic Server 10.2, with 2 Managed Servers in Cluster, in Feisty Fawn Ubuntu.
    Our app has a bunch of variables configured in the web.xml with custom values, most of which are endpoint and JDBC related. Our web.xml has some default values in these variables, and we created a Deployment Plan to change these values in deployment-time.
    The problem is that, after a random amount of time, the cluster is "losing" these configurations. At first, everything goes fine, but then, we start receiving errors because the endpoint being used is not the Deployment Plan's anymore, but the one from web.xml. It's completely random, and come and go without notice.
    Is there a known bug about this? Is this a configuration issue?
    Any help would be appreciated!
    Thanks,
    Francisco

Maybe you are looking for