Init() method is executing twice

Hi,
I have a servlet & implemented the init() method. But, the init() method is executing twice.
Also, the destroy() method is executing twice.
Any input guys.
Thanks

JAXMServlet most certainly IS an HttpServlet - the javadocs that I see say it extends HttpServlet. It won't be very useful in a SOAP implementation if it's not.
I thought the SingleThreadModel interface. Why? I thought that was a bad practice that was discouraged. What writable data members does this "test" servlet have that require such careful treatment? If your servlet implements doGet and doPost methods, with only local variables, it'll be thread-safe enough.
I follow the Sun Java coding standards, even for dash-off classes. "test" should be capitalized. Is there no more descriptive name you can think of?
I'm not aware of a problem with Tomcat, and I haven't checked the bug list. But I'd put my money on your code being the problem here. Do you call super.init() in your servlet's init() method? Maybe you're seeing the superclass init() being called?
%

Similar Messages

  • JDBC Resource Ref from various init methods

    Hello
    I want to do some DB activity using JDBC Conn Pool resource ref during webapp startup.
    I tried putting the code in
    - contextInitialized()
    - filter init()
    - servlet init()
    None of them worked. Even though the code is executed, its unable to fetch the JDBC Conn Pool ref since the ref is getting initialzied only after these init methods are executed.
    Any workarounds? Is there a way to make Resource Ref to initialize first?
    thanks
    ssk

    ur db activities can configure in web.xml to perform actions when time of server starting for that write activities code in one servlet and configure that servlet in web.xml as to load at time of server staring it may solve ur problem

  • JSF action executed twice

    Hello all,
    sorry for my bad english.
    I've a simple form with only one <h:commandButton> who execute an action method.
    In this method i need to do a sleep of 60 seconds.
    The strange thing is that while waiting the 60 seconds, the action method is executed twice !
    This is my code:
    SimplePage.jsp
    <h:form id="simple_form">
      <h:commandButton id="ok_button" value="OK" action="#{bBean.doAction}" />
    </h:form>BackingBean.java
      public String doAction()
        try
          Thread.sleep(60000);
        catch (InterruptedException e)
          e.printStackTrace();
        return "ok";
       }Any help is appreciate.
    Carlo

    Hi Raymond,
    thanks for the reply.
    As you suggested , I've created a JSP page with only one form and submit button that fires an action who sleep for 60 seconds.
    In this case action is invoked only once.
    Any suggestion ?
    Thanks in advance
    Carlo

  • Why does SunOne 6.1 call servlet init() method twice on startup

    Hi,
    SunOne6.1 sp 5 is running my servlet's init() method twice when I put load-on-startup in the web-xml file. Is this a known problem and is there a work around as no amount of synchronising seems to work.
    I'm running 2.3.dtd for the default_web.xml file and my entries look like this :-
    <servlet>
    <servlet-name>RelatisLogin</servlet-name>
    <servlet-class>com.MyServlet</servlet-class>
    <load-on-startup>7</load-on-startup>
    </servlet>
    This init method only contains a basic check at the moment :-
    public void init()
    System.out.println("init.....");
    If I take <load-on-startup> away and run the server then call the servlet via the url it only runs init once.
    I've tried synchronizing the block but this doesn't work.
    The synchonization code I used looks like this:-
    public void init(ServletConfig config) throws ServletException
    synchronized( AnotherClass.staticString )
    if ( AnotherClass.staticString.length() > 0 ) return;
    System.out.println( AnotherClass.staticString.length() );
    AnotherClass.staticString = "init has been called";
    try
    int i = 0;
    i = i/i;
    } catch(Exception e)
    e.printStackTrace();
    The declaration of "AnotherClass.staticString" is :-
    public static String staticString = "";
    The output of "System.out.println( AnotherClass.staticString.length() );" is 0 and displayed twice.
    I deliberately cause a divide by zero error to get a stack trace so that i can determine what called init(), the stack trace is printed twice and is always :-
    java.lang.ArithmeticException: / by zero
    at com.MyServlet.init(MyServlet.java:47)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:921)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:813)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3478)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3760)
    at com.iplanet.ias.web.WebModule.start(WebModule.java:251)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:652)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:355)
    at org.apache.catalina.startup.Embedded.start(Embedded.java:995)
    at com.iplanet.ias.web.WebContainer.start(WebContainer.java:431)
    at com.iplanet.ias.web.WebContainer.startInstance(WebContainer.java:500)
    at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:161)
    It looks like SunOne starts then calls init() and then restarts and calls init() again.
    The same code and same web.xml entries work fine in Tomcat 5, init() only every gets called once.
    Any ideas? Can I post this as a bug?
    Thanks in advance for any help.
    Chris.

    Sorry to have not replied to this thread earlier.....forgot all about it.
    The reason init was being called twice by IPanet (Sun One) is IPanet comes with a default context called "Search" already in server.xml file.
    This context was loading all the classes on my class path and this causing "init" to run. Then my context entry also loaded all the files in the class path.
    Quite why Sun include this "Search" context is beyond me......annoying. If you take it out the the problem goes away.
    Basically if you leave this in then your running to web servers (JVM's) your one and Sun's stupid "Search" one. As they are separate JVM's no amount of synchronisation would ever fix it.

  • ActionPerformed-method executed twice...

    Please help!
    My program behaves strangely; the actionPerformed method on a button is executed twice. The first execution completes the method as it should and makes changes to the model as it should. Then there comes the second execution triggered BY THE SAME BUTTON AT THE SAME TIME as the first execution. How is this possible? And how to fix things? There are no external triggers to the button.
    Here is the example code showing the method actionPerformed and the output that it prints.
    * Method to run when an answer is selected
    public void actionPerformed(ActionEvent arg0) {
    // Printout info on the action
    System.out.println("EKO actionPerformed-method at beginning. Game level " + mymodel.getLevel());
    System.out.println("EKO action command: " + arg0.getActionCommand());
    System.out.println("EKO action was: " + arg0.ACTION_PERFORMED);
    System.out.println("EKO action time: " + arg0.getWhen());
    // Disable buttons
    enableButtons(false);
    // Call method setVastattu to notify the observers that an answer
    // has already been selected (e.g. probressBar needs to be stopped)
    mymodel.setAnswered();
    if (arg0.getActionCommand()==mymodel.getKysymys()[1])
    System.out.println("EKO answer was correct. Game level " + mymodel.getLevel());
    // Call a method to set new choice texts on the buttons and to set the game level one higher
    mymodel.levelUp();
    System.out.println("EKO after levelUp-method. Game level " + mymodel.getLevel());
    else {
    JOptionPane.showMessageDialog(this, "Wrong answer!");
    mymodel.setWrongAnswer();
    EKO actionPerformed-method at beginning. Game level 1
    EKO action command: Kuurupiilo
    EKO action was: 1001
    EKO action time: 1133534802433
    EKO answer was correct. Game level 1
    EKO levelUp method is setting game level to level 2
    EKO after levelUp-method. Game level 2
    EKO actionPerformed-method at beginning. Game level 2
    EKO action command: Punahilkka
    EKO action was: 1001
    EKO action time: 1133534805567
    EKO answer was correct. Game level 2
    EKO levelUp method is setting game level to level 3
    EKO after levelUp-method. Game level 3
    EKO actionPerformed-method at beginning. Game level 3 <= WHY AGAIN???
    EKO action command: Punahilkka <= SAME ACTION HAS ALREADY BEEN HANDLED
    EKO action was: 1001 <= SAME ACTION HAS ALREADY BEEN HANDLED
    EKO action time: 1133534805567 <= EVEN THE ACTION TIME IS THE SAME...

    WOW!
    Exactly! I indeed had the actionlistener added twice. I did not even know that it is possible to have several overlapping actionlisteners! Now my code works fine. Thank you very, very much!
    Elisa

  • Methods of Workitem execute twice

    hello experts,
    in my workitem (activity  methods Tab), before work item execution there is a method to  display image, after the work item execution there is a method to close window.
    after our systerm imported new support packages,the methods execute twice. i can not find the reason and solution.
    i guess there is an inconsistent in systerm's time zone management, which is causing the time to execute display image and window close methods before workitem creation time.
    please give me your suggestions?
    Thanks in advance!

    What's worse is that it seems now your messages have started posting thrice
    Just a small note to remind you that version can be important, especially in this case where you have a problem related to packages. So you should include version information (release, support package level) in your description of the problem.
    Sorry I can't be of more help with respect to the problem itself.

  • Init() method: private vs. public

    I have a question:
    What is the difference in defining your init() method in a servlet as private vs. public since it is automatically executed when the class is instantiated?
    thanks

    cbreneman,
    For future reference,
    public void foo() {
        method vailable to all
    protected void foo() {
        method vailable to pacakge
    private void Foo() {
        method vailable to this
    }You can do this:
    public String bar;
    protected String bar;
    private String bar;You cannot do this:
    private void Foo() {
        public String bar = "Oops!";
    }For an Applet, init() is inherited when you extend the Applet class. It must be overidden if you have work to do before your subclass becomes active. It is defined by the superclass as public and void. If you were to create an init() method that was private and returned a String, you might (the compiler will stop you if you try to define init() twice) have a different method, but you would not have overidden public void init(). If you tried something like private void init() the compiler would stop you:
    init() in FooBar cannot override init() in java.applet.Applet; attempting to assign weaker access privileges; was public
    private void init() {
    ^
    1 error
    Make sense?
    With servlets, the init() method is there for slightly different reasons and to be honest, I am not sure that you inherit it? I believe it acts as a special constructor? I don't write many servlets, so I'll shut up and let someone who does give a better answer.
    Hope this helps.

  • The Init() method of abstract pagebean always it excute, and i lost data.

    Hi,
    I have applicaction to buid in NetBean 6.1 and JDK 1.6 using Visual Web Java Server Pages. This application to present a view that have a 2 calendar component, 1 dropdownlist, button component and table component.
    The table component show rows where calendar1.date > date1 and calendar2.date < date2 and estado(DropDownList)= status1
    In the init() method of abstractpagebean i set de initial calendar's date that follow
    java.util.Calendar dateAntes = GregorianCalendar.getInstance();
    java.util.Calendar date = GregorianCalendar.getInstance();
    dateAntes.add(java.util.Calendar.MONTH, -1);
    GregorianCalendar gc = new GregorianCalendar(2000, 11, 20);
    //tablePhaseListener = getSessionBean1().getTablePhaseListener();
    calendar1.setSelectedDate(dateAntes.getTime());
    calendar2.setSelectedDate(date.getTime());
    With this initial dates dates i show the table row thw follow
    String command = "SELECT ALL codreqgmc, fechareq,cliente.nomclie,estado.Descripcion as Estado, " +
    "requerimiento.codtecnico, requerimiento.rutclie, requerimiento.codestado " +
    "FROM requerimiento,cliente,estado " +
    "WHERE requerimiento.rutclie=cliente.rutclie and requerimiento.codestado=estado.codestado and fechareq>=" + "'" + formatoFecha.format(calendar1.getSelectedDate()) + "'" +
    "AND fechareq<=" + "'" + formatoFecha.format(calendar2.getSelectedDate()) + "'";
    try {
    getSessionBean1().getRequerimientoRowSet().setCommand(command);
    getSessionBean1().getRequerimientoRowSet().getCommand();
    getSessionBean1().getRequerimientoDataProvider().refresh();
    } catch (Exception e) {
    error("No puede levantar comando");
    log("Cannot switch to person " +
    estados.getSelected().toString(), e);
    The DropDownList implement the ProcessValueChange Event with AutoSubmit On Change properties. At Change choise of DropDown List Component it trigger a event that and execute estados_processValueChange method that to show a table rows accord to the new filter (include the new calendar date if necessary that follow:
    String command = "SELECT ALL codreqgmc, fechareq,cliente.nomclie,estado.Descripcion as Estado, " +
    "requerimiento.codtecnico, requerimiento.rutclie, requerimiento.codestado " +
    "FROM requerimiento,cliente,estado " +
    "WHERE requerimiento.rutclie=cliente.rutclie and requerimiento.codestado=estado.codestado and fechareq>=" + "'" + formatoFecha.format(calendar1.getSelectedDate()) + "'" +
    "AND fechareq<=" + "'" + formatoFecha.format(calendar2.getSelectedDate()) + "'";
    try {
    getSessionBean1().getRequerimientoRowSet().setCommand(command + " AND requerimiento.codestado =" + "'" + (String) estados.getSelected() + "'");
    getSessionBean1().getRequerimientoRowSet().getCommand();
    getSessionBean1().getRequerimientoDataProvider().refresh();
    } catch (Exception e) {
    error("No puede levantar comando");
    log("Cannot switch to person " +
    estados.getSelected().toString(), e);
    The Table component have a column of checkbox type for select a particular(s) row(s). With a Button it to choose all the rows that has been to set checkbox, in the session bean to save this selected rows and link to another page that show the details about seletec rows.
    The Problem
    Every time that i press the button, after to the select the rows, for another page showme detail, this page is empty because it execute the init method before the button_action, to re initialize and erase the user selection and lost it
    I try with another component that trigger event, por exmaple dropdownlist, and it the same, even to press the pagin in teh table it execute init meth, re-initialize and erase all.
    Result prove
    1.- I execute the application for first time:
              Execute      Init()
    2.- I Chage choos en the DropDownList
              Execute      Init() and
              after           estado_processValueChange()
    3.- I change choos again in the DropDownList
              Execute      Init() and
              after           estado_processValueChange()
    4.- I press pagin button in table
              Execute      Init()
    5.- I press button detail, for detail
         Execute      Init() ----> I reinitialize and lost the user select.
         after          Butoon_action
    How ia can to preven that every time it execute init(),
    Why alway it execute init method?, the init methd() is for initialize application and not RE INTIALIZED
    Why is the relation INIT(); PREPROCESS(), PRERENDER(), PROCESSVALUECHANGE, BUTTON_ACTION. What it execute first, what secodn?
    I need execute init method only one , at first time
    I hope i undertandme, i not native english.
    Thank for advance

    Anupama,
    Do you mean init or wdDoInit? You cannot call the later as well as you cannot call any WD-framework methods that start with "wd" prefix.
    By the way, wdDoInit in component controller (do not confuse with custom controller or interface controller) is called before any other method in any controller. So I hardly believe that it is not called when your view become available.
    Valery Silaev
    SaM Solutions
    http://www.sam-solutions.net

  • Portal runtime error exception ID: error in init method

    Hi Experts
    I am getting the portal runtime error http://<fqdn>:<port>/irj/portal,  can anybody suggest me what to do.
    "Portal runtime error.
    An exception occurred while processing your request. Send the exception ID to your portal administrator.
    Exception ID: 02:27_06/09/10_68650050"
    Here is the log file
    02:27_06/09/10_68650050
    [EXCEPTION]
    com.sapportals.portal.prt.component.PortalComponentException: Error in init method
    Component : com.sap.netweaver.coll.appl.ui.room.CollaborationDetailedNavigation
    at com.sapportals.portal.prt.component.PortalComponentContext.init(PortalComponentContext.java:251)
    at com.sapportals.portal.prt.core.broker.PortalComponentContextItem.refresh(PortalComponentContextItem.java:271)
    at com.sapportals.portal.prt.core.broker.PortalComponentContextItem.getContext(PortalComponentContextItem.java:316)
    at com.sapportals.portal.prt.component.PortalComponentRequest.getComponentContext(PortalComponentRequest.java:387)
    at com.sapportals.portal.pb.PageBuilder.createIviewProfile(PageBuilder.java:443)
    at com.sapportals.portal.pb.PageBuilder.createiView(PageBuilder.java:391)
    at com.sapportals.portal.pb.PageBuilder.createAndAddiViews(PageBuilder.java:233)
    at com.sapportals.portal.pb.PageBuilder.doOnNodeReady(PageBuilder.java:635)
    at com.sapportals.portal.prt.component.AbstractPortalComponent.handleEvent(AbstractPortalComponent.java:388)
    at com.sapportals.portal.pb.PageBuilder.handleEvent(PageBuilder.java:815)
    at com.sapportals.portal.prt.component.CachablePortalComponent.handleEvent(CachablePortalComponent.java:703)
    at com.sapportals.portal.prt.pom.ComponentNode.handleEvent(ComponentNode.java:252)
    at com.sapportals.portal.prt.pom.PortalNode.fireEventOnNode(PortalNode.java:368)
    at com.sapportals.portal.prt.pom.AbstractNode.addChildNode(AbstractNode.java:340)
    at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:642)
    at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:235)
    at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:523)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:412)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
    at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
    at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
    at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
    at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:104)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)
    Caused by: com.sapportals.portal.prt.core.broker.PortalComponentInstantiationException: Could not instantiate implementation class com.sapportals.portal.navigation.CollaborationNavTree of Portal Component com.sap.netweaver.coll.appl.ui.room.CollaborationDetailedNavigation because: Could not instantiate implementation class
    at com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.getInstanceInternal(PortalComponentItemFacade.java:269)
    at com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.getComponentInstance(PortalComponentItemFacade.java:160)
    at com.sapportals.portal.prt.core.broker.PortalComponentItem.getComponentInstance(PortalComponentItem.java:732)
    at com.sapportals.portal.prt.component.PortalComponentContext.getComponent(PortalComponentContext.java:103)
    at com.sapportals.portal.prt.component.PortalComponentContext.init(PortalComponentContext.java:242)
    ... 35 more
    Caused by: com.sapportals.portal.prt.runtime.PortalRuntimeException: [PortalApplicationItem._prepare]: com.sap.netweaver.coll.appl.ui.room
    at com.sapportals.portal.prt.core.broker.PortalApplicationItem.prepare(PortalApplicationItem.java:427)
    at com.sapportals.portal.prt.core.broker.PortalApplicationItem._refresh(PortalApplicationItem.java:507)
    at com.sapportals.portal.prt.core.broker.PortalApplicationItem.getCoreLoader(PortalApplicationItem.java:1360)
    at com.sapportals.portal.prt.core.broker.PortalComponentItem.getClassLoader(PortalComponentItem.java:569)
    at com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.getClassLoader(PortalComponentItemFacade.java:102)
    at com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.getInstanceInternal(PortalComponentItemFacade.java:228)
    ... 39 more
    Caused by: com.sapportals.portal.prt.runtime.PortalRuntimeException: [PortalApplicationItem._prepare]: com.sap.netweaver.bc.rf.service
    at com.sapportals.portal.prt.core.broker.PortalApplicationItem.prepare(PortalApplicationItem.java:427)
    at com.sapportals.portal.prt.core.broker.PortalApplicationItem.prepare(PortalApplicationItem.java:387)
    ... 44 more
    Caused by: com.sapportals.portal.prt.runtime.PortalRuntimeException: Exception during start of application: SAPJ2EE::library:signature_lib
    at com.sapportals.portal.prt.core.broker.SAPJ2EEApplicationItem.prepare(SAPJ2EEApplicationItem.java:323)
    at com.sapportals.portal.prt.core.broker.PortalApplicationItem.prepare(PortalApplicationItem.java:387)
    ... 45 more
    Caused by: com.sapportals.portal.prt.core.broker.SAPJ2EELibraryNotFoundException: Could not find Library SAPJ2EE::library:signature_lib
    at com.sapportals.portal.prt.core.broker.SAPJ2EEApplicationItem.prepare(SAPJ2EEApplicationItem.java:277)
    ... 46 more. . .
    Thanks in advance
    Uday

    Hi Tobias
    Thanks for your response, i can able to access /nwa. The trace file while is posted got from /nwa.
    I have restarted the portal. Can you please tell me where can we check the errors when portal started?
    Thanks in advance
    Uday

  • The servlet weblogic.servlet.AsyncInitServlet init method failed

    I installed WLS 9.2.2 recently with my app being on 8.1.5 for a long time.
    I chose to create a new domain instead of upgrading my existing one.
    I use the eclipse 3.2.2 with the WL plugin.
    When I start the server and login to the console not using eclipse it works fine.
    Trying to start the server and login to the console gives a internal server error.
    Any idea what could be wrong? I bolded the parts where I have looked into.
    Here is the console output:
    <Nov 19, 2008 3:13:02 PM CST> <Notice> <WebLogicServer> <BEA-000395> <Following extensions directory contents added to the end of the classpath:
    C:\bea92\weblogic92\platform\lib\p13n\p13n-schemas.jar;C:\bea92\weblogic92\platform\lib\p13n\p13n_common.jar;*C:\bea92\weblogic92\platform\lib\p13n\p13n_system.jar*;C:\bea92\weblogic92\platform\lib\wlp\netuix_common.jar;C:\bea92\weblogic92\platform\lib\wlp\netuix_schemas.jar;C:\bea92\weblogic92\platform\lib\wlp\netuix_system.jar;C:\bea92\weblogic92\platform\lib\wlp\wsrp-common.jar>
    <Nov 19, 2008 3:13:03 PM CST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Client VM Version 1.5.0_10-b03 from Sun Microsystems Inc.>
    <Nov 19, 2008 3:13:05 PM CST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 9.2 MP2 Mon Jun 25 01:32:01 EDT 2007 952826 >
    <Nov 19, 2008 3:13:10 PM CST> <Info> <WebLogicServer> <BEA-000215> <Loaded License : C:\bea92\license.bea>
    <Nov 19, 2008 3:13:10 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <Nov 19, 2008 3:13:10 PM CST> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
    <Nov 19, 2008 3:13:11 PM CST> <Notice> <Log Management> <BEA-170019> <The server log file C:\bea92\user_projects\domains\domain\servers\AdminServer\logs\AdminServer.log is opened. All server side log events will be written to this file.>
    <Nov 19, 2008 3:13:15 PM CST> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
    <Nov 19, 2008 3:13:22 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
    <Nov 19, 2008 3:13:22 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <Nov 19, 2008 3:13:30 PM CST> <Error> <HTTP> <BEA-101359> <The servlet weblogic.servlet.AsyncInitServlet init method failed while it was run in the background. The exception was: java.lang.NoClassDefFoundError: com/bea/p13n/management/ApplicationFilePoller$Handler.
    java.lang.NoClassDefFoundError: com/bea/p13n/management/ApplicationFilePoller$Handler
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
         Truncated. see log file for complete stacktrace
    >
    <Nov 19, 2008 3:13:37 PM CST> <Notice> <Log Management> <BEA-170027> <The server initialized the domain log broadcaster successfully. Log messages will now be broadcasted to the domain log.>
    <Nov 19, 2008 3:13:37 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN>
    <Nov 19, 2008 3:13:37 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING>
    <Nov 19, 2008 3:13:39 PM CST> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 127.0.0.1:7005 for protocols iiop, t3, ldap, http.>
    <Nov 19, 2008 3:13:39 PM CST> <Notice> <WebLogicServer> <BEA-000331> <Started WebLogic Admin Server "AdminServer" for domain "domain" running in Development Mode>
    <Nov 19, 2008 3:13:40 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
    <Nov 19, 2008 3:13:40 PM CST> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
    <Nov 19, 2008 3:22:04 PM CST> <Error> <HTTP> <BEA-101020> <[weblogic.servlet.internal.WebAppServletContext@d6c6a0 - appName: 'consoleapp', name: 'console', context-path: '/console'] Servlet failed with Exception
    java.lang.NullPointerException
         at weblogic.servlet.AsyncInitServlet.service(AsyncInitServlet.java:124)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         Truncated. see log file for complete stacktrace
    Edited by: user5384782 on Nov 19, 2008 1:42 PM
    Edited by: user5384782 on Nov 19, 2008 3:59 PM

    Thanks for your replies adrian and david.
    The only thing I see different is that eclipse has different arguments when calling the jvm at the top.
    startWebLogic.cmd:
    C:\bea92\JDK150~1\bin\java -client -Xms256m -Xmx512m -XX:CompileThreshold=8000
    -XX:PermSize=48m -XX:MaxPermSize=128m -Xverify:none -da -Dplatform.home=C:\b
    ea92\WEBLOG~1 -Dwls.home=C:\bea92\WEBLOG~1\server -Dwli.home=C:\bea92\WEBLOG~1\i
    ntegration -Dweblogic.management.discover=true -Dwlw.iterativeDev= -Dwlw.testC
    onsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=C:\bea92\patch_weblogic922
    \profiles\default\sysext_manifest_classpath -Dweblogic.Name=AdminServer -Djava.s
    ecurity.policy=C:\bea92\WEBLOG~1\server\lib\weblogic.policy weblogic.Server
    eclipse:
    -hotspot -Xms32m -Xmx200m -Dweblogic.ProductionModeEnabled=
    Eclipse may be calling the cmd I dont know.
    I will try upgrading my eclipse like adrian said, but in the meantime I appreciate any further advice/tips.

  • PortalComponentException: Error in init method

    Anyone know why I am getting this error below?
    #1.5#00101810DF7F00570000057E000012A4000428586D6BCD3D#1170260164912#com.sap.portal.portal#sap.com/irj#com.sap.portal.portal#klm1#50377##lssvrep02_EP2_212781850#klm1#c18d3c00b14511dbc4e300101810df7f#SAPEngine_Application_Thread[impl:3]_28##0#0#Error#1#/System/Server#Java###Exception ID:11:16_31/01/07_0152_212781850
    [EXCEPTION]
    #1#com.sapportals.portal.prt.component.PortalComponentException: Error in init method
    Component : com.sap.pct.hcm.attendanceoverview.default
         at com.sapportals.portal.prt.component.PortalComponentContext.init(PortalComponentContext.java:251)
         at com.sapportals.portal.prt.core.broker.PortalComponentContextItem.refresh(PortalComponentContextItem.java:271)
         at com.sapportals.portal.prt.core.broker.PortalComponentContextItem.getContext(PortalComponentContextItem.java:316)
         at com.sapportals.portal.prt.component.PortalComponentRequest.getComponentContext(PortalComponentRequest.java:385)
         at com.sapportals.portal.prt.connection.PortalRequest.getRootContext(PortalRequest.java:435)
         at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:607)
         at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
         at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:522)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: com.sapportals.portal.prt.core.broker.PortalComponentInstantiationException: Could not instantiate implementation class com.sap.pct.hcm.attendanceoverview.AttendanceOverviewPageProcComp of Portal Component com.sap.pct.hcm.attendanceoverview.default because: Could not find implementation class
         at com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.getInstanceInternal(PortalComponentItemFacade.java:242)
         at com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.getComponentInstance(PortalComponentItemFacade.java:160)
         at com.sapportals.portal.prt.core.broker.PortalComponentItem.getComponentInstance(PortalComponentItem.java:732)
         at com.sapportals.portal.prt.component.PortalComponentContext.getComponent(PortalComponentContext.java:103)
         at com.sapportals.portal.prt.component.PortalComponentContext.init(PortalComponentContext.java:242)
         ... 26 more
    Caused by: java.lang.ClassNotFoundException: com.sap.pct.hcm.attendanceoverview.AttendanceOverviewPageProcComp
    Found in negative cache
    Loader Info -
    ClassLoader name: [com.sapportals.portal.prt.util.ApplicationClassLoader@807a6f]
    Parent loader name: [com.sapportals.portal.prt.util.ApplicationClassLoader@10dcad9]
    References:
       not registered!
    No resources !
         at com.sap.engine.frame.core.load.ReferencedLoader.loadClass(ReferencedLoader.java:360)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:219)
         at com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.getInstanceInternal(PortalComponentItemFacade.java:228)
         ... 30 more

    Hi kenneth,
    The error is due to the runtime couldnt identify your portalcomponent to run.Have u entered the component in the deployment descriptor and the set the component profile and attribute values.
    Check the portalApp.xml
    check the security to  low .
    Set SecurityZone= com.sap.portal/low_safety.
    Hope this helps.
    Points are welcome
    Swathi

  • EPCF : Error in Init Method

    Hi all,
    When i try to run my EPCF , I'm getting the following error , please let me get some suggestion on this.
    EXCEPTION]
    #1#com.sapportals.portal.prt.component.PortalComponentException: Error in init method
    Component : Framework.MyProducer
    at com.sapportals.portal.prt.component.PortalComponentContext.init(PortalComponentContext.java:251)
    at com.sapportals.portal.prt.core.broker.PortalComponentContextItem.refresh(PortalComponentContextItem.java:267)
    at com.sapportals.portal.prt.core.broker.PortalComponentContextItem.getContext(PortalComponentContextItem.java:312)
    at com.sapportals.portal.prt.component.PortalComponentRequest.getComponentContext(PortalComponentRequest.java:385)
    at com.sapportals.portal.prt.connection.PortalRequest.getRootContext(PortalRequest.java:435)
    at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:607)
    at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
    at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:545)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
    at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
    at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
    at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
    at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: com.sapportals.portal.prt.component.PortalComponentException: Cannot find JSP file: MyProducer.jsp
    at com.sapportals.portal.prt.core.broker.JSPComponentItem.getComponentInstance(JSPComponentItem.java:132)
    at com.sapportals.portal.prt.core.broker.PortalComponentItem.getComponentInstance(PortalComponentItem.java:732)
    at com.sapportals.portal.prt.component.PortalComponentContext.getComponent(PortalComponentContext.java:103)
    at com.sapportals.portal.prt.component.PortalComponentContext.init(PortalComponentContext.java:242)
    My portalapp.xml
    <?xml version="1.0" encoding="utf-8"?>
    <application>
    <application-config>
    <property name="SharingReference" value="com.sap.portal.htmlb"/>
    </application-config>
    <components>
    <component name="MyProducer">
    <component-config>
    <property name="ComponentType" value="jspnative"/>
    <property name="JSP" value="MyProducer.jsp"/>
    <property name="SecurityZone" value="com.customer.portal/high_safety"/>
    </component-config>
    <component-profile>
    <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
    </component-profile>
    </component>
    <component name="MyConsumer">
    <component-config>
    <property name="ComponentType" value="jspnative"/>
    <property name="JSP" value="MyConsumer.jsp"/>
    <property name="SecurityZone" value="com.customer.portal/high_safety"/>
    </component-config>
    <component-profile>
    <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
    </component-profile>
    </component>
    </components>
    <services/>
    </application>

    Hi Bris,
    The problem is that the MyProducer.jsp cannot be found (this has absolutely nothing to do with EPCF). Probably you have put it into the wrong path: "This path is relative to the private resources (in PORTAL-INF in PAR) of the portal application", see http://help.sap.com/saphelp_erp2004/helpdata/en/16/d12c413894f823e10000000a155106/frameset.htm
    I.e., if you have put it under .../PORTAL-INF/pagelet/MyProducer.jsp, the corresponding portalapp.xml entry must read:
    <property name="JSP" value="pagelet/MyProducer.jsp"/>
    Hope it helps
    Detlev

  • How to modify build.xml ant to invoke a static init method when building?

    Hello,
    I´d like to make it as such that when I select to build and clean project in netbeans it calls a specific static init method in one of the project classes (which actually generates the database file). //for that purpose that code is only needed there. Is it possible?

    hi.. please help me with this problem...
    i need to execute tomcat server using my ant build file... but how can i do that if the tomcat server is located in other PC... i tried the exec task, but it seems to be not enough... the server doesn't run on the other pc but my it seems fine on my console.
    by the way, here's my code...
    <target name="run_tomcat">
    <exec dir="${src.dir}" executable="cmd">
    <arg line="/c startup.bat" />
    </exec>
    <echo message="tomcat successfully running!!!"/>
    </target>
    my src.dir has value in the properties file which contains the mapped directory. please tell me.. is it really possible to run a program in other PC using my build file in my PC...
    please....please....please....please.... heeeelllpppp!!!!
    tnx a lot!!!!

  • Monitoring progress of init() method in servlet

    the init() method of my servlet is extremely long; it will probably take several minutes to load. For this reason, I want to have my servlet print its progress periodically. Unfortunately, when initializing a servlet, Tomcat does not allow the System.out.println() method to do anything.
    Is there a way to tell tomcat to print something to the screen while it is initializing the servlets?

    You can write jamon monitors after each event that occurs in the init method. Then if you go to the jamonadmin page you can see the progress. You will find many other uses for jamon too. One thng that it does real well is to allow you to look at what is currently executing in your web application via the jamonadmin page.
    It is easy to use. Really just 2 methods: start and stop. see below. You should be able to get it working in minutes.
    jamon is an open source project. Also if you use the servlet filter it will keep stats such as hits, and time stats (avg, total, min, max) and more.
    import com.jamonapi.*;
    // i'm not sure of the actual signature name, but this should give you the point.
    public void init() {
    Monitor mon=MonitorFactory.start("executing Part1 Of Init")
    ... part 1...
    mon.stop();
    Monitor mon=MonitorFactory.start("executing Part2 Of Init")
    ... part 2...
    mon.stop();To get jamon go to www.jamonapi.com. There is also a live program that lets you see the JAMonAdmin.jsp page in action.
    steve - http://www.jamonapi.com

  • Can servlet has more than one init method...?

    Clarification 1:
    Suppose i will write init()(-without constructor) method. In this case, how servlet config object passed to init method.
    Clarification 2:
    if i will override init(ServletConfig) .why do i need to call super.init(config).
    thanks,
    JaiGaneshR

    suppose i ll override init method without constructor. //wrong
    i think u want.
    suppose i ll override init method without arguments
    then also servlet calls the init(ServletConfig) method.
    1st servlet container check in ur Servlet class for init(ServletConfig)
    it's not found.
    2.then it checks in the super class HttpServlet. it's not found.
    3.then it checks in the super class GenericServlet there it will found it.
    then it will execute.
    package javax.servlet;
    import java.io.IOException;
    import java.io.Serializable;
    import java.util.Enumeration;
    // Referenced classes of package javax.servlet:
    // Servlet, ServletConfig, ServletException, ServletContext,
    // ServletRequest, ServletResponse
    public abstract class GenericServlet
    implements Servlet, ServletConfig, Serializable
    public GenericServlet()
    public void destroy()
    public String getInitParameter(String name)
    return getServletConfig().getInitParameter(name);
    public Enumeration getInitParameterNames()
    return getServletConfig().getInitParameterNames();
    public ServletConfig getServletConfig()
    return config;
    public ServletContext getServletContext()
    return getServletConfig().getServletContext();
    public String getServletInfo()
    return "";
    public void init(ServletConfig config) *<-------------------------------------------------- called*
    throws ServletException
    this.config = config;
    init(); ---------------------------------------------------> called your override method
    public void init() *<------------------------------------------------- Not called*
    throws ServletException
    public void log(String msg)
    getServletContext().log(getServletName() + ": " + msg);
    public void log(String message, Throwable t)
    getServletContext().log(getServletName() + ": " + message, t);
    public abstract void service(ServletRequest servletrequest, ServletResponse servletresponse)
    throws ServletException, IOException;
    public String getServletName()
    return config.getServletName();
    private transient ServletConfig config;
    4. finally ur init() without arugments method will exected.
    Edited by: Lakshman.Balanagu on 26 Aug, 2008 3:43 PM
    Edited by: Lakshman.Balanagu on 26 Aug, 2008 3:44 PM

Maybe you are looking for

  • Time machine need more space than necessary.

    Hi. Can anyone help. I have a two 1TB external hard drives one backs the other up. Until now it has been fine but suddenly time machine has decided theres not enough room even though there the same size drives. Ive deleted the backup drive and the ti

  • How to find the patches for perticular concurrent program

    HI How to find the patches for perticular concurrent program. suppose for one concurrent program we create the patch and applied now i want know the which patch applied for perticular concurrent program through back end. Thank's

  • CE 7.2 Trial Installation

    Hi, I have installed all features related to the CE 7.2 Trial version without errors. After completion of the software updates, I got a message to restart the IDE. Normally, perspectives such as for example "Process Development" would become accessib

  • INVENTORY & ORDER MANAGEMENT Tables join conditions required

    Hi All, I have to create one view, it has to display item_number, item_description,quantity_in_warehouse and pendingquantity_in_salesorder. query is based on INVENTORY & ORDER MANAGEMENT Tables. i have written below query, it is not giving expected o

  • How to get ipad screen repaired?

    Best suggestions for repair.  My ipad screen has two cracks.  Apple store and staff non responsive. Thanks