Startup classes order

How can I ensure the execution order of startup classes?? I want to run startupclass1
before startupclass2..

Dimitri,
Upon second glance at my reply, I noticed I "mis-spoke" part of it. We want
the system administratord who control the directories to be able to change the
values in config.xml, not have control over the properties files.
We could use a higher priority startup-servlet for that, but then our system
administrators would have to edit the deployment descriptors of those servlets,
rebuild them, and redeploy them (and then the server has to be restarted anyway
to force all the deployed component to pick up the new values).
It just strikes me that the startup class provides this functionality much
more elegantly. They can just change the startup parameters in the console and
restart the server.
Jason
"Jason Titus" <[email protected]> wrote:
>
Dimitri,
Thanks for this information. Here are the details of my situation.
I am trying to set some values in the startup class that all applications
can
me use of, by putting them in a singleton. Currently we are using the
following
values: a directory from which configuration files can be read, a directory
into
which output files can be put.
The reason for this is that we are keeping our properties files out
of the
components so the components don't have to be rebuilt when we move from
test to
integration to production. We can simply get a different version of
the properties
files from configuration management as part of the deployment process.
This also
lets us expose just the properties files to the system administrators
who impact
those directories.
With this scheme in place, my servlet initialization can configure
itself by
loading its specific property file from the directory passed to the startup
class
based on the config.xml. Once it has the configuration, it can access
the database
and cache application general data before the first request is placed
to the servlet.
Does that sounds reasonable?
Jason
Dimitri Rakitine <[email protected]> wrote:
I think that startup classes are executed after applications etc are
deployed and
right before server starts servicing client requests.
Why do you need startup classes at all? load-on-startup servlets are
a much nicer
replacement, which solves lots of problems associated with startup classes.
Jason Titus <[email protected]> wrote:
According to this document, you should be able to set a startup deploymentorder
for your startup classes.
I have a servlet that is also initialized at startup, which seems
to
always get
initialized before the startup class methods are called. I've triedchanging
both the deployment order for the startup class in the console, aswell as the
servlet deployment descriptor value its priority. I can't get thestartup to
go first.
Any suggestions?
Thanks for your help.
Jason
"Michael Girdley" <[email protected]> wrote:
Check this out:
http://e-docs.bea.com/wls/docs61///////ConsoleHelp/startupclass.html
Michael Girdley
BEA Systems
Learning WebLogic? Buy the book:
http://www.learnweblogic.com/
At Amazon:
http://www.amazon.com/exec/obidos/ASIN/0130911119/learnweblogic/103-6817548-
3834229
"Rajan" <[email protected]> wrote in message
news:[email protected]...
How can I ensure the execution order of startup classes?? I want
to
run
startupclass1
before startupclass2..
Dimitri

Similar Messages

  • Controlling Startup Class Order / w/ Parameters

    Hi,
    The ability to control the order of startup classes that have parameters is
    a huge piece of functionality that is missing from WLS 5.1. It it still
    missing from 6.0???
    Steve...

    Hi,
    use a JSF PhaseListener and check teh request in the after restore or befiore apply request phase
    Frank

  • Order of starting startup classes

    I am using WLS 4.5. Is there a way to tell the server in which order to
    start the startup classes?
    I have tried putting them in certain order in the properties file, but that
    certainly does not
    do it. Any other tricks?

    per the WLS 4.5.1 documentation you can start the classes in a specific
    order by putting them in the same line in the properties file separated by
    commas.
    e.g.
    virtual class name= class A, class B, class C
    Read the part on start up classes in the doc on the WebLogic properties
    file.
    farnaz <[email protected]> wrote in message
    news:8i5nph$ifu$[email protected]..
    I am using WLS 4.5. Is there a way to tell the server in which order to
    start the startup classes?
    I have tried putting them in certain order in the properties file, butthat
    certainly does not
    do it. Any other tricks?

  • Startup Classes w/ Arguments and Startup Order

    Hi,
    I know we can control the order of startup classes by specifying them in a
    comma delimited list like this:
    weblogic.system.startupClass.a=class1,class2,class3
    Now what if class1 and class2 have several startup arguments that I need to
    pass??? I would hate to think that I'll have to write my own startup
    manager just to do this one simple thing?
    So... if anyone knows how to specify startup arguments AND control the order
    of startup classes please let me know...
    Thanks in advance,
    Stephen Earl
    SmartPoint, Inc.

    Hi Don,
    I've attempted to mirror the functionality of the Weblogic startup system
    with no success. Basically I have an xml document specifying the startup
    specifications much like the WL startup system (ie. Description, ClassName,
    Args). To mirror the WL system I apparently need access to StartupThread
    which, like most other WL classes, is undocumented and unexposed for use.
    How would you suggest implementing such functionality??? Considering that
    I'd like to have similar functionality to the current system (ie.
    T3StartupDefs, RMI Servers, etc.) how can I and any other BEA customer
    achieve this short of rewriting the startup mechanism???
    Stephen Earl
    SmartPoint, Inc.
    "Don Ferguson" <[email protected]> wrote in message
    news:[email protected]...
    I have looked over the source code for startup classes and how thearguments
    are processed, and I'm afraid I don't see any mechanism to accomplish what
    you want, i.e., to specify the order that startup classes are executed,
    and provide names-value pairs that are associated with each class.
    You might have to come up with your own mechanism for associating
    arguments with startup classes.
    Anne-Katrin Schroeder-Lanz wrote:
    well, if you absolutely must have identically named args for each class,
    then you're stumped. should you be able to extract any kind of support
    from
    BEA here, I'd appreciate a notification, since we've got the sameproblem to
    deal with.
    happy hacking, anne
    Anne-Katrin Schroeder-Lanz
    Development
    memIQ AG
    T: +49-89-45639-19385
    F: +49-89-45639-33-385
    mailto:[email protected]
    "Stephen Earl" <[email protected]> wrote in message
    news:[email protected]...
    OK... and now say that I have a startup argument called RETRIES. This
    argument needs to be 10 for startup class A and 20 for startup class
    B.
    Now
    way I can see to handle this situation.
    BEA... I've logged a production 3 case regarding this issue and have
    not
    even received an initial response from support. Hello... Hello...
    Steve...
    "Anne-Katrin Schroeder-Lanz" <[email protected]> wrote in message
    news:[email protected]...
    hi,
    just use the startArgs as documented on the list of startup classes
    and
    pass
    a collective list of args, e.g.:
    weblogic.system.startupClass.<logical_name>= xxx.yyy.Foo,
    xxx.yyy.Bar
    weblogic.system.startupArgs.<logical_name>= arg4Foo=some_value,
    arg4Bar=another_value
    hth,
    cheers, anne
    Anne-Katrin Schroeder-Lanz
    Development
    memIQ AG
    T: +49-89-45639-19385
    F: +49-89-45639-33-385
    mailto:[email protected]
    "Stephen Earl" <[email protected]> wrote in message
    news:[email protected]...
    Hi,
    I know we can control the order of startup classes by specifying
    them
    in
    a
    comma delimited list like this:
    weblogic.system.startupClass.a=class1,class2,class3
    Now what if class1 and class2 have several startup arguments that
    I
    need
    to
    pass??? I would hate to think that I'll have to write my own
    startup
    manager just to do this one simple thing?
    So... if anyone knows how to specify startup arguments AND controlthe
    order
    of startup classes please let me know...
    Thanks in advance,
    Stephen Earl
    SmartPoint, Inc.

  • Ordering startup classes

    I am using startup classes to initially populate my JNDI tree with
    values (Strings) and LinkRefs (to other server JNDI trees).
    * How can I control the order in which the startup classes are invoked?
    Some of my startup classes place values in the JNDI tree. Other startup
    classes take those values and do other things with them. I want to make
    sure the value setters and run before the value users. WLS 5.1 had this
    capability. I don't see it in 6.0
    * How can I get some startup classes to be invoked before EJBs are
    loaded and others to be invoked after EJBs are loaded? I need to setup
    my LinkRefs before the EJBs attempt to build the java:comp/env local
    environment for the EJBs. Other times I need to promote the EJBs Home
    references outside the server. I believe that startup classes only run
    after the EJB instantiations based on 5.1 experience.
    thanks
    jim

    Jim and Joe,
    For the First Question I believe there is a better way of doing with
    making your Startup classes Invoked in the order You wanted and also make
    them J2EE complaint..
    Make your startup classes as start up servlets by registering them in
    web.xml as startup servlets(<load-on-startup>).
    While registering a startup servlet remeber that the element can have a
    optional element. The optional contents of these element must be a positive
    integer indicating the order in which the servlet should be loaded. Lower
    integers are loaded before higherintegers.
    If you need more explanation let me know, I can provide you example on the
    same.
    Kumar.
    jim stafford wrote:
    I am using startup classes to initially populate my JNDI tree with
    values (Strings) and LinkRefs (to other server JNDI trees).
    * How can I control the order in which the startup classes are invoked?
    Some of my startup classes place values in the JNDI tree. Other startup
    classes take those values and do other things with them. I want to make
    sure the value setters and run before the value users. WLS 5.1 had this
    capability. I don't see it in 6.0
    * How can I get some startup classes to be invoked before EJBs are
    loaded and others to be invoked after EJBs are loaded? I need to setup
    my LinkRefs before the EJBs attempt to build the java:comp/env local
    environment for the EJBs. Other times I need to promote the EJBs Home
    references outside the server. I believe that startup classes only run
    after the EJB instantiations based on 5.1 experience.
    thanks
    jim

  • 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 does not run as Windows Service

    If you know the answer, plase send me an email at [email protected]
    I'm running a weblogic startup class that starts a Thread. I need to
    run a batch program that should be running as long as WebLogic is
    running (to process new orders).
    It works fine when I run WebLogic (5.1 SP8) from a script, but causes
    problem when I'm running it as a Windows Service. It calls the
    startup class, however, the startup class never spawns the Thread
    class.
    Following is excerpts from different components:
    =============================================================
    *** weblogic.properties ***
    weblogic.system.startupClass.pdfCreatorStart=WebLogicStartupPdfCreator
    *** WebLogicStartupPdfCreator.java ***
    public class WebLogicStartupPdfCreator implements T3StartupDef {
    public String startup(String name, Hashtable args) throws
    Exception {
    Thread t = new ProductionPdfBatchRunner();
    t.start();
    return "success";
    *** ProductionPdfBatchRunner.java ***
    public class ProductionPdfBatchRunner extends Thread {
    public void run() {
    try {
    //work being done here
    this.sleep(30000);
    catch (InterruptedException ie) {               
    catch(Exception e) {
    e.printStackTrace();
    =============================================================
    Thanks for any help

    Hi,
    Ok. Few suggestions.
    1. Can you review the SAP note:
    552286  Troubleshooting for the SAP Web Dispatcher
    2. When you said: "web dispatcher does not get started ", what error you got ? Can you be more details here ?
    3. Please check the trace file dev_webdisp" that generated in the work directory. If the log entries is not abvious, increase the trace level to 2 or 3, and reproduce and re-check the trace file.
    4. What is the output of the command "sapwebdisp -v"
    5. How about sapwebdisp.pfl ? Are those settings correct ?
    Hope this helps.
    Regards,
    Vincent

  • Startup Classes and JMS - Suggestions Please!

    I'm in serious need of having several resources initialized before beans
    start handling requests.
    I tried implementing a Weblogic Startup Class, and it works fine - as long
    as it's the first thing
    to run! -- the problem is, when my Message Driven Beans deploy, if there are
    messages waiting
    for them in their durable subscriptions, they immediately start
    processing... then about 30 seconds
    later Weblogic (6.0sp1) gets around to starting my startup class. If I put
    code in each MDB that
    kicks off the initialization when they are invoked I still run into
    problems, because my initialization
    takes a LONG time (more than 2 minutes) - so I end up with lots of
    transaction rollbacks... which
    are very annoying and clutter up the log files, and scare customers of the
    product.
    Is there anyway to make a startup class/servlet/something that runs and
    completes before any
    other processing occurs?
    Thanks,
    James

    Yes, Startup servlet has the same problem - it doesn't 'startup' until after
    jms messages are already being delivered. :( aside from this, there are
    class loader issues -servlet space and ejb space are not the same...
    Thanks though,
    James
    "minjiang" <[email protected]> wrote in message
    news:[email protected]...
    Hi, did you ever try startup servlet? not startup class?
    mj
    James House wrote:
    The only problem with creating a base class to extend is the fact that
    Java only supports single inheritance, -- and I'm already inheriting...
    >>
    I've been involved with many projects that use WLServer, and in
    almost every one of them, there has been a need for a startup class
    that fires before the server starts handling requests.... strange that
    I'd be the only one to need this, when the need has recurred so often.
    James
    "Raja Mukherjee" <[email protected]> wrote in message
    news:[email protected]...
    James,
    If you have common initialization tasks to be shared by multiple MDBs,
    I
    would create an abstract class (a.k.a BeanAdapter class) where you canhave
    all your initialization logics and have your MDB extend from it.
    I am not convinced that the Startup class needs to run first. In fact,
    I
    have the same view that Startup class should run last. My only wishlist
    for
    startup class was that I should be able to specify order, which isaddressed
    in 6.1.
    I am also getting the feeling from different posts that MDB deploymentwould
    have a re-try logic in 6.1, which I am beginning to look into. Check
    (or
    post) in JMS news group.
    .raja
    "James House" <[email protected]> wrote in message
    news:[email protected]...
    Thanks for the help... I like the pattern you pointed me to better
    than
    anything else... ... but in all cases (your method, Gene's, and whatI'm
    currently doing) I still have to put some code in every MDB that
    I deploy... : (
    Put in a good word for me there at BEA and convince the appropriate
    developer that startup classes should run first!
    James
    "Raja Mukherjee" <[email protected]> wrote in message
    news:[email protected]...
    James,
    There are several ways to solve your problem. I normally use
    setMessageDrivenContext to do all my initialization. There are two
    types
    of
    initialization that I have performed here, first, reading theconfiguration
    file and then load some utility classes in specific order. The
    problem
    with
    the second was that you will have to use synchronized block
    w/HotSpot
    2.0
    to
    keep the order, which is ok. I don't use static block to do the
    initialization, instead use an init() metod. Hopefully you got the
    idea.
    Recently, Gene Chuang created a pattern which esentially does the
    same
    and
    I
    liked the pattern because it was a nicer way of doing what I
    needed to
    do.
    I
    have changed all my examples to customer to use the new pattern.
    You
    can
    find it in
    http://theserverside.com/patterns/thread.jsp?thread_id=7270.
    The
    only think I do not use of this pattern is
    initializeEveryContextSwap()
    method. I am not convinced yet that I would need it (of course
    that
    might
    change over the time).
    Hope this helps, and thanks Gene.
    .raja
    "James House" <[email protected]> wrote in message
    news:[email protected]...
    Ok... here's some more detail:
    The application is largely JMS based, and most of my Session
    EJBs
    are
    invoked only my Message Driven Beans.
    I have a large set of properties that need to be read from a
    config
    file,
    and stored somewhere "globally". I also have a number of
    utilities
    that
    need to get "warmed up" before I start doing any real processing(before
    I start receiving messages from the JMS Topics). These
    utilities
    take
    a
    long time to warm up (a long time being about 45-60 seconds) -
    because
    they are loading hundereds of classes, and creating variousconnections
    to external resources.
    Currently I'm creating a Singleton object that reads the
    configuration
    file
    name from an environment property, and it then parses the file,
    and
    starts
    configuring all of these utilities. Since the "Startup Class"
    didn't
    work
    (weblogic invokes it after I'm already receiving messages), I
    put
    code
    at
    the beginning of all of my MDB's onMessage() methods that calls
    the
    singleton's "getInstance()" method - which synchronizes on alock
    object,
    and does all of it's work.
    I don't like this solution because:
    1- I have to put code in EVERY message-driven bean that I
    create -
    if
    I
    forget one, everything is broken.
    2- I have to increase the transaction time out of the entire
    server
    to
    be over 60 seconds since the beans hang that long while theconfiguration
    is
    happening.
    It seems very obvious that a "Startup Class" should be invoked
    after
    the
    server has come completely up, but before it starts listening
    for
    requests -- isn't the whole point of a "startup class" to getthings
    ready
    that need to be done as soon as the server comes up? but alas,
    the
    person
    who designed this at BEA apparently didn't agree with me on this
    point!
    Any suggestion on better solutions would be greatly appreciated.
    James
    "Raja Mukherjee" <[email protected]> wrote in message
    news:[email protected]...
    You can do it this way, but I would not recommend it, unless
    that's
    the
    only
    way to attack the problem at hand. But that's just me.
    I have seen this problem with multiple clients and in most
    cases
    there
    is
    a
    better way to handle it. If James give us a little more
    information
    on
    what
    type of configuration is he talking about and some background
    of
    his
    application, we as a group can think and may be able to come
    up
    with
    some
    idea.
    .raja
    "Joel Nylund" <[email protected]> wrote in message
    news:[email protected]...
    you could wrap the starting of weblogic in your own class
    and do
    initialization
    there. You have to be careful because of the way weblogic
    classloaders
    work, but
    you may be able to do what you want. Weblogic is just a java
    class,
    so
    you
    can
    start your class, then once your done initializing, just
    call
    weblogic.Server.main
    -Joel
    James House wrote:
    I'm in serious need of having several resources
    initialized
    before
    beans
    start handling requests.
    I tried implementing a Weblogic Startup Class, and it
    works
    fine -
    as
    long
    as it's the first thing
    to run! -- the problem is, when my Message Driven Beans
    deploy,
    if
    there
    are
    messages waiting
    for them in their durable subscriptions, they immediately
    start
    processing... then about 30 seconds
    later Weblogic (6.0sp1) gets around to starting my startupclass.
    If
    I
    put
    code in each MDB that
    kicks off the initialization when they are invoked I still
    run
    into
    problems, because my initialization
    takes a LONG time (more than 2 minutes) - so I end up with
    lots
    of
    transaction rollbacks... which
    are very annoying and clutter up the log files, and scarecustomers
    of
    the
    product.
    Is there anyway to make a startup class/servlet/something
    that
    runs
    and
    completes before any
    other processing occurs?
    Thanks,
    James

  • Oc4j startup classes - please help!

    I am trying to create a startup class for my Oc4j container. I have created a new class with all the required code. However when I come to update my server.xml config file like so:
    <startup-classes>
    <startup-class classname="MyStartupClass" failure-is-fatal="true">
    <execution-order>0</execution-order>
    </startup-class>
    </startup-classes>
    The container on initialisation says that the class cannot be found. I have also tried giving the fully qualified package name as the class name i.e. com.blah.blahh.MyStartupClass. However still no success.
    Anyone know why this is happening and how I can get the container to find my startup class?

    make a jar of ur classes and put it in(u can put single class also)
    jdev--\j2ee\home\applib
    put this line in the server.xml file
    <init-library path="../applib" />
    try this...
    Hope this helps
    N@vin

  • Oc4j startup classes

    I am trying to create a startup class for my Oc4j container. I have created a new class with all the required code. However when I come to update my server.xml config file like so:
    <startup-classes>
    <startup-class classname="MyStartupClass" failure-is-fatal="true">
    <execution-order>0</execution-order>
    </startup-class>
    </startup-classes>
    The container on initialisation says that the class cannot be found. I have also tried giving the fully qualified package name as the class name i.e. com.blah.blahh.MyStartupClass. However still no success.
    I have placed the startup class in the .jar file in the .ear file which I have deployed to the /application dir.
    Anyone know why this is happening and how I can get the container to find my startup class?

    My container starts fine now with the startup class in place.
    The startup class simply makes some calls to a third party job scheduling library.
    However, when I try to invoke a job, I get the following error:
    core.JobRunShell - Job Manual.Job1 threw a JobExecutionException:
    org.quartz.JobExecutionException: javax.naming.NamingException: Not in an application scope - start Orion with the -userThreads switch if using user-created thread
    However when i start the OC4J container up, I do include this flag.
    i.e. java -jar oc4j.jar -userThreads
    Anyone have any idea what is going on?

  • Startup class  load sequence?

    Hi there,
    Do I have control over the load sequence of the startup classes? I
    need to make sure one class start before the other. I add the one needs to
    be start first before the other one in config.xml, but Weblogic always load
    the other one first. Why?
    Thank you

    WLS 6.1 supports deployment order in which
    you can set the order for each deployments
    see 6.1 docs
    Kumar
    Chi-Ming Yang wrote:
    OK!
    Thank you
    I tried. The trick works for WLS 6.0 with SP2.
    Funny thing is that WLS loads names start with "Z" before "A".
    Thank you
    >
    "Deyan D. Bektchiev" <[email protected]> wrote in message
    news:[email protected]..
    What I'm saying is that WLS 6.0 might work with the class name trick (Ihaven't
    tried it) but I would not use it even if it worked for me since somethingas
    simple as a hash code change in a JDK version might break the order youdesire.
    In 6.1 there might be a way to do that but I don't know what it is.
    --dejan
    Chi-Ming Yang wrote:
    Are you saying only WLS 610 will work with the class name trick?
    I am using WLS 6.0. Bad luck!
    >
    "Deyan D. Bektchiev" <[email protected]> wrote in message
    news:[email protected]..
    There was a posting that said that if you name you classes for example
    Class1
    Class2
    the Class1 would always be loaded before Class2 but the sure thing is
    to
    create
    only one startup class that loads the real startup classes in the
    order
    you
    want them to be loaded.
    Maybe in 6.1 BEA has took care of this but in 6.0 you just cannot (the
    why
    is
    left for the BEA developers to answer).
    --dejan
    Chi-Ming Yang wrote:
    Hi there,
    Do I have control over the load sequence of the startup
    classes?
    I
    need to make sure one class start before the other. I add the one
    needs
    to
    be start first before the other one in config.xml, but Weblogic
    always
    load
    the other one first. Why?
    Thank you

  • Loading startup class before Applications

    I need to load a startup class before my EJBs are deployed. The "deployment order"
    field from the console works for components of the same type only. Looks like WLS
    always loads Applications before startup classes. Does anyone know how to change
    this configuration?
    Thanks,
    Stefano

    Hi Stefano
    I think the relevant CR for this problem is CR061426.
    This CR is included in sp3 of WLS6.1
    Hope this help
    J-F
    Stefano wrote:
    I need to load a startup class before my EJBs are deployed. The "deployment order"
    field from the console works for components of the same type only. Looks like WLS
    always loads Applications before startup classes. Does anyone know how to change
    this configuration?
    Thanks,
    Stefano

  • 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
              >>
              

Maybe you are looking for

  • Do not buy ipad2

    ı have an ipad2 all of a sudden the screen became unresponsive. No damage no quik moves nothing.... ı assume that was a hardware problem. Then ı sent it to the apple service. they said that ther is a hardware problem and they gave a new one. I came h

  • Cost Element Report for all cost objects

    Hello, Is there any standard SAP report where it can list down all cost elements, and their line item/total postings done to various CO Objects in one shot. We have CE/CCTR, CE/IO, etc, but if we can have one report which can list all cost elements a

  • File Adapter - Adapter Specific Config

    Can we change FTP Server Dynamically using Adapter Specific configurations if we can modify SourceFTPHost in the dynamic Configuration ?

  • Changing / swopping my slot loading CD-RW for a DVD/CD-RW combi drive

    Can anyone explain to me how I can change my slot loading CD-RW for a DVD/CD-RW Combi drive?? I know it's something to do with the IDE cable but if someone could give me a idiot's walkthru guide I would apreciate it. x

  • New ideas for ipod touch

    Here are my ideas for the ipod touch, put a flash light on it. I have a flash light on my t-mobile cell phone and I would like on on my ipod touch or iphone. Historically, a flash light uses little energy but useful during emergencies. Currently cust