Startup Class

I'm trying to setup a startup class. I am having some difficulties. In the startup I put the following:
          NAME: MYSTARTUPCLASS
          CLASSNAME: .\config\mydomain\applications\myStartUp.class
          I also have tried some other variations of the above...but all come up with the same problem...
          <Critical><WebLogicServer><Failed to invoke startup class "MYSTARTUPCLASS", java.lang.ClassNotFoundException:myStartUp.class>
          

          Hi Chris,
          The ClassName should contain fully qualified class name and not the path to the
          class.U have the path to the class file as the value for classname .Give the class
          name instead.
          And make sure that ur class file is present in the system classpath.
          pradeep
          Chris <[email protected]> wrote:
          >I'm trying to setup a startup class. I am having some difficulties.
          > In the startup I put the following:
          >
          >NAME: MYSTARTUPCLASS
          >CLASSNAME: .\config\mydomain\applications\myStartUp.class
          >
          >I also have tried some other variations of the above...but all come up
          >with the same problem...
          ><Critical><WebLogicServer><Failed to invoke startup class "MYSTARTUPCLASS",
          >java.lang.ClassNotFoundException:myStartUp.class>
          

Similar Messages

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

  • 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

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

  • 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
              

  • 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

  • Security settings for startup class

    Hi,
    I use WL6.1 (sp2) where the "guest" user is disabled and server starts up with
    "system" user. All beans are permitted to be launched using other user "user1"
    and not "system" user. And the jar file with beans and other staff is deployed
    well, except of one thing:
    I have startup class in the application and it doesn't work. When trigger method
    is launched, the following exception is thrown:
    <WispConfiguration: Can't connect to bean. No configuration avaiable java.rmi.AccessException:
    Security violation: insufficient permission to access method; nested exception
    is: java.lang.SecurityException: Security violation: insufficient permission
    to access method>
    As i understand this is the security problem. How could I configure weblogic
    to make him to use "user1" instead of "system" when running startup class? Where
    should I define it: in startup() method of startup class or in configuration files
    of WL?
    Any help/hint will be very appreciated.
    THANKS
    Orly

    racb wrote:
    i took all the folders out and restarted and the same message came up that the startupitems folder is insecure and a second message saying that folder DS_Store in the startupitems folder is disabled because of insecure settings. Now I can not see that folder in the startup items folder, any idea
    Probably just as it says, DS_Store is corrupt. This stores the settings for a folder.
    To see if we can find the invisible folder and remove it open Terminal in your Utilities folder and at the prompt copy and paste defaults write com.apple.finder AppleShowAllFiles True; killall Finder
    If you can see the file now just delete it.
    Then, switch back to visibles only and create a new folder called Startup Items.
    defaults write com.apple.finder AppleShowAllFiles False; killall Finder
    Or, simply creating a new Startup Items folder may be enough.
    -mj

  • 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

  • Startup class cannot find a config file.

    I have written a startup class to configure log4j in Weblogic.
    The class runs but cannot find the configuration file. The
    code for the startup class is as follows....
    package com.n2bb.ams.common.util;
    import java.io.FileInputStream;
    import java.io.File;
    import java.io.IOException;
    import java.net.URL;
    import java.util.Properties;
    import com.n2bb.ams.common.util.FileLocator;
    import org.apache.log4j.xml.DOMConfigurator;
    * Insert the type's description here.
    * Creation date: (12/5/00 11:12:13 AM)
    * @author: Administrator
    public class ApplicationStartUp implements weblogic.common.T3StartupDef {
         * ApplicationStartUp constructor comment.
         public ApplicationStartUp() {
              super();
         * setServices method comment.
         public void setServices(weblogic.common.T3ServicesDef arg1) {
         * startup method comment.
         public String startup(String arg1, java.util.Hashtable arg2) throws Exception {
              String resource = null;
              try {
                   resource = (String) arg2.get("configFileName");
                   System.out.println("ConfigFileName: " + resource);
                   URL configFileResource = ApplicationStartUp.class.getResource(resource);
                   System.out.println("configFileResource: " + configFileResource.toString());
                   String file = configFileResource.getFile();     
                   DOMConfigurator.configure(file);
                   return "Log4j configuration initialized completed.";          
              } catch (Exception e) {
                   System.out.println("Cannot open config file: " + resource);
                   return "Log4j configuration failed to initialized.";
    The section of the config.xml the calls my startup class looks
    like....
    <StartupClass
    Arguments="configFileName=/bea/user_projects/mydomain/log4j-config.xml"
    ClassName="com.n2bb.ams.common.util.ApplicationStartUp"
    Name="AMS Startup Class" Targets="myserver"/>
    I have tested the code in a standalone class and it works fine.
    Why can't I find the log4j-config.xml file? Any help would be
    greatly appreciated.

    Wow, your system must have a long history of having picked up assorted bad stuff ...
    You have CleanMyMac2, which should definitely be removed.
    You have other stuff (MacCleanse, for example) that I don't have first-hand knowledge about but should very likely be removed.
    You are using Google Chrome which is a resource hog.
    Further, your Adobe Flash player is not current.
    If I had all these issues, I would do a clean install of Yosemite and only reintroduce the essential stuff.
    You can search for the .plist files by opening finder, holding down the Option key, and doing Go > Library from Finder's menu and then searching for the file(s).

  • Invalid guid error looking up EJB from a startup class

    Gentlemen,
    I am receiving an "invalid guid at GDS" error that is similar to others reported at:
    http://softwareforum.sun.com/servlet/ProcessRequest?RHIVEID=181&RPAGEID=135&HOID=50B500000008000000FE090000&UCATEGORY_0=_29_%24_24_6_&UCATEGORY_S=0
    and
    http://softwareforum.sun.com/servlet/ProcessRequest?RHIVEID=181&RPAGEID=135&HOID=50B500000008000000FE090000&UCATEGORY_0=_29_%24_24_6_&UCATEGORY_S=0
    In my case, I can retrieve the EJB from my rich client with no problems. However, if I execute the exact
    same code from within a startup class (i.e. com.iplanet.ias.startup.StartupClass) then I get the following error repeated until memory runs out:
    javax.naming.NameNotFoundException: MessageRepositoryBean : Invalid guid null in
    GDS
    at com.netscape.server.ejb.EjbContext.lookup(Unknown Source)
    at com.netscape.server.jndi.RootContext.lookup(Unknown Source)
    at com.netscape.server.jndi.RootContext.lookup(Unknown Source)
    at javax.naming.InitialContext.lookup(InitialContext.java:357)
    at com.netscape.ejb.CorbaHomeFactoryImpl.ConstructEJBHome(Unknown Source
    at com.netscape.CosNaming.NamingContextImpl.resolve(Unknown Source)
    at org.omg.CosNaming._NamingContextImplBase.invoke(_NamingContextImplBas
    e.java:233)
    at com.sun.corba.ee.internal.corba.ServerDelegate.dispatch(ServerDelegat
    e.java:236)
    at com.sun.corba.ee.internal.iiop.ORB.process(ORB.java:227)
    at com.sun.corba.ee.internal.iiop.CachedWorkerThread.doWork(IIOPConnecti
    on.java:262)
    at com.sun.corba.ee.internal.iiop.CachedWorkerThread.run(IIOPConnection.
    java:230)
    javax.naming.NameNotFoundException: MessageRepositoryBean : Invalid guid null in
    In previous answers people have suggested adding various things to the app server classpath. This does not make any difference for me. I am puzzled why code runs fine in a normal rich client, but not in a startup class. Here is the code that I am running:
    try
    String contextFactory = "com.sun.jndi.cosnaming.CNCtxFactory";
    String providerURL = "iiop://localhost:9010";
    Properties p = new Properties();
    p.put(Context.INITIAL_CONTEXT_FACTORY, contextFactory);
    p.put(Context.PROVIDER_URL, providerURL);
    Context context = new InitialContext(p);
    MessageRepositoryHome home = (MessageRepositoryHome)
    PortableRemoteObject.narrow(context.lookup("ejb/MessageRepository"), MessageRepositoryHome.class);
    MessageRepository repository = home.create();
    catch(Exception e)
    e.printStackTrace(Log.err);
    System.exit(1);
    Thanks for your help,
    Mark

    I was mistaken in this posting. I was able to access the EJB from the startup class so there must be something else that I am doing to cause this problem. I'd still like to know why I get those invalid guid errors though.
    By the way, please forgive me for using the gender-specific gentlemen in my posting. That was accidental.

  • Static methods in startup class

    I have declared few static methods in startup class. What will happen
              once startup class is executed in cluster environment, will the access
              to those static methods be clustered and replicated across the
              clusters. How exactly the startup class behaves in clustered
              environment.
              I will appreciate an urgent response.
              Thanks,
              SidShar .
              

    SidShar,
              > I have declared few static methods in startup class. What will
              > happen once startup class is executed in cluster environment,
              > will the access to those static methods be clustered and
              > replicated across the clusters.
              No.
              > How exactly the startup class behaves in clustered environment.
              It is run on each server that it is configured to run on. The method calls
              to the startup class will all be local unless you do some special work to
              force it to be otherwise.
              If you want to have something done once and only once in the cluster, or
              coordinate stuff like that, then either use a shared resource (such as the
              database) to coordinate it all, or use Coherence, which lets you share and
              coordinate access to data among all the servers in the app tier.
              Peace,
              Cameron Purdy
              Tangosol, Inc.
              http://www.tangosol.com/coherence.jsp
              Tangosol Coherence: Clustered Replicated Cache for Weblogic
              "sidshar" <[email protected]> wrote in message
              news:[email protected]..
              >
              

  • How to register a regular rmi object in the class which is not setted as startup classes?

    hi:
    it seems the rmi object can only be registed in a startup class,
    is there any way to do this in an nostartup class?
    Thanks for any clue.
    Reno hu
    TCSI

    Yes.
    It is possible to export an RMI object from a servlet's init() method. You
    will have to specify a <load-on-startup> tag in the web.xml deployment
    descriptor, but otherwise, it's pretty straightforward to bind/unbind an RMI
    object when an application is deployed/undeployed.
    -Don
    Andy Piper wrote:
    "Reno hu" <[email protected]> writes:
    No
    hi:
    it seems the rmi object can only be registed in a startup class,
    is there any way to do this in an nostartup class?
    Thanks for any clue.
    Reno hu
    TCSI
    " .sigs are like your face - rarely seen by you and uglier than you think"
    mail: [email protected]

  • Server Startup Class Exception - Where do the startup classes go?

    Trying to get the server to run a class at startup. It complains it
    can't find my startup class. I have it in a jar file in the app-inf
    directory. Should it go someplace else?
    thanks

    Add the startup classes jar file to the APP-INF/lib directory.
    Jay Zimmett <[email protected]> wrote:
    Trying to get the server to run a class at startup. It complains it
    can't find my startup class. I have it in a jar file in the app-inf
    directory. Should it go someplace else?
    thanks

Maybe you are looking for