A startup class to enable MQ Queues to trigger MDBs in WLS 6.1(sp4)

          Hi,
          I am hoping for references to documentation or opinions on the following method
          allowing the use of MQ queues to drive MDBs in WLS. The technique involves rebinding
          the connection factory in jndi at "weblogic.jms.MessageDrivenBeanConnectionFactory"
          with MQs connection factory.
          I read in various newsgroup posts that replacing WLS' ConnectionFactory with MQ's
          in a startup class will not allow MDBs to be linked to an MQ queue because startup
          classes are run after MDB deployment during startup. However I found some unused
          in-house code which appeared to do just that and it works.
          Here is the code in abbreviated form:
          public String startup(String str, Hashtable args) throws Exception
               bindMQFactory();
               bindMQQueues();
               return "";
          private void bindMQFactory() throws Exception
               // Create MQ Factory and configure it
               MQQueueConnectionFactory factory = new MQQueueConnectionFactory();
               factory.setChannel(channel );
               factory.setHostName(host);
               factory.setPort(Integer.parseInt(port));
               factory.setQueueManager(qmanager);
               factory.setTransportType( JMSC.MQJMS_TP_CLIENT_MQ_TCPIP );
               // bind connection factory into WLS JNDI for later use by clients
               _wlsContext.bind( connectionFactoryJndi, factory );
               // Force mq connection factory to be the one used for mdb's
               _wlsContext.rebind("weblogic.jms.MessageDrivenBeanConnectionFactory", factory);
          private void bindMQQueue() throws Exception
               // create queue and configure it
               MQQueue queue = new MQQueue();
               queue.setTargetClient(JMSC.MQJMS_CLIENT_NONJMS_MQ );
               queue.setBaseQueueName( mqQueueName );
               // bind queue in WLS JNDI
               _wlsContext.bind( wlsJndi, queue );
          Thanks in advance for any comments or opinions on the above.
          regards
          Martin
          

Start with the white-paper:
          "Using Foreign JMS Providers with WebLogic Server"
          Note that to get transactional behavior you
          will need to use the WebLogic Messaging Bridge feature.
          Note that integrating MQ is easier in 8.1 - consider
          using WL 8.1 if you can.
          One more comment in-line.
          Martin wrote:
          > Hi,
          >
          > I am hoping for references to documentation or opinions on the following method
          > allowing the use of MQ queues to drive MDBs in WLS. The technique involves rebinding
          > the connection factory in jndi at "weblogic.jms.MessageDrivenBeanConnectionFactory"
          > with MQs connection factory.
          Not recommended. Highly not recommended. Do not use the same name
          as the internal factory. Create your own name for a CF, and change the
          weblogic ejb jar to reference your name. The above white-paper
          states how to do this.
          >
          > I read in various newsgroup posts that replacing WLS' ConnectionFactory with MQ's
          > in a startup class will not allow MDBs to be linked to an MQ queue because startup
          > classes are run after MDB deployment during startup. However I found some unused
          > in-house code which appeared to do just that and it works.
          >
          > Here is the code in abbreviated form:
          > public String startup(String str, Hashtable args) throws Exception
          > {
          >      bindMQFactory();
          >      bindMQQueues();
          >
          >      return "";
          > }
          >
          > private void bindMQFactory() throws Exception
          > {
          >
          >      // Create MQ Factory and configure it
          >      MQQueueConnectionFactory factory = new MQQueueConnectionFactory();
          >      factory.setChannel(channel );
          >      factory.setHostName(host);
          >      factory.setPort(Integer.parseInt(port));
          >      factory.setQueueManager(qmanager);
          >      factory.setTransportType( JMSC.MQJMS_TP_CLIENT_MQ_TCPIP );
          >
          >      // bind connection factory into WLS JNDI for later use by clients
          >      _wlsContext.bind( connectionFactoryJndi, factory );
          >
          >      // Force mq connection factory to be the one used for mdb's
          >      _wlsContext.rebind("weblogic.jms.MessageDrivenBeanConnectionFactory", factory);
          > }
          >
          > private void bindMQQueue() throws Exception
          > {
          >      // create queue and configure it
          >      MQQueue queue = new MQQueue();
          >      queue.setTargetClient(JMSC.MQJMS_CLIENT_NONJMS_MQ );
          >      queue.setBaseQueueName( mqQueueName );
          >
          >      // bind queue in WLS JNDI
          >      _wlsContext.bind( wlsJndi, queue );
          > }
          >
          > Thanks in advance for any comments or opinions on the above.
          >
          > regards
          >
          > Martin
          

Similar Messages

  • Class not found exception for the startup class defined.

    iam using weblogic server 10 and bea jrockit 1.5.0.12.
    i have created a startup class in the admin console for a web project and i have deployed the war file using the console in a user defined domains, user project directory.
    when i start the server, iam getting class not found exception for the startup class.
    But, the startup class is available in the web archive (war). how should we add the classes and jars in the war to the classpath in setDomainEnv.sh or is there any other setting available in the console to enable this.

    Hello Julius,
    yes sure, we can move this post to the NW admin forum. I have already posted similar thread on sun forums. I was hoping that someone from SAP SDN already tackled this problem and if not someone specialized in J2EE Engine could troubleshoot me from the class problem I'm getting. I don't know if it's specific from the agent or if this ClassNotFound is a general SAP J2EE Engine error relating to a library not correclty defined.
    Kind regards,
    Tanguy Mezzano

  • Problems with Deployment, Startup classes and MBeanHome

    Hello,
    we have the following problem: How to initialize our application
    correctly???
    We are using MDBs as message consumers but have to guarantee the order of
    incoming
    messages. Due to a shortcoming in the JMS implementation (Order of
    redelivered messages
    is not guaranteed before WLS 8.1!!!) we are using a singleton class to keep
    the health state
    of the different message queues within the application (controlling whether
    the MDBs are
    supposed to proceed with processing or to discard any incoming messages).
    Thus the MDBs
    have to access this singleton, what implies latter has to be initialized
    prior to the application
    deployment. That's what we are using a startup class for, which is marked to
    be loaded before
    appplication deployment...
    Fortunately the according bug is fixed with WLS 7.0.2.0, so the class is
    loaded, but we are
    not able to access the MBeanHome interface (We like to register MBean to
    provide
    adminstrative access to the health state)!!!
    javax.naming.NameNotFoundException: Unable to resolve
    'weblogic.management.home.localhome' Resolved: 'weblogic.management'
    Unresolved:'home' ; remaining name 'home.localhome'
    at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:174)
    So when is the MBeanServer started???
    Before application deployment??? After??? Is there any way to tell WLS not
    to load the startup
    class before the MBeanServer is available respectively the MBeanHome is
    accessible via JNDI
    but before application deployment???
    Any hints are welcome!!!
    Regards,
    CK

    this seems like a bug. the mbeanhome should be available for lookup in
    startup classes. also posting to system management newsgroup.
    "Carsten Kaiser" <[email protected]> wrote in message
    news:[email protected]..
    Hello,
    we have the following problem: How to initialize our application
    correctly???
    We are using MDBs as message consumers but have to guarantee the order of
    incoming
    messages. Due to a shortcoming in the JMS implementation (Order of
    redelivered messages
    is not guaranteed before WLS 8.1!!!) we are using a singleton class tokeep
    the health state
    of the different message queues within the application (controllingwhether
    the MDBs are
    supposed to proceed with processing or to discard any incoming messages).
    Thus the MDBs
    have to access this singleton, what implies latter has to be initialized
    prior to the application
    deployment. That's what we are using a startup class for, which is markedto
    be loaded before
    appplication deployment...
    Fortunately the according bug is fixed with WLS 7.0.2.0, so the class is
    loaded, but we are
    not able to access the MBeanHome interface (We like to register MBean to
    provide
    adminstrative access to the health state)!!!
    javax.naming.NameNotFoundException: Unable to resolve
    'weblogic.management.home.localhome' Resolved: 'weblogic.management'
    Unresolved:'home' ; remaining name 'home.localhome'
    at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:174)
    So when is the MBeanServer started???
    Before application deployment??? After??? Is there any way to tell WLS not
    to load the startup
    class before the MBeanServer is available respectively the MBeanHome is
    accessible via JNDI
    but before application deployment???
    Any hints are welcome!!!
    Regards,
    CK

  • Weblogic startup class: problem calling EJB's

    Has anyone ever experienced a problem in using a startup class (registered in weblogic.properties)
    and tried to lookup and use an EJB in the same application?
    Basically, I have a startup class which registers to receive messages from an
    MQ queue, and when it receives a message, it tries to do a lookup of a bean and
    use it, but I receive a 'NullPointerException'.
    I'm running Weblogic 5.1
    (I know that Weblogic 6.0 makes use of MessageDrivenBeans, but my app isn't using
    6 or EJB 2.0)
    Thanks...

    Can you post weblogic.log? Are you sure that EJB was deployed successfully.
    Also comment the PROVIDER_URL in initial context and see if that solves the problem
    Viresh Garg
    BEA Systems
    shaun wrote:
    The exception is simply a 'NullPointerException' coming from the startup class
    (I don't have the old log file or I would include the trace here.). Basically,
    when my startup class receives a call to the onMessage(...) method (from listening
    for messages), it looks up an EJB on the server, through the InitialContect class
    and gets a 'null' returned back, thereby throwing the NullPointerException.
    If anyone else is successful in having a startup class which can lookup and call
    an EJB within the same Weblogic server, please help.
    Thanks again....
    Viresh Garg <[email protected]> wrote:
    Can you post the exception stack trace? Also what exactly are you doing
    in startup class.
    Viresh Garg
    Principal Developer Relations Engineer
    BEA Systems
    Shaun wrote:
    Has anyone ever experienced a problem in using a startup class (registeredin weblogic.properties)
    and tried to lookup and use an EJB in the same application?
    Basically, I have a startup class which registers to receive messagesfrom an
    MQ queue, and when it receives a message, it tries to do a lookup ofa bean and
    use it, but I receive a 'NullPointerException'.
    I'm running Weblogic 5.1
    (I know that Weblogic 6.0 makes use of MessageDrivenBeans, but my appisn't using
    6 or EJB 2.0)
    Thanks...

  • Probelems with MDB listening to MQ (Startup class issue )

    Hello ,
              I am supposed to write a Message driven bean that would reside on
              Weblogic7.0 and listen to a particular queue of IBM MQ.
              I understand that we need to write a Start-up class for this. I have
              written the start-up class but I am getting the following error:
              <Apr 16, 2003 3:17:14 PM EDT> <Warning> <EJB> <010061> <The
              Message-Driven EJB: SimpleMDB is unable
              to connect to the JMS destination: ivtQ. The EJB container will
              automatically attempt to re-establis
              h the connection with the JMS server. This warning may occur during
              WebLogic Cluster start-up if the
              JMS destination is located on another server. When the JMS server
              connection is re-established, the
              Message-Driven EJB will again receive JMS messages.
              The Error was:
              The JMS destination with the JNDI name: ivtQ could not be found.
              Please ensure that the JNDI name in
              the weblogic-ejb-jar.xml is correct, and the JMS destination has been
              deployed.>
              I understand that there are some configuration issues:
              Can you please guide where am I going wrong:
              1.     What should be the value of the <destination-jndi-name> in the
              Weblogic-ejb-jar. I have not passed any Queue name through the
              start-up class &#8230;Is it ok?
              2.     Then what queue name should I specify. (ofcousrse it should be the
              MQ queue name but do I need to add that in the JNDI or in the
              weblogic console&#8230;?
              3.     Please confirm that the <connection-factory-jndi-name> mentioned in
              the weblogic-ejb-jar.xml should be the same as what I am passing as
              JNDIName (through weblogic console).
              4.     Kindly advice if I am missing anything (especially in my start-ip
              class)
              Here are my Deployemnt descriptors:
              weblogic-ejb-jar
              <?xml version="1.0"?>
              <!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic
              7.0.0 EJB//EN" "http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd">
              <weblogic-ejb-jar>
                   <weblogic-enterprise-bean>
                        <ejb-name>SimpleMDB</ejb-name>
                        <message-driven-descriptor>
                             <pool>
                                  <max-beans-in-free-pool>8</max-beans-in-free-pool>
                                  <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
                             </pool>
                             <destination-jndi-name>ivtQ</destination-jndi-name>               
                             <initial-context-factory>
              com.sun.jndi.fscontext.RefFSContextFactory
              </initial-context-factory>
                             <provider-url>
              file:/D:/JNDI/
              </provider-url>
                             <connection-factory-jndi-name>
              MyQCF
              </connection-factory-jndi-name>
                        </message-driven-descriptor>
                   </weblogic-enterprise-bean>
              </weblogic-ejb-jar>
              ejb-jar.xml
              <?xml version="1.0"?>
              <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise
              JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
              <ejb-jar>
                   <enterprise-beans>
                        <message-driven>
                             <ejb-name>SimpleMDB</ejb-name>
                             <ejb-class>weblogic.jms.whitepaper.SimpleMDB</ejb-class>
                             <transaction-type>Container</transaction-type>
                             <message-driven-destination>
                                  <!-- In WebLogic Server 6.0, this next parameter is named
              "jms-destination-type" -->
                                  <destination-type>javax.jms.Queue</destination-type>
                             </message-driven-destination>
                        </message-driven>
                   </enterprise-beans>
                   <assembly-descriptor>
                        <container-transaction>
                             <method>
                                  <ejb-name>SimpleMDB</ejb-name>
                                  <method-name>*</method-name>
                             </method>
                             <trans-attribute>Required</trans-attribute>
                        </container-transaction>
                   </assembly-descriptor>
              </ejb-jar>
              My Start-up class is as follows:
              import com.ibm.mq.jms.*;
              import java.util.*;
              import javax.jms.*;
              import javax.naming.*;
              import weblogic.common.*;
              public class MQJMSStartup implements T3StartupDef
                   /** * The name of the queue manager to connect to. The startup class
              * will throw an exception if this parameter is not set. */
                   public final static String QM_NAME_PROPERTY = "QManager";
                   /** * The host name where the queue manager runs. If not set, the *
              startup class will create a "bindings mode" connection to a * queue
              manager on the local host. */
                   public final static String QM_HOST_PROPERTY = "QManagerHost";
                   /** * The port number where the queue manager listens. If not set,
              this * defaults to 1414, the default MQSeries port */
                   public final static String QM_PORT_PROPERTY = "QManagerPort";
                   /** * The name in JNDI to store this queue manager object under. * If
              not set, the startup class will throw an exception. */
                   public static final String JNDI_NAME_PROPERTY = "JNDIName";
                   // Required
                   public MQJMSStartup()
                   // Required, but not needed
                   public void setServices(T3ServicesDef services)
                        public String startup(String name, Hashtable args) throws Exception
                        String qmName = (String)args.get(QM_NAME_PROPERTY);
                        System.out.println("*****The qmName is "+qmName);
                        if (qmName == null)
                             throw new Exception("Startup parameter " + QM_NAME_PROPERTY + "
              must be set");
                        String jndiName = (String)args.get(JNDI_NAME_PROPERTY);
                        System.out.println("***The JNDI Nname is "+jndiName);
                        if (jndiName == null)
                             throw new Exception("Startup parameter " + JNDI_NAME_PROPERTY + "
              must be set");
                        String qmHost = (String)args.get(QM_HOST_PROPERTY);
                        System.out.println("*****The qmHost is "+qmHost);
                        String qmPort = (String)args.get(QM_PORT_PROPERTY);
                        System.out.println("*****The qmPort is "+qmPort);
                        MQQueueConnectionFactory factory = new MQQueueConnectionFactory();
                        factory.setQueueManager(qmName);
                        if (qmHost == null)
                             factory.setTransportType(JMSC.MQJMS_TP_BINDINGS_MQ);
                             factory.setHostName(qmHost);
                             if (qmPort != null)
                                  try
                                       int portNum = Integer.parseInt(qmPort);
                                       factory.setPort(portNum);
                                  catch (NumberFormatException ignore)
                        else
                             factory.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
                        InitialContext context = new InitialContext();
                        context.bind(jndiName, factory);
                        context.close();
                        StringBuffer buf = new StringBuffer();
                        buf.append( "A connection factory was created for the MQ Queue
              Manager ");
                        buf.append(qmName);
                        buf.append(" and stored in JNDI at ");
                        buf.append(jndiName);
                        System.out.println("*****The mqstartup is executed
              succesfully"+buf.toString());
                        return buf.toString();
              The args that I pass through the weblogic console is as follows:
              QManager=QM_mphasis_eight, JNDIName=MyQCF
              Please advice,
              regards,
              Milan Doshi
              

    Thanks for the response.
              I have written the startUp class but I am getting the following error:
              The Error was:
              The JMS destination with the JNDI name: MySenderQueue could not be
              found. Please ensure that the
              JNDI name in the weblogic-ejb-jar.xml is correct, and the JMS
              destination has been deployed.>
              =====
              My startup class is as follows:
              String qmPort = (String)args.get(QM_PORT_PROPERTY);
              String qmHost = (String)args.get(QM_HOST_PROPERTY);
              String qmName = (String)args.get(QM_NAME_PROPERTY);
              MQQueueConnectionFactory factory = new MQQueueConnectionFactory();
              factory.setQueueManager(qmName);
              factory.setHostName(qmHost);
              if (qmPort != null)
              try
              int portNum = Integer.parseInt(qmPort);
              factory.setPort(portNum);
              catch (NumberFormatException ignore)
              if (qmHost == null)
              factory.setTransportType(JMSC.MQJMS_TP_BINDINGS_MQ);
              else
              factory.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
              InitialContext context = new InitialContext();
              context.bind(jndiName, factory);
              QueueConnection connection = factory.createQueueConnection();
              boolean transacted = false;
              QueueSession session = connection.createQueueSession( transacted,
              Session.AUTO_ACKNOWLEDGE);
              Queue ioQueue = session.createQueue("MySenderQueue");
              context.bind("MySenderQueue",ioQueue);
              context.close();
              ===================================================
              My Weblogic-ejb-jar.xml is like this:
              <weblogic-ejb-jar>
              <weblogic-enterprise-bean>
              <ejb-name>SimpleMDB</ejb-name>
              <message-driven-descriptor>
              <pool>
              <max-beans-in-free-pool>8</max-beans-in-free-pool>
              <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
              </pool>
              <destination-jndi-name>MySenderQueue</destination-jndi-name>
              <connection-factory-jndi-name>
              MyQCF
              </connection-factory-jndi-name>
              </message-driven-descriptor>
              </weblogic-enterprise-bean>
              </weblogic-ejb-jar>
              ======================================================
              Can you please guide me what is wrong in registering the Queue?
              Thanks once again for the response,
              Milan Doshi
              "sudhir" <[email protected]> wrote in message news:<[email protected]>...
              > Mian,
              >
              > You should pass the Queue Name in the startup class arguments. This would be
              > the same name as the MQ Queue you have defined. There is no need to specify to
              > provider URL to the file ... If you do, then ensure that the the queue name should
              > refer to the MQ Administered Queue object defined by jmsadmin.
              >
              > -Sudhir
              >
              >
              >
              > [email protected] (Milan Doshi) wrote:
              > >Hello ,
              > >
              > >I am supposed to write a Message driven bean that would reside on
              > >Weblogic7.0 and listen to a particular queue of IBM MQ.
              > >
              > >I understand that we need to write a Start-up class for this. I have
              > >written the start-up class but I am getting the following error:
              > >
              > ><Apr 16, 2003 3:17:14 PM EDT> <Warning> <EJB> <010061> <The
              > >Message-Driven EJB: SimpleMDB is unable
              > >to connect to the JMS destination: ivtQ. The EJB container will
              > >automatically attempt to re-establis
              > >h the connection with the JMS server. This warning may occur during
              > >WebLogic Cluster start-up if the
              > > JMS destination is located on another server. When the JMS server
              > >connection is re-established, the
              > > Message-Driven EJB will again receive JMS messages.
              > >The Error was:
              > >The JMS destination with the JNDI name: ivtQ could not be found.
              > >Please ensure that the JNDI name in
              > > the weblogic-ejb-jar.xml is correct, and the JMS destination has been
              > >deployed.>
              > >
              > >I understand that there are some configuration issues:
              > >
              > >Can you please guide where am I going wrong:
              > >1.     What should be the value of the <destination-jndi-name> in the
              > >Weblogic-ejb-jar. I have not passed any Queue name through the
              > >start-up class ?Is it ok?
              > >2.     Then what queue name should I specify. (ofcousrse it should be the
              > >weblogic console??
              > >3.     Please confirm that the <connection-factory-jndi-name> mentioned in
              > >the weblogic-ejb-jar.xml should be the same as what I am passing as
              > >JNDIName (through weblogic console).
              > >4.     Kindly advice if I am missing anything (especially in my start-ip
              > >class)
              > >
              > >Here are my Deployemnt descriptors:
              > >
              > >weblogic-ejb-jar
              > >
              > ><?xml version="1.0"?>
              > ><!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic
              > >7.0.0 EJB//EN" "http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd">
              > ><weblogic-ejb-jar>
              > >     <weblogic-enterprise-bean>
              > >          <ejb-name>SimpleMDB</ejb-name>
              > >          <message-driven-descriptor>
              > >               <pool>
              > >                    <max-beans-in-free-pool>8</max-beans-in-free-pool>
              > >                    <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
              > >               </pool>
              > >               <destination-jndi-name>ivtQ</destination-jndi-name>               
              > >               <initial-context-factory>
              > > com.sun.jndi.fscontext.RefFSContextFactory
              > > </initial-context-factory>
              > >               <provider-url>
              > > file:/D:/JNDI/
              > > </provider-url>
              > >               <connection-factory-jndi-name>
              > > MyQCF
              > > </connection-factory-jndi-name>
              > >          </message-driven-descriptor>
              > >     </weblogic-enterprise-bean>
              > ></weblogic-ejb-jar>
              > >
              > >
              > >
              > >
              > >
              > >
              > >
              > >ejb-jar.xml
              > >
              > ><?xml version="1.0"?>
              > ><!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise
              > >JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
              > ><ejb-jar>
              > >     <enterprise-beans>
              > >          <message-driven>
              > >               <ejb-name>SimpleMDB</ejb-name>
              > >               <ejb-class>weblogic.jms.whitepaper.SimpleMDB</ejb-class>
              > >               <transaction-type>Container</transaction-type>
              > >               <message-driven-destination>
              > >                    <!-- In WebLogic Server 6.0, this next parameter is named
              > >"jms-destination-type" -->
              > >                    <destination-type>javax.jms.Queue</destination-type>
              > >               </message-driven-destination>
              > >          </message-driven>
              > >     </enterprise-beans>
              > >     <assembly-descriptor>
              > >          <container-transaction>
              > >               <method>
              > >                    <ejb-name>SimpleMDB</ejb-name>
              > >                    <method-name>*</method-name>
              > >               </method>
              > >               <trans-attribute>Required</trans-attribute>
              > >          </container-transaction>
              > >     </assembly-descriptor>
              > ></ejb-jar>
              > >
              > >
              > >My Start-up class is as follows:
              > >
              > >import com.ibm.mq.jms.*;
              > >import java.util.*;
              > >import javax.jms.*;
              > >import javax.naming.*;
              > >import weblogic.common.*;
              > >
              > >
              > >public class MQJMSStartup implements T3StartupDef
              > >{
              > >     /** * The name of the queue manager to connect to. The startup class
              > >* will throw an exception if this parameter is not set. */
              > >     public final static String QM_NAME_PROPERTY = "QManager";
              > >     
              > >     /** * The host name where the queue manager runs. If not set, the *
              > >startup class will create a "bindings mode" connection to a * queue
              > >manager on the local host. */
              > >     public final static String QM_HOST_PROPERTY = "QManagerHost";
              > >     
              > >     /** * The port number where the queue manager listens. If not set,
              > >this * defaults to 1414, the default MQSeries port */
              > >     public final static String QM_PORT_PROPERTY = "QManagerPort";
              > >          
              > >     /** * The name in JNDI to store this queue manager object under. * If
              > >not set, the startup class will throw an exception. */
              > >     public static final String JNDI_NAME_PROPERTY = "JNDIName";
              > >
              > >     // Required
              > >     public MQJMSStartup()
              > >     {
              > >     }
              > >
              > >     // Required, but not needed
              > >     public void setServices(T3ServicesDef services)
              > >     {
              > >     }
              > >
              > >          public String startup(String name, Hashtable args) throws Exception
              > >     {
              > >          String qmName = (String)args.get(QM_NAME_PROPERTY);
              > >          System.out.println("*****The qmName is "+qmName);
              > >          if (qmName == null)
              > >          {
              > >               throw new Exception("Startup parameter " + QM_NAME_PROPERTY + "
              > >must be set");
              > >          }
              > >          String jndiName = (String)args.get(JNDI_NAME_PROPERTY);
              > >          System.out.println("***The JNDI Nname is "+jndiName);
              > >          if (jndiName == null)
              > >          {
              > >               throw new Exception("Startup parameter " + JNDI_NAME_PROPERTY + "
              > >must be set");
              > >          }
              > >          String qmHost = (String)args.get(QM_HOST_PROPERTY);
              > >          System.out.println("*****The qmHost is "+qmHost);
              > >          String qmPort = (String)args.get(QM_PORT_PROPERTY);
              > >          System.out.println("*****The qmPort is "+qmPort);
              > >          MQQueueConnectionFactory factory = new MQQueueConnectionFactory();
              > >          factory.setQueueManager(qmName);
              > >          if (qmHost == null)
              > >          {
              > >               factory.setTransportType(JMSC.MQJMS_TP_BINDINGS_MQ);
              > >               factory.setHostName(qmHost);
              > >               if (qmPort != null)
              > >               {
              > >                    try
              > >                    {
              > >                         int portNum = Integer.parseInt(qmPort);
              > >                         factory.setPort(portNum);
              > >                    }
              > >                    catch (NumberFormatException ignore)
              > >                    {
              > >
              > >                    }
              > >               }
              > >          }
              > >          else
              > >          {
              > >               factory.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
              > >          }
              > >
              > >          InitialContext context = new InitialContext();
              > >          context.bind(jndiName, factory);
              > >          context.close();
              > >          StringBuffer buf = new StringBuffer();
              > >          buf.append( "A connection factory was created for the MQ Queue
              > >Manager ");
              > >          buf.append(qmName);
              > >          buf.append(" and stored in JNDI at ");
              > >          buf.append(jndiName);
              > >          System.out.println("*****The mqstartup is executed
              > >succesfully"+buf.toString());
              > >          return buf.toString();
              > >     }
              > >}
              > >
              > >
              > >
              > >
              > >The args that I pass through the weblogic console is as follows:
              > >
              > >QManager=QM_mphasis_eight, JNDIName=MyQCF
              > >
              > >
              > >
              > >
              > >
              > >Please advice,
              > >
              > >regards,
              > >
              > >Milan Doshi
              

  • Failed to invoke startup class "SOAStartupClass"

    Hi all,
    1. WLS domain (wls 10.3.5 on Linux, Middleware 11.1.1.5.0) is extended with OIM and SOA Suite.
    2. AdminServer is started by wlst.sh script, node manager runs with StartScriptEnabled=true
    wls_soa1 is up and running, but soa-infra fails to start with following error:
    ####<Feb 14, 2012 3:30:28 PM CET> <Critical> <WebLogicServer> <vfusion01.fss-group.com> <wls_soa1> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1329229828020> <BEA-000286> <Failed to invoke startup
    class "SOAStartupClass", java.lang.ClassNotFoundException: oracle.bpel.services.common.util.GenerateBPMCryptoKey
    java.lang.ClassNotFoundException: oracle.bpel.services.common.util.GenerateBPMCryptoKey
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeClass(ClassDeploymentManager.java:262)
    at weblogic.management.deploy.classdeployment.ClassDeploymentManager.access$000(ClassDeploymentManager.java:54)
    at weblogic.management.deploy.classdeployment.ClassDeploymentManager$1.run(ClassDeploymentManager.java:214)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeClassDeployment(ClassDeploymentManager.java:246)
    at weblogic.management.deploy.classdeployment.ClassDeploymentManager.runStartupsBeforeAppDeployments(ClassDeploymentManager.java:149)
    at weblogic.management.deploy.classdeployment.ClassDeploymentService.start(ClassDeploymentService.java:21)
    at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    I have re-installed twice both SOA Suite and domain, but I always end up with this error.
    The same problem has been already reported e.g. here: Fusion MIddleware 11g , but I haven't found any final solution yet.
    I've tried to play also with permissions of ../Oracle_SOA1/soa/modules/oracle.rules_11.1.1/rules.jar, but without success.
    Any idea how to solve this?
    Thanks for support
    DanielF

    Check Can not start managed servers using Node Manager
    hth,
    Peter Paul

  • Clustering of startup classes in WebLogic

              Hi
              WE have an application running as startup class in WLS 6.1 . I want to know
              how this class can be deployed in clustered environment. Iam pretty ne to clustering
              . Can some body help me out ?.
              Thanks in advance,
              S Gopikrishna
              

    I don't know what you mean.
              If you want each instance of your app to be running something, you should
              use a load-on-startup Servlet with its init() method instead of a startup
              class.
              If you want each instance of a server (not each instance of your app, since
              an app can be loaded multiple times on a server) to be running something,
              you should use a startup class.
              If you want exactly one instance in a cluster to be running something ...
              well, good luck. There's no guarantees in this regard, but the easiest way
              is to pin it to one server and make sure that that server never goes down
              because it is a single point of failure.
              Peace,
              Cameron Purdy
              Tangosol, Inc.
              Clustering Weblogic? You're either using Coherence, or you should be!
              Download a Tangosol Coherence eval today at http://www.tangosol.com/
              "S Gopikrishna" <[email protected]> wrote in message
              news:[email protected]...
              >
              > Hi
              >
              > Thanks a lot for the reply. My startup class listens continously on a
              queue.
              > I need to know whether my startup class will also be clustered just like
              EJB.
              > If not what is the altrnative.
              >
              > Regards,
              > S Gopikrishna
              >
              >
              >
              >
              > "Cameron Purdy" <[email protected]> wrote:
              > >When you have a startup class in a cluster, each server will run that
              > >startup class one time. In other words, it always runs once per server.
              > >
              > >Peace,
              > >
              > >--
              > >Cameron Purdy
              > >Tangosol, Inc.
              > >Clustering Weblogic? You're either using Coherence, or you should be!
              > >Download a Tangosol Coherence eval today at http://www.tangosol.com/
              > >
              > >
              > >
              > >"S Gopikrishna" <[email protected]> wrote in message
              > >news:[email protected]...
              > >>
              > >> Hi
              > >> WE have an application running as startup class in WLS 6.1 . I
              > >want
              > >to know
              > >> how this class can be deployed in clustered environment. Iam pretty
              > >ne to
              > >clustering
              > >> Can some body help me out ?.
              > >>
              > >> Thanks in advance,
              > >> S Gopikrishna
              > >
              > >
              >
              

  • Calling EJB3 SLSB from Startup Class

    I am trying to access an SLSB from a startup class but seem to be unable to specify / find the correct JNDI name.
    On the client side I am using :
    Object compilerObject = context.lookup ("java:comp/CompilerRemote");
    m_compiler = (CompilerServiceRemote)PortableRemoteObject.narrow(compilerObject, CompilerServiceRemote.class);I also tried various permutations:
    Object object = context.lookup ("java:comp/env/CompilerRemote");
    Object object = context.lookup ("java:comp/CompilerRemote");
    Object object = context.lookup ("CompilerRemote");which results in the following exception :
    javax.naming.NameNotFoundException: remaining name: CompilerRemote
            at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:49)
            at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:59)
            at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:64)
            at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:45)
            at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:130)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at com.thunderhead.backend.compiler.EnterpriseCompiler.init(EnterpriseCompiler.java:58)
            at com.thunderhead.util.compiler.CompilerFactory.init(CompilerFactory.java:73)
            at com.thunderhead.assembly.AssemblyStartup$1.load(AssemblyStartup.java:40)
            at com.thunderhead.resource.LockManager.loadResource(LockManager.java:126)
            at com.thunderhead.resource.LockManager.createResource(LockManager.java:71)
            at com.thunderhead.assembly.AssemblyStartup.start(AssemblyStartup.java:35)
            at com.thunderhead.weblogic.StartupService.main(StartupService.java:23)
            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:597)
            at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeMain(ClassDeploymentManager.java:353)
            at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeClass(ClassDeploymentManager.java:263)
            at weblogic.management.deploy.classdeployment.ClassDeploymentManager.access$000(ClassDeploymentManager.java:54)
            at weblogic.management.deploy.classdeployment.ClassDeploymentManager$1.run(ClassDeploymentManager.java:205)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
            at weblogic.security.service.SecurityManager.runAs(Unknown Source)
            at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeClassDeployment(ClassDeploymentManager.java:198)
            at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeClassDeployments(ClassDeploymentManager.java:177)
            at weblogic.management.deploy.classdeployment.ClassDeploymentManager.runStartupsAfterAppActivation(ClassDeploymentManager.java:158)
            at weblogic.management.deploy.classdeployment.StartupClassPrelistenService.start(StartupClassPrelistenService.java:13)
            at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
            at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
            at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)The bean is configures as
    Bean Code
    @Stateless
    @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
    public class CompilerBean implements CompilerServiceLocal, CompilerServiceRemote {
    ejb-jar.xml
        <session>
          <ejb-name>CompilerBean</ejb-name>
          <ejb-class>com.thunderhead.backend.services.CompilerBean</ejb-class>
        </session>
    weblogic-ejb-jar.xml
        <weblogic-enterprise-bean>
            <ejb-name>CompilerBean</ejb-name>
            <stateless-session-descriptor>           
                <pool>
                    <max-beans-in-free-pool>20</max-beans-in-free-pool>
                    <initial-beans-in-free-pool>10</initial-beans-in-free-pool>
                </pool>
            </stateless-session-descriptor>
            <enable-call-by-reference>true</enable-call-by-reference>
            <jndi-name>CompilerRemote</jndi-name>
            <local-jndi-name>CompilerLocal</local-jndi-name>       
        </weblogic-enterprise-bean>     The JNDI tree does not show the bean name as CompilerRemote either, but rather EAR_EAR_JAR_JAR...
    I have tried using the name from the JNDI Context Tree which resulted in the same exception. However under the deployment section I can see both the remote and local names contain the set values from the weblogic-ejb-jar.xml file.
    How can one access a SLSB from a startup class ?
    PS: This works on JBoss :-)
    Edited by ejb3workshop at 12/06/2007 5:25 AM

    We managed to get your example working as well as our now. We needed to add the mappedName either as an annotation to the bean or in the ejb-jar.xml deployment descriptor.
    It seems that the mapped name is a require field and is used to define the JNDI name of the bean. We would like to specify / name our beans using the weblogic specific deployment descriptors. This seems to be possible using jndi-name and local-jndi-name in weblogic-ejb-jar.xml, but does not seem to work. Could you please help us with configuring the JNDI name of our deployed beans. The console seems to reflect the specified name under deployments, but the JNDI Context shows the mappedName followed # an package name instead.
    <?xml version="1.0" encoding="UTF-8"?>
    <weblogic-ejb-jar
    xmlns="http://www.bea.com/ns/weblogic/90" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-ejb-jar.xsd">
    <weblogic-enterprise-bean>
    <ejb-name>SimpleBean</ejb-name>
    <stateless-session-descriptor>
    <pool>
    <max-beans-in-free-pool>20</max-beans-in-free-pool>
    <initial-beans-in-free-pool>10</initial-beans-in-free-pool>
    </pool>
    </stateless-session-descriptor>
    <enable-call-by-reference>true</enable-call-by-reference>
    <jndi-name>SimpleBeanRemote</jndi-name>
    <local-jndi-name>SimpleBeanLocal</local-jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    Another problem / mistake was out weblogic-application.xml file was causing us problems.
    On your website :
    [url http://e-docs.bea.com/wls/docs100/programming/app_xml.html#wp1079285]
    You reference the Version 10 schema using the following address : http://www.bea.com/ns/weblogic/100/weblogic-application.xsd
    However clicking on the link takes you to the Version 9 schema :
    http://www.bea.com/ns/weblogic/90/weblogic-application.xsd
    We removed the weblogic-application.xml file from our EAR file and are able to use our client. Would it be possible for you to send up a working example of a weblogic-application.xml file.
    Kind regards
    Alex

  • Cannot start Startup class in WL6.0

    Hi, I have a question regarding the startup class with WL6.0. here is the config.xml:
    =================================================================
    <StartupClass
    Arguments="connectionFactory=javax.jms.QueueConnectionFactory,queue=com.lasso.email.emailQueue"
    ClassName="com.lasso.service.mail.StartupEmailSender"
    FailureIsFatal="true" Name="EmailSender" Targets="localserver"/>
    <StartupClass Arguments="" ClassName="com.lasso.util.StartupLoad"
    FailureIsFatal="true" Name="StartupLoad1" Targets="localserver"/>
    <Security Name="lassov2" PasswordPolicy="wl_default_password_policy" Realm="wl_default_realm"/>
    ================================================================
    Here is what I got after start weblogic server 6.0:
    ================================================================
    <Jul 9, 2001 1:50:35 PM CDT> <Notice> <WebLogicServer> <WebLogic Server started>
    <Jul 9, 2001 1:50:35 PM CDT> <Notice> <WebLogicServer> <ListenThread listening
    o
    n port 80>
    <Jul 9, 2001 1:50:35 PM CDT> <Notice> <WebLogicServer> <SSLListenThread listenin
    g on port 443>
    <Jul 9, 2001 1:50:35 PM CDT> <Error> <Performance Pack> <Unable to load performa
    nce pack, using Java I/O.
    java.lang.ThreadDeath
    >
    <Jul 9, 2001 1:50:36 PM CDT> <Emergency> <WebLogicServer> <ListenThread.run()
    fa
    iled: java.lang.ThreadDeath>
    <Jul 9, 2001 1:50:36 PM CDT> <Emergency> <WebLogicServer> <The WebLogic Server
    i
    s no longer listening for connections. You should probably restart it.>
    <Jul 9, 2001 1:50:36 PM CDT> <Alert> <WebLogicServer> <Server shutdown has been
    requested by system>
    <Jul 9, 2001 1:50:36 PM CDT> <Alert> <WebLogicServer> <The shutdown sequence has
    been initiated.>
    <Jul 9, 2001 1:50:58 PM CDT> <Critical> <Kernel> <Execute Thread: 'ExecuteThread
    : '0' for queue: 'default'' stopped.>
    <Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread: 'ExecuteThread
    : '1' for queue: 'default'' stopped.>
    <Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread: 'ExecuteThread
    : '2' for queue: 'default'' stopped.>
    <Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread: 'ExecuteThread
    : '3' for queue: 'default'' stopped.>
    <Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread: 'ExecuteThread
    : '4' for queue: 'default'' stopped.>
    <Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread: 'ExecuteThread
    : '5' for queue: 'default'' stopped.>
    <Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread: 'ExecuteThread
    ==============================================================
    What can I do to start those StartUp classes successfully?
    Thanks.
    Alan Zhang

    Seems like your startup class is generating error that causing wl to
    shutdown. This is because you told wls that you don't want it to start if
    your startup class fails (FailureIsFatal="true" ).
    Take a look at your startup calss and see why is it failing...
    .raja
    "Alan Zhang" <[email protected]> wrote in message
    news:[email protected]...
    >
    Hi, I have a question regarding the startup class with WL6.0. here is theconfig.xml:
    =================================================================
    <StartupClass
    Arguments="connectionFactory=javax.jms.QueueConnectionFactory,queue=com.lass
    o.email.emailQueue"
    ClassName="com.lasso.service.mail.StartupEmailSender"
    FailureIsFatal="true" Name="EmailSender" Targets="localserver"/>
    <StartupClass Arguments="" ClassName="com.lasso.util.StartupLoad"
    FailureIsFatal="true" Name="StartupLoad1" Targets="localserver"/>
    <Security Name="lassov2" PasswordPolicy="wl_default_password_policy"Realm="wl_default_realm"/>
    ================================================================
    Here is what I got after start weblogic server 6.0:
    ================================================================
    <Jul 9, 2001 1:50:35 PM CDT> <Notice> <WebLogicServer> <WebLogic Serverstarted>
    >
    <Jul 9, 2001 1:50:35 PM CDT> <Notice> <WebLogicServer> <ListenThreadlistening
    o
    n port 80>
    <Jul 9, 2001 1:50:35 PM CDT> <Notice> <WebLogicServer> <SSLListenThreadlistenin
    g on port 443>
    <Jul 9, 2001 1:50:35 PM CDT> <Error> <Performance Pack> <Unable to loadperforma
    nce pack, using Java I/O.
    java.lang.ThreadDeath
    >
    <Jul 9, 2001 1:50:36 PM CDT> <Emergency> <WebLogicServer><ListenThread.run()
    fa
    iled: java.lang.ThreadDeath>
    <Jul 9, 2001 1:50:36 PM CDT> <Emergency> <WebLogicServer> <The WebLogicServer
    i
    s no longer listening for connections. You should probably restart it.>
    <Jul 9, 2001 1:50:36 PM CDT> <Alert> <WebLogicServer> <Server shutdown hasbeen
    requested by system>
    <Jul 9, 2001 1:50:36 PM CDT> <Alert> <WebLogicServer> <The shutdownsequence has
    been initiated.>
    <Jul 9, 2001 1:50:58 PM CDT> <Critical> <Kernel> <Execute Thread:'ExecuteThread
    : '0' for queue: 'default'' stopped.>
    <Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread:'ExecuteThread
    : '1' for queue: 'default'' stopped.>
    <Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread:'ExecuteThread
    : '2' for queue: 'default'' stopped.>
    <Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread:'ExecuteThread
    : '3' for queue: 'default'' stopped.>
    <Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread:'ExecuteThread
    : '4' for queue: 'default'' stopped.>
    <Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread:'ExecuteThread
    : '5' for queue: 'default'' stopped.>
    <Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread:'ExecuteThread
    ==============================================================
    What can I do to start those StartUp classes successfully?
    Thanks.
    Alan Zhang

  • Startup class is not working in oc4j

    hi
    I have a servlet .In init of that servlet I will create an instance of a startup class .
    In web.xml configuration I gave <load-on-startup></load-on-startup> .I created a war and an ear and deployed my application .The startup class is not called.
    But when I configured the servlet in the default-web-app the startup class is running.
    And furthur when I hot deploy my ear the startup class is running.
    But when I restart my application server the startup class is not invoked.
    can anybody help
    Regards
    Gajendran.G

    hi
    I had put auto-start=true in server.xml .then also it is not working.
    when I redeploy my ear,the startup class is invoked,but when i restart the
    server it does'nt
    gaj

  • Failed to invoke startup class "MyStartup Class"

    Hi,
    I configured StartUpClass.java in Weblogic server through Admin Console . Also I set the required jar files in the classpath of the server in WL_HOME\server\bin\startWLS.cmd.
    This StartUPClass is written to initialize and create the minimum number of objects in the pool, needed for URLConnection using ObjectPooling API.
    I am getting Exceptions while starting the server after deployment of the application. I am pasting the full stack trace.
    <Feb 1, 2007 9:49:55 AM IST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Client VM Version 1.4.2_12-b03 from Sun Microsystems Inc.>
    <Feb 1, 2007 9:50:10 AM IST> <Info> <Configuration Management> <BEA-150016> <This server is being started as the administration server.>
    <Feb 1, 2007 9:50:10 AM IST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 8.1 SP4 Mon Nov 29 16:21:29 PST 2004 471647
    WebLogic XMLX Module 8.1 SP4 Mon Nov 29 16:21:29 PST 2004 471647 >
    <Feb 1, 2007 9:50:11 AM IST> <Notice> <Management> <BEA-140005> <Loading domain configuration from configuration repository at D:\bea\user_projects\domains\nessdomain\.\config.xml.>
    <Feb 1, 2007 9:50:15 AM IST> <Notice> <Log Management> <BEA-170019> <The server log file D:\bea\user_projects\domains\nessdomain\myserver\myserver.log is opened. All server side log events will be written to this file.>
    <Feb 1, 2007 9:50:18 AM IST> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
    <Feb 1, 2007 9:50:18 AM IST> <Notice> <WebLogicServer> <BEA-000327> <Starting WebLogic Admin Server "myserver" for domain "nessdomain">
    <Feb 1, 2007 9:50:31 AM IST> <Warning> <HTTP> <BEA-101248> <[Application: 'D:\MSM\Workspace\MSM2.0Jan9', Module: 'MSM31']: Deployment descriptor "web.xml" is malformed. Check against the DTD: org.xml.sax.SAXParseException: The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)". (line 96, column 11).>
    <Feb 1, 2007 9:50:31 AM IST> <Warning> <HTTP> <BEA-101248> <[Application: 'D:\MSM\Workspace\MSM2.0Jan9', Module: 'MSM31']: Deployment descriptor "weblogic.xml" is malformed. Check against the DTD: org.xml.sax.SAXParseException: The content of element type "weblogic-web-app" must match "(description?,weblogic-version?,security-role-assignment*,run-as-role-assignment*,reference-descriptor?,session-descriptor?,jsp-descriptor?,auth-filter?,container-descriptor?,charset-params?,virtual-directory-mapping*,url-match-map?,preprocessor*,preprocessor-mapping*,security-permission?,context-root?,wl-dispatch-policy?,servlet-descriptor*,init-as*,destroy-as*)". (line 23, column 20).>
    <Feb 1, 2007 9:50:35 AM IST> <Critical> <WebLogicServer> <BEA-000286> <Failed to invoke startup class "MyStartup Class", java.lang.ClassNotFoundException: com.helio.msm.ws.util.StartUpClass
    java.lang.ClassNotFoundException: com.helio.msm.ws.util.StartUpClass
         at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:141)
         at weblogic.t3.srvr.StartupClassService.invokeClass(StartupClassService.java:156)
         at weblogic.t3.srvr.StartupClassService.access$000(StartupClassService.java:36)
         at weblogic.t3.srvr.StartupClassService$1.run(StartupClassService.java:121)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.t3.srvr.StartupClassService.invokeStartupClass(StartupClassService.java:116)
         at weblogic.t3.srvr.PostDeploymentStartupService.resume(PostDeploymentStartupService.java:63)
         at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
         at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:966)
         at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:361)
         at weblogic.Server.main(Server.java:32)
    >
    <Feb 1, 2007 9:50:36 AM IST> <Error> <Socket> <BEA-000438> <Unable to load performance pack. Using Java I/O instead. Please ensure that wlntio.dll is in: 'D:\j2sdk1.4.2_12\bin;.;C:\WINDOWS\system32;C:\WINDOWS;D:\j2sdk1.4.2_12\bin;c:\windows\system32;C:\apache-ant-1.6.5\bin;'
    >
    <Feb 1, 2007 9:50:36 AM IST> <Notice> <WebLogicServer> <BEA-000331> <Started WebLogic Admin Server "myserver" for domain "nessdomain" running in Development Mode>
    <Feb 1, 2007 9:50:36 AM IST> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
    <Feb 1, 2007 9:50:36 AM IST> <Notice> <WebLogicServer> <BEA-000355> <Thread "ListenThread.Default" listening on port 7001, ip address *.*>
    <Feb 1, 2007 9:50:55 AM IST> <Warning> <Socket> <BEA-000402> <There are: 5 active sockets, but the maximum number of socket reader threads allowed by the configuration is: 4. You may want to alter your configuration.>
    Please help me in resolving this problem. I need it asap
    Thanks,
    Dharani

    I should be more specific and have a bit more to add....
    We have our app in an .ear file. I find that when I put the startup
    classes in a seperate directory which is in the classpath specified in the
    startWeblogic.cmd file they will be run on startup. I don't think I should
    have to do this since these files exist in the ear file. I think this is
    causing other problems too such as an illegalAccessError I get when an EJB
    tries to load a class which was previously accessed by the startup classes.
    Thanks,
    Steve
    Steve Snodgrass wrote:
    Hi,
    I am beggining to upgrade our app from Weblogic 5.1 to 6.0. So far it
    has been progressing nicely and everything works with one exception. I
    can not get the start up classes to run. I get the following exception:
    <Failed to invoke startup class "MyStartup Class",
    java.lang.ClassNotFoundException:
    followed by my fully qualified class name. The class is reference
    elsewhere in the code and works fine. Is a seperate classpath used for
    startup classes? If not why might Weblogic have a hard time finding my
    class?
    Thanks,
    Steve

  • Problems in startup class (MDB on Weblogic 7.0 / IBM MQ)

    Hello friends,
              I am trying to communicate with IBM MQ through Weblogic 7.0 SP2 and
              using MDB.
              This is a bit strange but I had to reinstall Weblogic and I tried to
              deploy the Startup class . However I am getting this error:
              The WebLogic Server did not start up properly.
              Exception raised:
              java.lang.NoSuchMethodError
              at com.ibm.mq.jms.services.ConfigEnvironment.<clinit>(ConfigEnvironment.java:173)
              at java.lang.Class.forName0(Native Method)
              I am totally at loss to understand this as it was working before I
              reinstalled the Weblogic. (Maybe I am skipping something which I had
              earlier done :-().
              All help appreciated.
              Thanks in advance,
              Milan Doshi
              

    Since your simply running an MQ client in a startup class, you should
              be able to reproduce the issue without WebLogic in the mix. Once
              that is done, contact IBM for support. I continue to suspect
              a command-line problem - IBM is expecting something on
              the java JVM command-line that is missing.
              Tom
              Milan Doshi wrote:
              > Hello Tom,
              >
              > Thanks for the reply. I did ensure that all the relevant IBM jars are
              > in the classpath but I still get that error.Infact the claspath was
              > allready in place.
              >
              > Please give me your suggestions as I am totally at sea.
              >
              >
              > <May 23, 2003 5:31:17 PM EDT> <Emergency> <WebLogicServer> <000342>
              > <Unable to initialize the server: Fatal initialization excepti
              > on
              > Throwable: java.lang.NoSuchMethodError
              > java.lang.NoSuchMethodError
              > at com.ibm.mq.jms.services.ConfigEnvironment.<clinit>(ConfigEnvironment.java:173)
              > at java.lang.Class.forName0(Native Method)
              > at java.lang.Class.forName(Class.java:115)
              > at com.ibm.mq.jms.MQConnection.<clinit>(MQConnection.java:149)
              > at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:142)
              > at com.jpmc.ivr.middle.util.MQJMSStartup.startup(MQJMSStartup.java:112)
              > at weblogic.t3.srvr.StartupClassService.invokeStartup(StartupClassService.java:158)
              > at weblogic.t3.srvr.StartupClassService.invokeClass(StartupClassService.java:139)
              > at weblogic.t3.srvr.StartupClassService.access$0(StartupClassService.java:130)
              > at weblogic.t3.srvr.StartupClassService$1.run(StartupClassService.java:102)
              > at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:780)
              > at weblogic.t3.srvr.StartupClassService.invokeStartupClass(StartupClassService.java:97)
              > at weblogic.t3.srvr.StartupClassService.initialize(StartupClassService.java:60)
              > at weblogic.t3.srvr.ServerLifeCycleList.initialize(ServerLifeCycleList.java:54)
              > at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:782)
              > at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:594)
              > at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:282)
              > at weblogic.Server.main(Server.java:32)
              >
              > ***************************************************************************
              > The WebLogic Server did not start up properly.
              >
              > Thanks and regards,
              >
              > Milan Doshi
              >
              > Tom Barnes <[email protected]> wrote in message news:<[email protected]>...
              >
              >>Make sure that your MQ client classes are in
              >>the classpath used to boot the WL JVM. If you
              >>re-installed WL, and are using the installation's
              >>WL boot scripts rather than your own, the JVM
              >>will have a vanilla classpath - which, of course,
              >>won't include IBM classes.
              >>
              >>Tom
              >>
              >>Milan Doshi wrote:
              >>
              >>>Hello friends,
              >>>
              >>>I am trying to communicate with IBM MQ through Weblogic 7.0 SP2 and
              >>>using MDB.
              >>>
              >>>This is a bit strange but I had to reinstall Weblogic and I tried to
              >>>deploy the Startup class . However I am getting this error:
              >>>
              >>>
              >>>The WebLogic Server did not start up properly.
              >>>Exception raised:
              >>>java.lang.NoSuchMethodError
              >>> at com.ibm.mq.jms.services.ConfigEnvironment.<clinit>(ConfigEnvironment.java:173)
              >>> at java.lang.Class.forName0(Native Method)
              >>>
              >>>I am totally at loss to understand this as it was working before I
              >>>reinstalled the Weblogic. (Maybe I am skipping something which I had
              >>>earlier done :-().
              >>>
              >>>All help appreciated.
              >>>
              >>>Thanks in advance,
              >>>
              >>>Milan Doshi
              >>
              

  • WLS 10.0 Mp1 - Weblogic startup class to initialize client's SSL channels

    Hi,
    Is it possible to use Weblogic startup class to initialize client's SSL channels?
    Any pointers are appreciated.
    Thanks in advance.

    Hey
    If possible can you explain the issue in detail.
    What do you mean by “initialize client's SSL channels”
    Regards,
    Hussain

  • Redundancy for startup class.

    Hi,
    I have a startup class in weblogic server. This class acts as a daemon inside
    weblogic server. What happens if this class goes down due to an exception after
    a while ? does the weblogic server brings it up again or can we configure it or
    is it just lost?
    -Kishan-

    It it runs in its own thread why don't you just do something like this:
    public void run()
    ............ //initialization
    while(!shouldStop)
    try
    catch(Throwable th)
    th.printStackTrace();
    and you wouldn't need anything like the functionality you are describing which I do
    not believe BEA does.
    Regards,
    --dejan
    Kishan wrote:
    Hi,
    I have a startup class in weblogic server. This class acts as a daemon inside
    weblogic server. What happens if this class goes down due to an exception after
    a while ? does the weblogic server brings it up again or can we configure it or
    is it just lost?
    -Kishan-[dejan_bektchiev.vcf]

  • How to define my startup class in an .ear package?

    I am using WL6.0SP2 on solaris.
    I plan to package my application as an .ear file and to put all necesarry class
    files in there (it will has one .war file for the web tier and one .jar file for
    the EJBs).
    I want, when Weblogic loads my .ear file (i.e. my application), to execute my
    special startup class, which initializes some caches, etc.
    I do not want to define a startup/shutdown class in the console, because it is
    only specific to my application and this startup class is not present in the weblogic
    classpath during weblogic startup.
    The correct place should be in application.xml, but I don't see such thing in
    the DTD.
    Thank you,
    Ivaylo Zlatev

    There is no way to do this on the EAR level - you can use load-on-startup
    servlet(s) in your web component, or initial-beans-in-free-pool=1 EJB.
    Ivaylo Zlatev <[email protected]> wrote:
    I am using WL6.0SP2 on solaris.
    I plan to package my application as an .ear file and to put all necesarry class
    files in there (it will has one .war file for the web tier and one .jar file for
    the EJBs).
    I want, when Weblogic loads my .ear file (i.e. my application), to execute my
    special startup class, which initializes some caches, etc.
    I do not want to define a startup/shutdown class in the console, because it is
    only specific to my application and this startup class is not present in the weblogic
    classpath during weblogic startup.
    The correct place should be in application.xml, but I don't see such thing in
    the DTD.
    Thank you,
    Ivaylo Zlatev--
    Dimitri

Maybe you are looking for