Problem setting the PoolList attribute in a WLST script

Hello !
I ran the configToScript command over config.xml which has a JDBCMultipool composed of two JDBCpools. It threw the next script to create the JDBC Multipool:
print 'configuring resource: JDBCMultiPool/MyJDBC MultiPool '
try:
myResource = create("MyJDBC MultiPool","JDBCMultiPool")
except Exception:
# print 'This resource JDBCMultiPool with name MyJDBC MultiPool failed to be created. The script will try to get it anyways.'
myResource = (getTarget("JDBCMultiPool/MyJDBC MultiPool"))
myResource.setPoolList("poolCatalogos01,poolCatalogos02")
#cmo.addTarget(clusterTarget2)
# If this fails you will have to add this target manually from the console
from java.lang import Exception
from java.lang import Throwable
try:
myResource.addTarget(clusterTarget2)
except Throwable, th:
print 'Problem in adding target '+clusterTarget2+ ' due to '+th.toString()
However when the script is executed it fails at the line:
myResource.setPoolList("poolCatalogos01,poolCatalogos02")
and shows this error message:
TypeError: setPoolList(): 1st arg can't be coerced to weblogic.management.configuration.JDBCConnectionPoolMBean[]
I have tried some other ways to set this attribute, however I hadn't had any success. If some one can provide some advice, I will be grateful.
By the way:
I am using a WLST version downloaded last April, of 2004.
Thanks !

There is a bug in configToScript that is not generating the right script for setting the Pool list. This will be fixed in the next version of wlst. Here's a workaround.
try:
myResource = create("MyJDBC MultiPool","JDBCMultiPool")
except Exception:
# print 'This resource JDBCMultiPool with name MyJDBC MultiPool failed to be created. The script will try to get it anyways.'
myResource = (getTarget("JDBCMultiPool/MyJDBC MultiPool"))
p1 = getTarget("JDBCConnectionPool/poolCatalogos02")
p2 = getTarget("JDBCConnectionPool/poolCatalogos02_BEA")
plist = jarray.array([p1,p2], weblogic.management.configuration.JDBCConnectionPoolMBean)
myResource.setPoolList(plist)
let me know if u see any other problems, thanks,
-satya

Similar Messages

  • Setting the logonHours attribute for a user in Active Directory

    Hi Anyone,
    I'm a brasilian guy and I need your help. How can I set the logonHours attribute on my Active Directory?
    I have this code but it doesn't works good:
        public void setLogonHours(boolean[] logonHoursBits){
            int i;
            int j;
            int k;
            int index21 = 0;
            int index24 = 0;
            byte[] byteLogonHour = new byte[21];
            byte byte8Hours = 0;
            for(i=0; i <= 6; i++){
                for(j=1; j <= 3; j++){
                    for(k=7; k >= 0; k--){
                        if (i < 6){
                            if (logonHoursBits[i] == (boolean)(index24 == 0) ? true : false){
                                byte8Hours += (byte)Math.pow(2,k);
                        else{
                            if (logonHoursBits[0] == (boolean)(index24 == 0) ? true : false){                           
                                byte8Hours += (byte)Math.pow(2,k);
                        index24++;
                    byteLogonHour[index21] = byte8Hours;
                    index21++;
                index24 = 0;
            try{
                String nome = "CN=Dryelle,OU=Pesquisa,DC=cifya,DC=com,DC=br";
                ctx = new InitialLdapContext(env,null);
                ModificationItem logonHours[] = new ModificationItem[1];
                logonHours[0]= new ModificationItem(DirContext.REPLACE_ATTRIBUTE, new BasicAttribute("logonHours",byteLogonHour));
                ctx.modifyAttributes(name,logonHours);
                System.out.println("Atributo logonHours alterado com sucesso.");
            catch (NamingException e) {
               System.err.println("Problema na altera??o " + e);
        }the code set the attribute but wrong. Can anyone help-me? It's making me crazy.
    Sorry about my poor english.
    Tks.
    Edited by: th_slopes on Aug 15, 2008 5:50 PM

    DirContext ctx = new InitialDirContext(pr);
              BasicAttributes entry = new BasicAttributes(true);
              String entryDN = "cn=CharbelHad,ou=test users,dc=test,dc=dev";
              Attribute cn = new BasicAttribute("cn", "ChHad");
              Attribute street = (new BasicAttribute("streetAddress", "Ach"));
              Attribute loginPreW2k = (new BasicAttribute("sAMAccountName", "[email protected]"));
              Attribute login = (new BasicAttribute("userPrincipalName", "[email protected]"));
              Attribute sn = (new BasicAttribute("sn", "Chl"));
              Attribute pwd = new BasicAttribute("unicodePwd", "\"Ch@341\"".getBytes("UTF-8"));
    Attribute userAccountControl = new BasicAttribute("userAccountControl", "512");
              Attribute oc = new BasicAttribute("objectClass");
              oc.add("top");
              oc.add("person");
              oc.add("organizationalPerson");
              oc.add("user");
              // build the entry
              entry.put(cn);
              entry.put(street);
              entry.put(sn);
              entry.put(userAccountControl);
              entry.put(pwd);
              entry.put(login);
              entry.put(loginPreW2k);
              entry.put(oc);
              ctx.createSubcontext(entryDN, entry);

  • How to set the DFF Attribute Programmatically?

    hi
    how to set the DFF Attribute Programmatically in Process Request of CO
    thanx

    Hi
    Do u want to set the value in DFF Programmatically ?
    u can capture the VO used for DFF and set the the value in controller.
    Thanks

  • Jdev11G XMLMenuModel : Setting the "destination" attribute for the itemNode

    Hi,
    I am trying to set the "destination" attribute for the itemNode in the metadata.xml.This is the URI to which the user must be taken on clicking that node. But it is unable to pick the URI set for the destination attribute and hence there is no navigation that happens.Using the "action" attribute works fine. But I need to use the "destination" attribute.
    Here are some of the files:
    The metadata.xml (root_menu.xml):
    <?xml version="1.0" encoding="windows-1252" ?>
    <menu xmlns="http://myfaces.apache.org/trinidad/menu">
    <groupNode id="groupNode1" idref="itemNode1" label="Merchant">
    <itemNode id="itemNode1" label="Sites" action="site_action" rendered="#{testBean.test}"
    focusViewId="/common/site/Site.jspx">
    </itemNode>
    <groupNode id="groupNode2" idref="itemNode2" label="Settings">
    <itemNode id="itemNode2" label="Page Template" action="template_action"
    focusViewId="/common/template/TemplateRules.jspx">
    </itemNode>
    <itemNode id="itemNode3" label="Configuration Parameters" destination="http://www.google.com"
    action="config_action" focusViewId="/common/others/ConfigurationParameters.jspx">
    </itemNode>
    </groupNode>
    <groupNode id="groupNode3" idref="itemNode4" label="System Admin">
    <itemNode id="itemNode4" label="Cache Invalidation" destination="/faces/common/others/CacheInvalidation.jspx"
    focusViewId="/common/others/CacheInvalidation.jspx">
    </itemNode>
    </groupNode>
    </groupNode>
    </menu>
    The faces_config.xml:
    <?xml version="1.0" encoding="windows-1252"?>
    <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee">
    <application>
    <default-render-kit-id>oracle.adf.rich</default-render-kit-id>
    </application>
    <navigation-rule>
    <navigation-case>
    <from-outcome>site_action</from-outcome>
    <to-view-id>/common/site/Site.jspx</to-view-id>
    </navigation-case>
    <navigation-case>
    <from-outcome>template_action</from-outcome>
    <to-view-id>/common/template/TemplateRules.jspx</to-view-id>
    </navigation-case>
    <navigation-case>
    <from-outcome>config_action</from-outcome>
    <to-view-id>/common/others/ConfigurationParameters.jspx</to-view-id>
    </navigation-case>
    <navigation-case>
    <from-outcome>cache_action</from-outcome>
    <to-view-id>/common/others/CacheInvalidation.jspx</to-view-id>
    </navigation-case>
    </navigation-rule>
    <managed-bean>
    <managed-bean-name>root_menu</managed-bean-name>
    <managed-bean-class>org.apache.myfaces.trinidad.model.XMLMenuModel</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    <managed-property>
    <property-name>createHiddenNodes</property-name>
    <value>false</value>
    </managed-property>
    <managed-property>
    <property-name>source</property-name>
    <property-class>java.lang.String</property-class>
    <value>/WEB-INF/root_menu.xml</value>
    </managed-property>
    </managed-bean>
    <managed-bean>
    <managed-bean-name>testBean</managed-bean-name>
    <managed-bean-class>testBean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    </faces-config>
    Can you please tell me what else has to be set for the "destination" attribute to work?
    Thanks,
    Swapna

    The code you sent is not clear, could you send your jspx page.
    Thanks

  • Error deploying EJB on weblogic: Unable to set the transaction attribute

    Hi,
    I'm trying to deploy an application in WL10.3.2 and an error occurred during activation of changes.
    Here is the error message from the log file:
    <Jun 6, 2011 1:28:27 PM MDT> <Error> <Deployer> <BEA-149205> <Failed to initialize the application 'serverEAR-2' due to error weblogic.application.ModuleException: Exception preparing module: EJBModule(serverEJB-2.8.0.jar)
    Unable to deploy EJB: C:\oracle\Middleware\user_projects\domains\base_domain\servers\Server_3\tmp\_WL_user\serverEAR-2\1zw7ao\serverEJB-2.8.0.jar from serverEJB-2.8.0.jar:
    Unable to set the transaction attribute for method 'saveActionGroup(EditableActionGroup)' on EJB 'ViewBean'. No matching method could be found. Please verify the method signature specified in the ejb-jar.xml file matches that of your Remote interface for this EJB.
    weblogic.application.ModuleException: Exception preparing module: EJBModule(serverEJB-2.8.0.jar)
    Unable to deploy EJB: C:\oracle\Middleware\user_projects\domains\base_domain\servers\Server_3\tmp\_WL_user\serverEAR-2\1zw7ao\serverEJB-2.8.0.jar from serverEJB-2.8.0.jar:
    Unable to set the transaction attribute for method 'saveActionGroup(EditableActionGroup)' on EJB 'ViewBean'. No matching method could be found. Please verify the method signature specified in the ejb-jar.xml file matches that of your Remote interface for this EJB.
         at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:454)
         at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:391)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:59)
         Truncated. see log file for complete stacktrace
    Caused By: weblogic.ejb.container.deployer.DeploymentDescriptorException: Unable to set the transaction attribute for method 'saveActionGroup(EditableActionGroup)' on EJB 'ViewBean'. No matching method could be found. Please verify the method signature specified in the ejb-jar.xml file matches that of your Remote interface for this EJB.
         at weblogic.ejb.container.deployer.MBeanDeploymentInfoImpl.processCTs(MBeanDeploymentInfoImpl.java:1502)
         at weblogic.ejb.container.deployer.MBeanDeploymentInfoImpl.processSpecificMethodCTs(MBeanDeploymentInfoImpl.java:1472)
         at weblogic.ejb.container.deployer.MBeanDeploymentInfoImpl.initializeTransactionAttribute(MBeanDeploymentInfoImpl.java:773)
         at weblogic.ejb.container.deployer.MBeanDeploymentInfoImpl.<init>(MBeanDeploymentInfoImpl.java:259)
         at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1190)
         Truncated. see log file for complete stacktrace
    Please help me...Thanks.

    In your ejb-jar.xml you are referring to a method saveActionGroup(EditableActionGroup) which is not defined in your remote interface.
    Maybe you have made some typo in the configuration. Check your transaction section, i.e.,
    <container-transaction>
                <method>
                    <ejb-name>ViewBean</ejb-name>
                    <method-name>saveActionGroup</method-name>
                    <method-params>
                        <method-param>package.EditableActionGroup</method-param>
                    </method-params>
                </method>
                <trans-attribute>Required</trans-attribute>
    </container-transaction>or something similar. See if the defined methods are corresponding to the methods defined in the remote interface.

  • Excel MySQL - To set the action attribute in a  form

    Hi All
    I am working on an application that requires to read data from Excel and update the table in MySQL. My java code works well and does the required. For the user to select an excel file, i have designed a form using JSP. This JSP form gets loaded through Tomcat..When the user browses and selects the required file, he then will click on the update button and the java code then should be executed.
    How can i set the action attribute in form tag to execute java code.
    Following is my code.
    <%@page
    language="java"
    import="javax.servlet.*,javax.servlet.http.*,java.io.*,java.util.*,java.sql.*"
    info="BulkUpdate"
    session="true"
    %>
    <html>
    <head></head>
    <title>Bulk Update Page</title>
    <body bgcolor="#FFcc00">
    <p style="margin-top: 0; margin-bottom: 0">
    <u><b><font color="#800000" size="4"><center>Update Data from Excel Sheet to Database</center></font></b></u></p><br>
    <p style="margin-top: 0; margin-bottom: 0">
    <font face="arial" color="#000080" align="left"><b>Bulk Update on :</b>
    <%
    java.util.Date date = new java.util.Date();
    %></font>
    <%
        out.print( date );
    %>
    <br><br>
    <b><font size="2" face="Arial" color="#000080">This page is used to Select the
    data and configuration file in the browser and update MYSQL database
    </font></b></p>
    <form action="http:\\localhost:8080\itasm\ExcelTest3.java" method="post" enctype="multipart/form-data">
      <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="98%" id="AutoNumber1">
        <tr>
          <td width="34%" bgcolor="#800000"><b>
      <font face="Arial" color="#FFFF00" size="2">Select the Excel File to update </font>
          </b></td>
          <td width="53%" bgcolor="#800000">
          <p align="left"><input size="34" type="file" name="spreadsheet" /></td>
          <td width="17%" bgcolor="#800000"><input type="submit" value="Update File" /></td>
        </tr><br>
    <tr>
    <td width="34%" bgcolor="#800000"><b>
    <font face="Arial" color="#FFFF00" size="2">Select the corresponding Configuration File</td>
    <td width="17%" bgcolor="#800000"><input size="34" type="file" name="configfile" /></td>
    <td width="53%" bgcolor="#800000"></td>
    </tr></font>
      </table>
    </form>
    <p style="margin-top: 0; margin-bottom: 0">
    </p>
    </body>
    </html>When i execute the above code rather than executing the code, it just displays it in the browser.
    Please help.
    Regards

    Hi Andy!
    I just started to set the tabindex on each item... it wasn't working.. I copied the example you gave.. ha.. you had taxindex --- TAX and I too didn't notice it.. so just want to mention it incase anyone does what I did.. copies without thinking..
    As you said in the previous post it is TABINDEX="n"
    Ha.. its a Monday.. Bill

  • Trying to set the entity attributes in before commit and get the following

    i get the following error when i try to set the entity attributes before commit.
    JBO-28202: Entities invalidated in beforeCommit(). Need to re-validate and post.
    can somebody let me know, how to re-validate and post.

    I Suggest you set its Attribute on EOImpl, override doDML, and before call super.doDML set your Attribute. There is a special reason to set Attribute on beforeCommit?
    Best Regards

  • Dynamically setting the vo attribute Update property

    Hi All,
    Can we set the vo attribute update property dynamically.if so please let me know how can we achieve this.
    I have a read only view..But in my process request i need to set the value for that attribute based on some condition.
    How can i achieve this.I cant set at bean level.only row level i need to set.
    Its a dynamically created seeded vo.
    Please help.
    Thanks
    Bharat

    Hi,
    Capture the VO row and then set the value on the view attribute.
    OAViewObject vo = (OAViewObject)am.findViewObject("viewinstance");
    If(vo!=null)
    Row row = (Row)vo.first();
    row.setAttribute("Attribute Name", "Value");
    Thanks,
    Gaurav

  • Can not set the value attribute of a ContextNode

    Hi,
       I am trying to set the value Attribute in a value Node it is a simple way but it gives me java.lang.NullPointerException error on the given line:
    wdcontext.current(ValueNodeName)Element.set(AttributeValueName)
    Thanks in advance
    Best Regards
    Beata

    Like all above suggested do this:
    wdContext.node(ValueNodeName).add(
               wdContext.node(ValueNodeName).create(ValueNode)Element()
    wdContext.node(ValueNodeName).moveLast();
    wdContext.current(ValueNode)Element().setATTR(..);

  • How do I set the mailhost attribute in Messaging Server 3.5?

    <B>Intent of the hostname aliases feature: </B><BR>
    In Messaging Server 3.5, the hostname aliases feature is designed to facilitate migrating and co-hosting. For
    instance, if you set up all of your sales and marketing users on one Messaging Server, but suspect that you'll
    want to split those groups in the future, you can give the sales users the mailhost value sales.company.com and
    the marketing users the mailhost value mktg.company.com. This feature can also be used for fast failover if
    you want to be able to move a group of users quickly from one Messaging Server to another.
    <P>
    <B>How to use hostname aliases and how to set mailhost and MessageHostName settings: </B><BR>
    Each user's mailhost attribute can have only one value. All users on a single Messaging Server do not need to
    have the same mailhost value in the LDAP directory. The user's mailhost value should match one of the
    MessageHostName attribute values in netscape.mail.conf. (On Unix, the path to this file is
    /etc/netscape.mail.conf. Windows NT users must use Notepad to create this file in
    server-root\bin\mail\Server\etc, where server-root is the base directory where your SuiteSpot servers are
    installed.)
    <P>
    With Messaging Server 3.5 and later, MessageHostName can have multiple values. Think of hostnames as
    colors. Each mail account in the LDAP server has a single color. Each Messaging Server has one or more
    colors. A Messaging Server will check an LDAP account's color (mailhost) against its own color(s)
    (MessageHostName), and if they match, the server considers the account to be local. <P>
    For example: <BR>
    MessageHostName=red.company.com,green.company.com,blue.company.com
    <BR>where original-host-name is the machine's real name. This entry must come first as the server uses the first
    entry to generate machine specific postmaster forms. The subsequent host names can be any values that you
    wish separated by commas that are inside the brackets. Do not place spaces anywhere on the line.
    <P>
    In this example, if the mailhost setting for the user is set for either red.company.com or green.company.com, or
    blue.company.com, the server will consider the user to be local. (Hostname aliases must also be configured in
    DNS. Please see the DNS section at the end of this technote.) No other Messaging Server should list either
    red.company.com or green.company.com or blue.company.com in the MessageHostName field. Mail could
    not be delivered properly if either red.company.com or green.company.com or blue.company.com were listed
    in any other server's MessageHostName field. A user with a mailhost setting of violet.company.com would not
    be considered local to this machine.
    <P>
    Although it is possible with Messaging Server 3.52 to list more than 16 different host names in the
    MessageHostName field, it is not recommended because increasing the number of hostnames in this field beyond
    16 will have a negative impact on performance. This feature is intended to provide fast failover and/or
    migration of users. If users need to be divided up into many smaller groups, the use of some other LDAP
    attribute is recommended.
    <P>
    In Messaging Server 3.0, you can associate a server with only one host name. Consequently, all mail accounts
    on a given server must have the same mailhost value in the LDAP directory. This should be the name of the
    server, i.e. host.company.com
    <P>
    </A>A note about DNS
    Hostname aliases must be configured in DNS. This is done with a CNAME record. For example:
    A 128.101.101.101
    CNAME
    <P>
    Additional MX records are not required to use hostname aliases.
    <P>
    If you aren't sure about how to configure your DNS records, consult the book <I>DNS and Bind </I> by Paul Albitz and
    Cricket Liu.

    You can find the connection settings in Tools > Options > Advanced : Network : Connection
    See "Firefox connection settings":
    *[[Firefox cannot load websites but other programs can]]

  • HOW to set the value attribute of FORM INPUT data to a variable in a JSP

    eg. Registration.jsp
    The data is accessed from an hidden field called course
    for example, if I have "Java programming" in the field course, and I use
    an expression to access the value from the hidden field.
    **My problem is that the data gets truncated to "Java" , I need "Java Programming"to display. The code looks like this
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <INPUT TYPE="text" SIZE=12 NAME="course"
    VALUE=<%=getParameter("course") %>
    IS there ANY OTHER WAY to set the value of VALUE to a variable?

    Instead of value=<%=request.getParameter("course")%>
    Use double codes
    value="<%=request.getParameter("course")%>"

  • CSS - Setting the color attribute of the commandMenuItem

    Hello
    Under the menuBar in Jdeveloper resides an item called commandMenuItem. The
    color of this item always defaults to a Golden Brown Color. I can change the color
    attribute under the properties navigator and it takes the new color. However I'd like to have an item in the CSS to define the color of all the commandMenuItems.
    Is there a way of doing this.
    Any Help will be appreciated
    Regards
    Kes Moodley

    Hi,
    I am specifically interested in setting the text color of the .AFMenuBarItem. I have tried setting this color attribute in the CSS and it does not seem to take.
    The reference you pointed me to refers to the background and foreground color of the menu Bar. This is different to the text color on the menu Bar.
    Thanks,
    Kes

  • How to access and set the object attributes in a task flow?

    I have created a web service data control which has an operation having input as payload object. This payload object has two attributes min and max. I am calling a task flow in a dynamic region in which I want to display result of this operation for which i have to set the values for min and max. I want to set these values when I click the taskflow link. How to achieve this? I am new to adf.

    Hi Arun,
    Thanks for your reply.
    I have tried passing parameter to a task flow, but i cannot set the action to a task flow call because it already has action for a method in a dynamic region which renders the task flow at runtime. How do i set action to task flow call link? Also once i get the parameters into the page flow scope variables, i want to pass those to one of my data control operation which displays the result in that taskflow.(i dont want to create parameter form for this operation).

  • Problem setting the fillColor on dynamic tables using javascript

    I try to set the background color on some text fields that I put in a dynamic table. When I set the border color, everything works fine, but not with the fillColor. If I set the fillColor for the enter event for example, the field will only get a colored border, and when I click another field, the field turns completely colored. If I set an exit event with a different color, the field flickers before changing back to white. This happens in dynamic tables only. I am using Designer 8 on Windows XP. This problem has been confirmed by others, and in different forms.

    this.border.fill.color.value = "value" works for me
    value is in 255,255,255 rgb format

  • Problems setting the recording path

    I have recorded hundreds of songs successfully by setting the recording path to the project folders on my external hard drive. Now whenever I open a new project and go to record an audio file it ask me every time to set the recording path. I pick the location on my external, click save and then hit the record button and then the whole process starts all over.

    does your drive has a Sleep mode (or something like that) preference?that's after a certain time of inactivity...goes to sleep
    Might be that..
    A

Maybe you are looking for