WLST to create a JMS FileStore

I am trying to create a file store for JMS using the following commands. This does not seem to work. Can someone help? Am I doing it correctly? The sample provided seem to create a JDBC store for JMS but there are no samples for FileStore.
cd('/')
create('myFileStore', 'FileStore')
cd('/')
create("myJMSServer", "JMSServer")
cd('/JMSServers/myJMSServer')
cmo.setPersistentStore(getMBean('/FileStores/myFileStore'))
I keep getting the message that I need to be connected. Can I not do this offline?

siva01 you might be aware of this, but for the benefit of other readers I'd like to point out that the WebLogic Server Administration Console has a record facility that can capture a configuration interaction as a WLST script that can be edited or used directly. Using the console to create a JMS server and clicking on the "Create a new Store" button in that dialog results in the following script:
cd('/')
cmo.createFileStore('MyFileStore')
cd('/FileStores/MyFileStore')
cmo.setDirectory('c:\\temp')
set('Targets',jarray.array([ObjectName('com.bea:Name=AdminServer,Type=Server')], ObjectName))
cd('/')
cmo.createJMSServer('MyJMSServer')
cd('/Deployments/MyJMSServer')
cmo.setPersistentStore(getMBean('/FileStores/MyFileStore'))
set('Targets',jarray.array([ObjectName('com.bea:Name=AdminServer,Type=Server')], ObjectName))
While there are limitations with this (you can't record security changes or deployment plan edits), this can be a considerable time saver in the generation of new WLST scripts.
For more details, please see:
http://e-docs.bea.com/wls/docs100/ConsoleHelp/taskhelp/console/RecordWLSTScripts.html
Loren Konkus
Staff Software Engineer
BEA Systems, Inc.

Similar Messages

  • How to create a JMS persistent file store using WLST in WLS 9.0?

    Anybody have a good example of this? When I try to create a fileStore and set it on my jms server I am getting the following error: "TypeError: setPersistentStore(): 1st arg can't be coerced to weblogic.management.configuration.PersistentStoreMBean'
    Thanks :)

    Hi,
    First Create Persistent Store ( FileStore / JDBCStore).
    File Store Creation is as follows:
    Store = create("PStore","FileStore")
    Set it's File Directory and Targets.
    then Create JMS Server and set its Persistent Store as File Store. Set JMS Server Target.

  • WLST : To create SAF Agent targeted on Migratable servers

    I am trying to write wlst to create SAF Agent targeted on Migratable servers on existing file store and jms server.
    cmo.createSAFAgent('SAFAgent');
    safagent = cmo.lookupSAFAgent('SAFAgent');
    safagent.setStore(saffilestore);
    safagent.setServiceType('Sending-only');
    cmo = cd('/SAFAgents/SAFAgent')
    cmo.setTargets(jarray.array([ObjectName('com.bea:Name='jeem1 (migratable)',Type=MigratableTarget ')],Class.forName(weblogic.management.configuration.TargetMBean)))
    I am getting error javax.management.invalidattributevalueexception array has at least one null element
    Can somebody please help? Or can somebody let me know how to target SAFAgent to migratable target using wlst

    If you are not aware of how SAP works you should be carefull to use any non-SAP tooling. For instance if you want to change anything to the database you'd better use the SAP-tooling, otherwise SAP checks will complain. But if you just want to use OEMGC to monitor a SAP database (or more SAP db's) that will give no issues. SAP does not support the use OEMGC for other purposes but monitoring (SAP note 828268). Be aware that SAP has it's own monitoring tooling(CCMS), so you will introduce extra overhead using OEMGC.
    I advice you to first get familiar with Oracle in a SAP environment. As a starting point you could use http://www.sdn.sap.com/irj/sdn/ora.
    If you need a un/pw ask your SAP-team.
    Eric

  • How to resolve JMSExceptions:045032 when creating a JMS Topic

    I am using Weblogic 12c (12.1.1.0).  I have created a new managed server. I have created a JMS server targeted to the new managed server. I have created a JMS module targeted to the new managed server. I have created a JMS Subdeployment which targets both the new managed server and the new JMS server.  I've created a JMS connection factory which targets the JMS Subdeployment.
    Now everything I've done so far has worked fine.  No problems.  The problem happens when I try to create a JMS Topic.  I select to create a new regular Topic; I target the new JMS Subdeployment, and after selecting the Subdeployment Weblogic refreshes the page and shows the JMS server.  So this all seems OK. When I try to finish and create the JMS Topic, I get the following error: [JMSExceptions:045032]While attempting to create destination [TOPIC_NAME] in module [MODULE_NAME] the JMS server [MANAGED_SERVER_NAME] could not be found.
    Any thoughts on this?  I've googled around but haven't found anything useful.

    I replicated this at my end. This is caused by Subdeployment target to both the new managed server and the new JMS server.
    Please try creating a new Subdeployment and target it to JMS Server only, as described in the document below.
    https://docs.oracle.com/cd/E24329_01/web.1211/e24385/best_practice.htm#JMSAD633
    "Populate the subdeployment only with JMS servers - not WebLogic servers. Only include the JMS servers that you wish to host destinations. This ensures that when the JMS resources are configured, they are targeted to the correct JMS servers. For modules that support non-distributed destinations, the subdeployment must only reference a single JMS Server. If you have a mix of distributed and non-distributed destinations, use two modules each with its own subdeployment."
    Best Regards
    Luz

  • Defining/Creating a JMS Queue in XI

    Scenario: Third party system would post messages in XI Jms queue, the messages would ultimately be sent to SAP.
    Need to create this JMS queue in XI which receives Jms messages from third party.
    Steps done:
    1) Defined Sender Communication Channel 'CC_JMS'
    JNDILookup name:jmsfactory/default/QueueConnectionFactory
    JMSQueue:jmsqueues/default/JMS_queue
    initialcontextfactory:com.sap.engine.services.jndi.InitialContextFactoryImpl
    JNDIServerAddress:<<serverIP>>:50004
    2)Defined sender ID for the outbound interface in SXMSIF
    3) Added job(I've given the name, is it right?) in SXMb_Adm and Defined message filter for that job. activated.
    4)configured message filter for the above sender ID. Queue name XBT1
    5)when checked in adapter monitor for JMS_queue.Shows the following error message
      CC_JMS : Sender channel. Details: Object not found in lookup of JMS_Queue.
    Questions:
    1)Is that the right approach i am following
    2)How do i assign CC_JMS  to JMS_queue
    3)How do i know if JMS_queue is up and running
    thnx
    sunil

    Hi Sunil,
    Please take a look at these..
    http://help.sap.com/saphelp_erp2005/helpdata/en/bc/996b908db7485fabbacb9930714d7e/frameset.htm -- Queue sender and reciever
    http://help.sap.com/saphelp_erp2005/helpdata/en/f4/2d6189f0e27a4894ad517961762db7/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/90/57849e5e3e45d784afc4e3bfa8136f/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/c1/739c4186c2a409e10000000a155106/frameset.htm
    Hope they help!
    cheers,
    Prashanth
    P.S Please mark helpful answers

  • Create a JMS reference to a IBM MQ Resource Adapter

    Hi There,
    We have deployed the IBM MQ RA (version 7.0.0.0-k000-L080529) on our CE 7.1 SP 4 system. We are trying to create a JMS reference to utilise the RA to put a message on an IBM MQ Queue.
    We are trying to get to the RA using the following code snippet but can not get the relevant JMS / JNDI references with the activation config created:
    String lookupName = "java:QCF1"; //or something similair
    ConnectionFactory cf = (ConnectionFactory) context.lookup(lookupName);
    We have tried the XML below but the references it creates comes up in error status.
    <?xml version="1.0" encoding="UTF-8"?>
    <jms-resources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="jms-resources.xsd">
          <connection-factory>
          <name>QCF1</name>
          <context-factory-type>
             <initial-context-properties>
                <initial-context-factory>com.sap.engine.services.jndi.InitialContextFactoryImpl
                <!--The implementation class of initial context factory of the third-party JMS Provider.
                    For SAP this is com.sap.engine.services.jndi.InitialContextFactoryImpl-->
                </initial-context-factory>
                <provider-url>localhost</provider-url>
                <security-principal>user</security-principal>
                <security-credentials>password</security-credentials>
             </initial-context-properties>
             <link-factory-name>deployedAdapters/QueueConnectionFactory/nonGlobalTx/QueueConnectionFactory</link-factory-name>
             <user-name>jms-user-name</user-name>
             <password>jms-password</password>
             <library-name>IBMMQ</library-name>
          </context-factory-type>
       </connection-factory>
       <destination>
          <name>TargetQueue</name>
          <type>javax.jms.Queue</type>
          <external-destination-type>
             <link-connection-factory>QCF1
             <!-- This name has to be the same as the name of the connection factory -->
             </link-connection-factory>
          </external-destination-type>
       </destination>

    Hi There,
    We have deployed the IBM MQ RA (version 7.0.0.0-k000-L080529) on our CE 7.1 SP 4 system. We are trying to create a JMS reference to utilise the RA to put a message on an IBM MQ Queue.
    We are trying to get to the RA using the following code snippet but can not get the relevant JMS / JNDI references with the activation config created:
    String lookupName = "java:QCF1"; //or something similair
    ConnectionFactory cf = (ConnectionFactory) context.lookup(lookupName);
    We have tried the XML below but the references it creates comes up in error status.
    <?xml version="1.0" encoding="UTF-8"?>
    <jms-resources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="jms-resources.xsd">
          <connection-factory>
          <name>QCF1</name>
          <context-factory-type>
             <initial-context-properties>
                <initial-context-factory>com.sap.engine.services.jndi.InitialContextFactoryImpl
                <!--The implementation class of initial context factory of the third-party JMS Provider.
                    For SAP this is com.sap.engine.services.jndi.InitialContextFactoryImpl-->
                </initial-context-factory>
                <provider-url>localhost</provider-url>
                <security-principal>user</security-principal>
                <security-credentials>password</security-credentials>
             </initial-context-properties>
             <link-factory-name>deployedAdapters/QueueConnectionFactory/nonGlobalTx/QueueConnectionFactory</link-factory-name>
             <user-name>jms-user-name</user-name>
             <password>jms-password</password>
             <library-name>IBMMQ</library-name>
          </context-factory-type>
       </connection-factory>
       <destination>
          <name>TargetQueue</name>
          <type>javax.jms.Queue</type>
          <external-destination-type>
             <link-connection-factory>QCF1
             <!-- This name has to be the same as the name of the connection factory -->
             </link-connection-factory>
          </external-destination-type>
       </destination>

  • How to create OEMS JMS In-Memory and File-Based Persistence?

    Anyone knows how to create OEMS JMS In-Memory and File-Based Persistence? Any help it is appreciated. I m working with Oracle BAM 11g TP4 and I want to test the capability of connecting directly to a JMS queue, and reading Oracle´s "complex" documentation I couldnt find the right way to make this happen.
    tks

    Hi Mario
    This is explained in the soa developer's guide. Chapter 43 "Enterprise message source"should help you. You will find how to connect OEMS or JMS in-memory/file based to your BAM data objects with or without xpath transformation.
    You can find sample of advanced XML formating in the 10g tech note: "Oracle BAM 10.1.3 configuration for BPEL 10.1.2 using JMS sensors" (useful even if you don't plan to use BPEL).
    Anyway, if you plan to use BPEL, forget JMS and use the BAM adapter (chapter 42), it's quicker & easier.
    Dominique

  • How to create OEMS JMS In-Memory and File-Based Persistence ? Anyone?

    Anyone knows how to create OEMS JMS In-Memory and File-Based Persistence? Any help it is appreciated. I m working with Oracle BAM 11g TP4 and I want to test the capability of connecting directly to a JMS queue, and reading Oracle´s "complex" documentation I couldnt find the right way to make this happen.
    tks

    Hi Mario
    This is explained in the soa developer's guide. Chapter 43 "Enterprise message source"should help you. You will find how to connect OEMS or JMS in-memory/file based to your BAM data objects with or without xpath transformation.
    You can find sample of advanced XML formating in the 10g tech note: "Oracle BAM 10.1.3 configuration for BPEL 10.1.2 using JMS sensors" (useful even if you don't plan to use BPEL).
    Anyway, if you plan to use BPEL, forget JMS and use the BAM adapter (chapter 42), it's quicker & easier.
    Dominique

  • How to create the jms application in eclipse3.5 ide

    Any body please help me to create the jms application in eclipse3.5.....i am new to this jms technology ........pls help
    me regarding this

    What kind of help are you expecting here? I would expect that your first stop is a good book on JMS technology, an perhaps a visit to the Eclipse website to read up how to do JEE development using it.
    Lack of knowledge is a problem you can easily fix yourself and must fix yourself. But perhaps you would like some book suggestions?

  • Help with creating AQ JMS

    Hiello,
    I'm trying to create JMS resource on WLS 10.3 to connect to AQ on a different server
    Here is what I'm trying to do:
    1. I have an Oracle application (OTM) that can en-queue payload in an AQ. I have configured the AQ on the OTM server
    2. I want to read from the OTM AQ in my composite, so I'm trying to create the necessary JMS reources in WLS. Since AQ JMS uses a database connection for the stored JMS messages, I created a JDBC connection factory for the target OTM server.
    3. I created a JMS queue as well
    Now I'd like to know the remaining steps so that the JMS queue can be linked with the AQ. Any pointer will be appreciated
    thanks

    Assuming AQ is properly configured
    - Set up a datasource to connect to your database, use Oracle Thin XA driver or Oracle Thin driver. If you choose Oracle Thin driver accept the defaults of Supports Global Transactions and One-Phase Commit on the Transaction Options screen.
    - Create a JMS module and target that module to your server or cluster.
    - In the module, create a Foreign Server resource and accept the default targeting it inherits from the module (that is, do not use the Advanced Targeting
    button).
    - Using the foreign server’s General Configuration tab, set the JNDI Initial Context Factory to oracle.jms.AQjmsInitialContextFactory and add the datasource property to the JNDI Properties field and set its value to the JNDI name of the data source you created for accessing AQ.
    - Set up the foreign server’s connection factories using its Connection Factories Configuration tab. Note that AQ JMS does not require predefining the connection factories in the database. Map each AQ JMS connection factory your application requires to an appropriate Local JNDI Name using the Remote JNDI Name
    Remote JNDI Name JMS Object Type
    QueueConnectionFactory javax.jms.QueueConnectionFactory
    TopicConnectionFactory javax.jms.TopicConnectionFactory
    ConnectionFactory javax.jms.ConnectionFactory
    XAQueueConnectionFactory javax.jms.XAQueueConnectionFactory
    XATopicConnectionFactory javax.jms.XATopicConnectionFactory
    XAConnectionFactory javax.jms.XAConnectionFactory
    - Set up the foreign server’s destinations using its Destinations Configuration tab. For queues, the Remote JNDI Name will be of the form Queues/<AQ queue name>, where the AQ queue name is the one specified in the database. For topics, it will be of the form Topics/<AQ queue name>.

  • Trying to create a JMS Client in LifeCycle Module. Sun Appserver 8

    I have created a Lifecycle module which initializes a set of JMX Beans. One of them is a JMX Client.
    I have created a JMS Queue Connection factory according to the guidelines and associated a JNDI name jms/TrQueueConnectionFactory.
    I have created a destination of type Queue with JNDI name jms/catalogQueue.
    When the code is trying to make get the reference to the queue connection factory, I encounter the following exception
    NamingException
    javax.naming.CommunicationException: serial context communication ex [Root exception is com.sun.enterprise.resource.PoolingException]
         at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:328)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
         at com.i2.catalog.services.request.BRR.startJmsConnection(BRR.java:662)
         at com.i2.catalog.services.request.BRR.startService(BRR.java:514)
         at com.i2.catalog.base.ServiceMBeanSupport.start(ServiceMBeanSupport.java:387)
         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:324)
         at com.sun.jmx.mbeanserver.StandardMetaDataImpl.invoke(StandardMetaDataImpl.java:414)
         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 com.i2.catalog.base.ServiceManager.start(ServiceManager.java:347)
         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:324)
         at com.sun.jmx.mbeanserver.StandardMetaDataImpl.invoke(StandardMetaDataImpl.java:414)
         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 com.i2.catalog.boot.CatalogController.start(CatalogController.java:401)
         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:324)
         at com.sun.jmx.mbeanserver.StandardMetaDataImpl.invoke(StandardMetaDataImpl.java:414)
         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 com.i2.catalog.boot.Bootstrap.start(Bootstrap.java:188)
         at com.transora.im.startup.SunAppServerStartup.initialize(SunAppServerStartup.java:164)
         at com.transora.im.startup.SunAppServerStartup.handleEvent(SunAppServerStartup.java:98)
         at com.sun.appserv.server.ServerLifecycleModule.postEvent(ServerLifecycleModule.java:192)
         at com.sun.appserv.server.ServerLifecycleModule.onStartup(ServerLifecycleModule.java:234)
         at com.sun.appserv.server.LifecycleModuleService.onStartup(LifecycleModuleService.java:194)
         at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:300)
         at com.sun.enterprise.server.PEMain.run(PEMain.java:294)
         at com.sun.enterprise.server.PEMain.main(PEMain.java:220)
    Caused by: com.sun.enterprise.resource.PoolingException
         at com.sun.enterprise.connectors.AdministeredObjectResource.createAdministeredObject(AdministeredObjectResource.java:143)
         at com.sun.enterprise.naming.factory.AdministeredObjectFactory.getObjectInstance(AdministeredObjectFactory.java:67)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301)
         at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:304)
         ... 39 more
    Caused by: java.security.PrivilegedActionException: com.sun.enterprise.connectors.ConnectorRuntimeException
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.enterprise.connectors.AdministeredObjectResource.createAdministeredObject(AdministeredObjectResource.java:139)
         ... 42 more
    Caused by: com.sun.enterprise.connectors.ConnectorRuntimeException
         at com.sun.enterprise.connectors.util.SetMethodAction.handleException(SetMethodAction.java:110)
         at com.sun.enterprise.connectors.util.SetMethodAction.run(SetMethodAction.java:96)
         ... 44 more
    Caused by: java.lang.reflect.InvocationTargetException
         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:324)
         at com.sun.enterprise.connectors.util.SetMethodAction.run(SetMethodAction.java:69)
         ... 44 more
    Caused by: java.lang.IllegalArgumentException: MQ:Queue:Invalid Queue Name -
         at com.sun.messaging.Queue.setName(Queue.java:64)
         ... 49 more
    It seems that there is a security issue. Is there any entry I need to have in the sever.policy to make it happen.
    Note: I have defined jdbc datasource for oracle and the jmx services are able to access the datasource via JNDI lookup
    Your help and direction is deeply appreciated.
    Thanks in advance,
    Chiths

    As I know, the lifecycle module is just an external RMI client that has your lifecycle controled by container.
    Please, correct me if I am wrong, but there is no way to access JMS or Datasource via external RMI clients.

  • JMS filestores creation for multi cluster through config wizard

    Hi,
    We are using multiple clusters in a domain through the config wizard. It looks like the config wizard as an limitation - It creates only jms stores for the managed servers in the first cluster but I dont see it. Is any other way to do this? I dont see any other information about this
    Please help!
    Thanks,

    Matt,
    I'd say your suggestion to use the 1GB team as another cluster network is a good idea. No harm in adding additional communication paths to your cluster.
    David A. Bermingham, MVP, Senior Technical Evangelist, SIOS Technology Corp

  • Regarding jms filestore

    HI everyone ,
    i am going to create jms queus and using file store for storing the messages. Iam afraid of ,,, if something happen to system i can not see the messages in the filestore , thats what my problem, for that iam going to assign to datastore instead of file store . if i assign to datastore .datastore doesnt have xa support . please give some advice . that will help to me alot.

    The database store has full XA support. A WebLogic store functions as a fully capable XA resource regardless of whether it is a file store or a database store.
    The reason the database store does not need an XA database driver is that the store is a fully implemented "XA resource" that handles all XA related work itself rather than delegating the XA work to the JDBC connection.
    See the "Comparing File Stores and JDBC Stores" and "Handling JMS Transactions with JDBC Stores" in [ WebLogic Persistent Store | http://download.oracle.com/docs/cd/E15523_01/web.1111/e13701/store.htm#i1160628 ] chapter of the "Configuring Server Environments" book.
    Tom

  • I am not able to create a JMS connection from a custom component in UCM

    I am trying to create a custom component which makes a JMS connection and inserts messages in JMS Queue.
    THe JMS server is hosted on Weblogic Application Server.
    When the code runs I am getting the factory object and the queue object.
    But when I try to get a connection it throws an error as pasted below.
    WHen I googled the same error It has shown a simliar problem in TOmcat in sun thread
    It said two jar files xerces.jar and xml-apis.jar are obsolete.
    I replaced with the new version.
    still the same problem occurred
    Please help
    Pasting the code and exception here
    Code __________________________________________
    import java.util.Date;
    import java.util.Hashtable;
    import javax.jms.*;
    import javax.naming.*;
    import weblogic.jms.client.WLConnectionImpl;
    import weblogic.jms.extensions.*;
    import javax.rmi.PortableRemoteObject;
    public class SimpleProducer {
    public static void drive() {
    final int NUM_MSGS;
         NUM_MSGS = 93;
    Context jndiContext = null;
    Hashtable<String, String> ht;
              ht = new Hashtable<String, String>();
              ht.put(Context.INITIAL_CONTEXT_FACTORY,
                        "weblogic.jndi.WLInitialContextFactory");
              ht.put(Context.PROVIDER_URL, "t3://punitp52975d:7001");
    try {
         jndiContext = new InitialContext(ht);
    } catch (NamingException e) {
    System.out.println("Could not create JNDI API context: " +
    e.toString());
    System.exit(1);
    ConnectionFactory connectionFactory = null;
    Destination dest = null;
    try {
                   Object home = jndiContext.lookup("CNFT"); // where iiopTestDS is jndi name for my DataSource.
    connectionFactory =(ConnectionFactory)PortableRemoteObject.narrow(home , ConnectionFactory.class);
         Object home1 = jndiContext.lookup("QUEUE2"); // where iiopTestDS is jndi name for my DataSource.
    dest =(Destination)PortableRemoteObject.narrow(home1 , Destination.class);
         /*connectionFactory = (ConnectionFactory) jndiContext.lookup(
    "CNFT");
    dest = (Destination) jndiContext.lookup("QUEUE2");
    System.out.println("connectionFactory,dest "+connectionFactory+dest);*/
    } catch (Exception e) {
    System.out.println("JNDI API lookup failed: " + e.toString());
    e.printStackTrace();
    System.exit(1);
    //WLConnectionImpl connection = null;
    WLConnection connection = null;
    WLMessageProducer producer = null;
    try {
                   System.out.println("Getting Connection "+(WLConnection) connectionFactory.createConnection());
    //connection = (WLConnection) connectionFactory.createConnection();
                   System.out.println("Connection created");
    WLSession session =
    (WLSession) connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
    producer = (WLMessageProducer) session.createProducer(dest);
    WLMessage message = (WLMessage) session.createTextMessage();
    //TextMessage message = session.createTextMessage();
    for (int i = 91; i < NUM_MSGS; i++) {
    ((TextMessage) message).setText("This is message " + (i + 1));
    Long l = new Date().getTime();
    message.setLongProperty("ReleasedDate",l );
    System.out.println("Sending message: " + ((TextMessage) message).getText());
    producer.send(message);
    producer.send(session.createMessage());
    } catch (Exception e) {
    System.out.println("Exception occurred: " + e.toString());
    } catch (Throwable et) {
    System.out.println("Exception occurred: " + et.toString());
    et.printStackTrace();
    finally {
    if (connection != null) {
    try {
    connection.close();
    } catch (Exception e) {
                             System.out.println("*************Instantiating Producer***************");
    Exception_________________________________________________________________
    Exception occurred: java.lang.NoSuchMethodError: javax.xml.parsers.SAXParserFactory.getSchema()Ljavax/xml/validation/Schema;
    java.lang.NoSuchMethodError: javax.xml.parsers.SAXParserFactory.getSchema()Ljavax/xml/validation/Schema;
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.<init>(SAXParserImpl.java:124)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl.newSAXParserImpl(SAXParserFactoryImpl.java:115)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl.setFeature(SAXParserFactoryImpl.java:143)
    at weblogic.xml.jaxp.WebLogicSAXParserFactory.<init>(WebLogicSAXParserFactory.java:62)
    at weblogic.rmi.internal.wls.WLSRMIEnvironment.getSAXParser(WLSRMIEnvironment.java:136)
    at weblogic.rmi.internal.DescriptorManager.getDescriptorAsMap(DescriptorManager.java:170)
    at weblogic.rmi.internal.DescriptorManager.getDescriptorAsMap(DescriptorManager.java:159)
    at weblogic.rmi.internal.DescriptorManager.createRuntimeDescriptor(DescriptorManager.java:104)
    at weblogic.rmi.internal.DescriptorManager.getBasicRuntimeDescriptor(DescriptorManager.java:85)
    at weblogic.rmi.internal.DescriptorManager.getDescriptor(DescriptorManager.java:51)
    at weblogic.rmi.internal.DescriptorManager.getDescriptor(DescriptorManager.java:37)
    at weblogic.rmi.internal.OIDManager.makeServerReference(OIDManager.java:194)
    at weblogic.rmi.internal.OIDManager.getReplacement(OIDManager.java:175)
    at weblogic.rmi.utils.io.RemoteObjectReplacer.replaceRemote(RemoteObjectReplacer.java:120)
    at weblogic.rmi.utils.io.RemoteObjectReplacer.replaceObject(RemoteObjectReplacer.java:103)
    at weblogic.rmi.extensions.server.ServerHelper.exportObject(ServerHelper.java:223)
    at weblogic.rmi.internal.OIDManager.initializeDGCServer(OIDManager.java:231)
    at weblogic.rmi.internal.OIDManager.getReplacement(OIDManager.java:144)
    at weblogic.rmi.utils.io.RemoteObjectReplacer.replaceRemote(RemoteObjectReplacer.java:120)
    at weblogic.rmi.utils.io.RemoteObjectReplacer.replaceObject(RemoteObjectReplacer.java:103)
    at weblogic.rmi.extensions.server.ServerHelper.exportObject(ServerHelper.java:223)
    at weblogic.corba.server.naming.ReferenceHelperImpl.exportObject(ReferenceHelperImpl.java:233)
    at weblogic.rmi.extensions.PortableRemoteObject.exportObject(PortableRemoteObject.java:34)
    at weblogic.messaging.dispatcher.DispatcherImpl.export(DispatcherImpl.java:85)

    This is probably related to this other issue http://www.adobeforums.com/webx/.59b7fbab/0.
    Jasmin

  • Error while using WLST to create a new managed server

    Hi All,
    I am trying to create a managed server using following code a
    "create_server.py"
    ------------+++++-----------
    from java.util import *
    from javax.management import *
    import javax.management.Attribute
    print 'starting the script .... '
    connect('weblogic1','barbie@135','http://smart:7001')
    edit()
    startEdit()
    print 'CREATE MANAGED SERVER: Test_Server'
    Test_Server1 = cmo.createServer('TestServer1')
    Test_Server1.setListenPort(7002)
    Test_Server1.setAutoRestart(true)
    Test_Server1.setAutoKillIfFailed(true)
    Test_Server1.setRestartMax(2)
    Test_Server1.setRestartDelaySeconds(10)
    Test_Server1.getServerStart().setJavaHome(jvmlocation)
    Test_Server1.getServerStart().setJavaVendor('Oracle')
    Test_Server1.getServerStart().setArguments('-Xms128m -Xmx256m -Xns64m -Xgcprio:pausetime')
    print 'ADD MANAGED SERVERS TO CLUSTER'
    Test_Server1.setCluster(dizzyCluster)
    print 'ADD MANAGED SERVERS TO MACHINE'
    Test_Server1.setMachine(Machine_1)
    save()
    activate(block="true")
    disconnect()
    print 'End of script ...'
    exit()
    -----------------------+++++++++++--------------
    and i am running it through WLST. but i am getting some error as
    CLASSPATH=C:\oracle\MIDDLE~1\patch_wls1035\profiles\default\sys_manifest_classpa
    th\weblogic_patch.jar;C:\oracle\MIDDLE~1\patch_oepe1050\profiles\default\sys_man
    ifest_classpath\weblogic_patch.jar;C:\oracle\MIDDLE~1\patch_ocp360\profiles\defa
    ult\sys_manifest_classpath\weblogic_patch.jar;C:\oracle\MIDDLE~1\JROCKI~1.2-4\li
    b\tools.jar;C:\oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\oracle\M
    IDDLE~1\WLSERV~1.3\server\lib\weblogic.jar;C:\oracle\MIDDLE~1\modules\features\w
    eblogic.server.modules_10.3.5.0.jar;C:\oracle\MIDDLE~1\WLSERV~1.3\server\lib\web
    services.jar;C:\oracle\MIDDLE~1\modules\ORGAPA~1.1/lib/ant-all.jar;C:\oracle\MID
    DLE~1\modules\NETSFA~1.0_1/lib/ant-contrib.jar;
    PATH=C:\oracle\MIDDLE~1\patch_wls1035\profiles\default\native;C:\oracle\MIDDLE~1
    \patch_oepe1050\profiles\default\native;C:\oracle\MIDDLE~1\patch_ocp360\profiles
    \default\native;C:\oracle\MIDDLE~1\WLSERV~1.3\server\native\win\32;C:\oracle\MID
    DLE~1\WLSERV~1.3\server\bin;C:\oracle\MIDDLE~1\modules\ORGAPA~1.1\bin;C:\oracle\
    MIDDLE~1\JROCKI~1.2-4\jre\bin;C:\oracle\MIDDLE~1\JROCKI~1.2-4\bin;C:\oracle\prod
    uct\10.1.0\db_1\bin;C:\oracle\product\10.1.0\db_1\Apache\Perl\5.00503\bin\mswin3
    2-x86;C:\Program Files\Oracle\jre\1.1.8\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WI
    NDOWS\System32\Wbem;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\
    Java\jdk1.6.0_05\bin;C:\oracle\MIDDLE~1\WLSERV~1.3\server\native\win\32\oci920_8
    Your environment has been set.
    CLASSPATH=C:\oracle\MIDDLE~1\patch_wls1035\profiles\default\sys_manifest_classpa
    th\weblogic_patch.jar;C:\oracle\MIDDLE~1\patch_oepe1050\profiles\default\sys_man
    ifest_classpath\weblogic_patch.jar;C:\oracle\MIDDLE~1\patch_ocp360\profiles\defa
    ult\sys_manifest_classpath\weblogic_patch.jar;C:\oracle\MIDDLE~1\JROCKI~1.2-4\li
    b\tools.jar;C:\oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\oracle\M
    IDDLE~1\WLSERV~1.3\server\lib\weblogic.jar;C:\oracle\MIDDLE~1\modules\features\w
    eblogic.server.modules_10.3.5.0.jar;C:\oracle\MIDDLE~1\WLSERV~1.3\server\lib\web
    services.jar;C:\oracle\MIDDLE~1\modules\ORGAPA~1.1/lib/ant-all.jar;C:\oracle\MID
    DLE~1\modules\NETSFA~1.0_1/lib/ant-contrib.jar;;C:\oracle\MIDDLE~1\utils\config\
    10.3\config-launch.jar;C:\oracle\MIDDLE~1\WLSERV~1.3\common\derby\lib\derbynet.j
    ar;C:\oracle\MIDDLE~1\WLSERV~1.3\common\derby\lib\derbyclient.jar;C:\oracle\MIDD
    LE~1\WLSERV~1.3\common\derby\lib\derbytools.jar;;
    Initializing WebLogic Scripting Tool (WLST) ...
    Welcome to WebLogic Server Administration Scripting Shell
    Type help() for help on available commands
    wls:/offline> execfile(c:/create_server.py)
    Traceback (innermost last):
    (no code object) at line 0
    File "<console>", line 1
    execfile(c:/create_server.py)
    ^
    SyntaxError: invalid syntax
    wls:/offline> execfile('c:/create_server.py')
    starting the script ....
    Connecting to http://192.168.1.2:7001 with userid weblogic1 ...
    Traceback (innermost last):
    File "<console>", line 1, in ?
    File "c:/create_server.py", line 5, in ?
    File "<iostream>", line 22, in connect
    File "<iostream>", line 646, in raiseWLSTException
    WLSTException: Error occured while performing connect : Error getting the initia
    l context. There is no server running at http://192.168.1.2:7001
    Use dumpStack() to view the full stacktrace
    wls:/offline> execfile('c:/create_server.py')
    starting the script ....
    Connecting to http://192.168.1.2:7001 with userid weblogic1 ...
    Traceback (innermost last):
    File "<console>", line 1, in ?
    File "c:/create_server.py", line 5, in ?
    File "<iostream>", line 22, in connect
    File "<iostream>", line 646, in raiseWLSTException
    WLSTException: Error occured while performing connect : Error getting the initia
    l context. There is no server running at http://192.168.1.2:7001
    Use dumpStack() to view the full stacktrace
    wls:/offline> execfile('c:/create_server.py')
    starting the script ....
    Connecting to http://smart:7001 with userid weblogic1 ...
    Traceback (innermost last):
    File "<console>", line 1, in ?
    File "c:/create_server.py", line 5, in ?
    File "<iostream>", line 22, in connect
    File "<iostream>", line 646, in raiseWLSTException
    WLSTException: Error occured while performing connect : Error getting the initia
    l context. There is no server running at http://smart:7001
    Use dumpStack() to view the full stacktrace
    wls:/offline> dumpStack()
    This Exception occurred at Fri Sep 16 19:51:07 IST 2011.
    javax.naming.CommunicationException [Root exception is java.net.ConnectException
    : http://smart:7001: Destination unreachable; nested exception is:
            java.net.ProtocolException: Tunneling result unspecified - is the HTTP s
    erver at host: 'smart' and port: '7001' a WebLogic Server?; No available router
    to destination]
    at weblogic.jndi.internal.ExceptionTranslator.toNamingException(Exceptio
    nTranslator.java:40)
    at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLIni
    tialContextFactoryDelegate.java:788)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLIni
    tialContextFactoryDelegate.java:366)
    at weblogic.jndi.Environment.getContext(Environment.java:315)
    at weblogic.jndi.Environment.getContext(Environment.java:285)
    at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialCont
    extFactory.java:117)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
    67)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288
    at javax.naming.InitialContext.init(InitialContext.java:223)
    at javax.naming.InitialContext.<init>(InitialContext.java:197)
    at weblogic.management.scripting.WLSTHelper.populateInitialContext(WLSTH
    elper.java:520)
    at weblogic.management.scripting.WLSTHelper.initDeprecatedConnection(WLS
    THelper.java:573)
    at weblogic.management.scripting.WLSTHelper.initConnections(WLSTHelper.j
    ava:313)
    at weblogic.management.scripting.WLSTHelper.connect(WLSTHelper.java:203)
    at weblogic.management.scripting.WLScriptContext.connect(WLScriptContext
    .java:61)
    at weblogic.management.scripting.utils.WLSTUtil.initializeOnlineWLST(WLS
    TUtil.java:147)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.python.core.PyReflectedFunction.__call__(Unknown Source)
    at org.python.core.PyMethod.__call__(Unknown Source)
    at org.python.core.PyObject.__call__(Unknown Source)
    at org.python.core.PyObject.invoke(Unknown Source)
    at org.python.pycode._pyx36.connect$1(<iostream>:16)
    at org.python.pycode._pyx36.call_function(<iostream>)
    at org.python.core.PyTableCode.call(Unknown Source)
    at org.python.core.PyTableCode.call(Unknown Source)
    at org.python.core.PyTableCode.call(Unknown Source)
    at org.python.core.PyFunction.__call__(Unknown Source)
    at org.python.pycode._pyx42.f$0(c:/create_server.py:5)
    at org.python.pycode._pyx42.call_function(c:/create_server.py)
    at org.python.core.PyTableCode.call(Unknown Source)
    at org.python.core.PyCode.call(Unknown Source)
    at org.python.core.Py.runCode(Unknown Source)
    at org.python.core.__builtin__.execfile_flags(Unknown Source)
    at org.python.core.__builtin__.execfile(Unknown Source)
    at org.python.core.__builtin__.execfile(Unknown Source)
    at org.python.core.BuiltinFunctions.__call__(Unknown Source)
    at org.python.pycode._pyx41.f$0(<console>:1)
    at org.python.pycode._pyx41.call_function(<console>)
    at org.python.core.PyTableCode.call(Unknown Source)
    at org.python.core.PyCode.call(Unknown Source)
    at org.python.core.Py.runCode(Unknown Source)
    at org.python.core.Py.exec(Unknown Source)
    at org.python.util.PythonInterpreter.exec(Unknown Source)
    at org.python.util.InteractiveInterpreter.runcode(Unknown Source)
    at org.python.util.InteractiveInterpreter.runsource(Unknown Source)
    at org.python.util.InteractiveInterpreter.runsource(Unknown Source)
    at weblogic.management.scripting.WLST.main(WLST.java:173)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at weblogic.WLST.main(WLST.java:29)
    Caused by: java.net.ConnectException: http://smart:7001: Destination unreachable
    ; nested exception is:
    java.net.ProtocolException: Tunneling result unspecified - is the HTTP s
    erver at host: 'smart' and port: '7001' a WebLogic Server?; No available router
    to destination
    at weblogic.rjvm.RJVMFinder.findOrCreateInternal(RJVMFinder.java:216)
    at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:170)
    at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:153)
    at weblogic.jndi.WLInitialContextFactoryDelegate$1.run(WLInitialContextF
    actoryDelegate.java:345)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    146)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLIni
    tialContextFactoryDelegate.java:340)
    ... 52 more
    Caused by: java.rmi.ConnectException: Destination unreachable; nested exception
    is:
    java.net.ProtocolException: Tunneling result unspecified - is the HTTP s
    erver at host: 'smart' and port: '7001' a WebLogic Server?; No available router
    to destination
    at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:470)
    at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:321)
    at weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(RJVMManager.java
    :254)
    at weblogic.rjvm.RJVMManager.findOrCreate(RJVMManager.java:197)
    at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(RJVMFinder.java:238
    at weblogic.rjvm.RJVMFinder.findOrCreateInternal(RJVMFinder.java:200)
    at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:170)
    at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:153)
    at weblogic.jndi.WLInitialContextFactoryDelegate$1.run(WLInitialContextF
    actoryDelegate.java:345)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    146)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLIni
    tialContextFactoryDelegate.java:340)
    at weblogic.jndi.Environment.getContext(Environment.java:315)
    at weblogic.jndi.Environment.getContext(Environment.java:285)
    at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialCont
    extFactory.java:117)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
    67)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288
    at javax.naming.InitialContext.init(InitialContext.java:223)
    at javax.naming.InitialContext.<init>(InitialContext.java:198)
    at weblogic.management.scripting.WLSTHelper.populateInitialContext(WLSTH
    elper.java:520)
    at weblogic.management.scripting.WLSTHelper.initDeprecatedConnection(WLS
    THelper.java:573)
    at weblogic.management.scripting.WLSTHelper.initConnections(WLSTHelper.j
    ava:315)
    at weblogic.management.scripting.WLSTHelper.connect(WLSTHelper.java:203)
    at weblogic.management.scripting.WLScriptContext.connect(WLScriptContext
    .java:62)
    at weblogic.management.scripting.utils.WLSTUtil.initializeOnlineWLST(WLS
    TUtil.java:148)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.python.core.PyReflectedFunction.__call__(Unknown Source)
    at org.python.core.PyMethod.__call__(Unknown Source)
    at org.python.core.PyObject.__call__(Unknown Source)
    at org.python.core.PyObject.invoke(Unknown Source)
    at org.python.pycode._pyx36.connect$1(<iostream>:16)
    at org.python.pycode._pyx36.call_function(<iostream>)
    at org.python.core.PyTableCode.call(Unknown Source)
    at org.python.core.PyTableCode.call(Unknown Source)
    at org.python.core.PyTableCode.call(Unknown Source)
    at org.python.core.PyFunction.__call__(Unknown Source)
    at org.python.pycode._pyx42.f$0(c:/create_server.py:7)
    ... 24 more
    javax.naming.CommunicationException [Root exception is java.net.ConnectException
    : http://smart:7001: Destination unreachable; nested exception is:
            java.net.ProtocolException: Tunneling result unspecified - is the HTTP s
    erver at host: 'smart' and port: '7001' a WebLogic Server?; No available router
    to destination]
    please help me for this..
    Edited by: Sharad Jain on Sep 17, 2011 8:46 AM

    Hi Sharad,
    Put ('') in your command,
    wls:/offline> execfile('c:/create_server.py')
    Regards
    Edited by: scapy on Oct 6, 2011 4:15 PM

Maybe you are looking for