Init method in Weblogic 5.1 gives  problem

          I have used init method in 4.5
          the same method gives problem in 5.1
          C:\weblogic\myserver\classfiles\jsp_servlet\_addcontract.java:89: The method void init(javax.servlet.ServletConfig) declared in class jsp_servlet._addcontract cannot override the final method of the same signature declared in class weblogic.servlet.jsp.JspBase. Final methods cannot be overridden.
          probably occurred due to an error in /addContract.jsp line 11:
          

Use jspInit method.
          harish <[email protected]> wrote:
          > I have used init method in 4.5
          > the same method gives problem in 5.1
          > C:\weblogic\myserver\classfiles\jsp_servlet\_addcontract.java:89: The method void init(javax.servlet.ServletConfig) declared in class jsp_servlet._addcontract cannot override the final method of the same signature declared in class weblogic.servlet.jsp.JspBase. Final methods cannot be overridden.
          > probably occurred due to an error in /addContract.jsp line 11:
          Dimitri
          

Similar Messages

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

  • LDAP Context Initialization Problem in a Servlet's Init method

    Hi
    I have a servlet where I am using the InitialDirContext to Initialize context to a LDAP Server. I have created the context as a static variable. I am initializing the context in the init method and am using the same reference in the service method of the servlet. But if the context fails (due to naming exception and time out) in the init method all my requests in the service method will fail. Is there any way to validate the reference before using the same in the service method.
    Also what is the best approach to initialize the context in a servlet. Whether to initialize in the service method or the init method.
    I would appreciate if anyone can answer the above 2 queries.
    Thanks in advace,
    Ashish

    If you want to use threadsafe objects in doPost/doGet there are two common ways to do this.
    First, create the object in doPost/doGet. This may get expensive depending on the object, but it is 'easy' code and works.
    The second option is to create a pool of objects in the servlet's init() method and to just have doPost/doGet get an object from the pool, use it and return it when done. This take a little more work to code, but the overhead of creating objects is almost eliminated. Look at jakarta/apache commons pool for a quick way to do this.
    If you create on object in init() and use it in doPost/doGet, any time you get two request for the same servlet at the same time you will have synchronization issues that will usually cause problems. There is one instance of each Servlet, so all request for that servlet go through the single instance. Anything in doPost/doGet must be threadsafe.

  • Weblogic -Sybase Bridge driver Problem

    I am using the weblogic server 6.1 (in production mode)with sybase anyware 6.0
    and
    i am using the bridge driver to connect to database.
    I have tried using the own implementation of coonection pool and also the poool
    functionality provided by the weblogic.
    It some times give s me the error as follows:
    1) Authentication violation
    --Only when i am firing the delete or insert or update queries.
    2) too many connection to the the database ,database rejected the connection.
    Can u give the sample code where in i can use connection pool.
    I am creating the one datasource instance in the init method of my main controller
    servlet and then i am pasing this datasource to the constuctor of the util classes
    and the action classes.
    The problem is that also sometimes calls the destroy method of the controller
    servlet and which again creates a new datasource.
    Is there any timeout setting to be done for the post request which can solve this
    problem.
    Thanks for replies in advance.
    Regards,
    jignesh.
    [ConnectionProblem.txt]

    I am using the weblogic server 6.1 (in production mode)with sybase anyware 6.0
    and
    i am using the bridge driver to connect to database.
    I have tried using the own implementation of coonection pool and also the poool
    functionality provided by the weblogic.
    It some times give s me the error as follows:
    1) Authentication violation
    --Only when i am firing the delete or insert or update queries.
    2) too many connection to the the database ,database rejected the connection.
    Can u give the sample code where in i can use connection pool.
    I am creating the one datasource instance in the init method of my main controller
    servlet and then i am pasing this datasource to the constuctor of the util classes
    and the action classes.
    The problem is that also sometimes calls the destroy method of the controller
    servlet and which again creates a new datasource.
    Is there any timeout setting to be done for the post request which can solve this
    problem.
    Thanks for replies in advance.
    Regards,
    jignesh.
    [ConnectionProblem.txt]

  • 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

  • Invoking servlets init method

    Let's just say I want to write a startup class that initilizes a servlet,
              (just like ServletStartup class). How would I do this without using the
              URLConnection class?
              Thanks
              

    c00ler wrote:
    Hey guys,
    Studying JDBC & Java by O'Reilly. Old book, very old. You'd be better off with the Sun JDBC tutorial. Google for it.
    init() method is not really explained in the book and i'm kind of stuck. As far as i understand it's used to initialise servlet before its execution right? O'Reilly uses it to connect to the database (i'm find with connection part), problem is i don't understand why i can't connect through proccessRequest() method and I can't actually find the init() method within servlet...unless of course i write my own one. There is code offered by O'Reilly:
    Terrible form. More evidence of just how out of date this book is. No one would write a servlet to do this now.
    Book was published quite a few years ago...is there different implementation to this?
    Also for some reason Class.forName().newInstance() throws unidentified error if i use SQLException (even though java.sql.* is there), but works fine with Exception...any ideas???Not unidentified if you look at the javadocs for Class - it throws ClassNotFoundException, among others.
    You don't have to call newInstance() - Class.forName() is sufficient for registering the driver class.
    %

  • Servlet init() method called multiple times

    We have a Servlet-based application which does lengthy initialization.
    We've noticed that when multiple requests arrive,
    but the Servlet's init() method has not returned yet
    for the first request, the application server calls init() multiple times.
    You can even see this with the Fortune sample
    Servlet. Starting the app server and sending 20 or 30
    simultaneous requests causes multiple Fortune Servlet init messages to appear in the kjs log.
    Why is this? We do not implement SingleThreadModel.
    Doesn't the J2EE 1.2 spec say init will be called
    only once?
    How do we prevent it?
    A Startup class which inits our
    Servlet?
    Or a synchronized block within our init method, with some checks of static member variables
    so that the initialization work only happens once?
    Or is there some kregedit magic or deployment descriptor change I could make?
    Again, it's not a SingleThreadModel issue, so don't
    point me there.
    This is iAS 6.0 SP4, on Solaris, by the way.

    Hi
    Yes,you are right. In iAS6.0 SP4 When multiple requests arrive,and the Servlet's init() method has not returned yet for the first request, the application server calls init()multiple times. This problem is resolved in iAS 6.5.
    There is no kregedit magic that will solve this problem.
    Right now the workaround is any of the solution you proposed. Or use iAS6.5. I have tested it with fortune.
    Please download it and check with your application.
    you can find free download at http://developer.iplanet.com/appserver/testdrive/testdrive_65.html
    Thanks

  • Init method is called multiple times

    Hi,
    init method in my servlet is called more than 1 time.
    I think it is supposed to be called only 1 time,when the application is loaded.
    anything to do with web.xml ???
    or else what r the situations that init method is called more than 1 time
    thanks

    Hi,
    actually I figured out the problem.
    I am using logger staements for debugging.
    I am also using singlethread model for servlet.
    I came to know that it creates multiple instances of servlet...
    which inturn calls init method multiple times.
    i took out that singlethread model,now it is working perfect.
    Thanks

  • Backing file init method always called for proxy portlets

    Hello,
    We are currently using Weblogic Portal 10 MP1. Deployed within our Portal EAR is a local proxy portlet and attached to this proxy portlet is a backing file, which currently implements the init() and prerender() methods from the backing interface.
    When this is placed in a page that is within a desktop, the init() method is always invoked no matter which page you access within the desktop. As I understand it from the documentation, if you have "tree optimization" turned on, then the init() method will only be called when rendering the actual page the proxy portlet is in. But this doesn't seem to be the case. However, if I define a standard Java portlet within the EAR and attach a backing file, then the init() follows the rules when tree optimization is turned on or off.
    Does anyone know if this is a defect within the portal framework, or is this expected and proxy portlets do not follow this rule?
    And I guess, if it is a defect or known limitation, is there a possible workaround? I assume the simplest workaround will be to move the logic into the prerender() method.
    Regards,
    Jonathan

    Hello Jonathan,
    Tree optimization is a tricky thing- some portlets may still be initialized even when the page they are on isn't visible. The rules for which get initialized and which don't are very complicated and depend on a number of things, so it is just best to not rely on the init() method not getting called.
    By far the best option for your use-case is to have the proxy portlet listen to the "onRefresh" event, and move the logic from the backing file's init() method into an event-handling method in the backing file, then have this method called when the refresh event is received. Here's a sample portion of the .portlet file for doing this:
    <netuix:handlePortalEvent event="onRefresh" eventLabel="onRefreshEvent">
        <netuix:invokeBackingFileMethod method="handleRefreshEvent"/>
    </netuix:handlePortalEvent>The "onRefresh" event is sent to the portlet only when it is visible on the page, so it should work perfectly for your use-case.
    Kevin

  • Weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND

    I have a deploy application on the server [Weblogic 10], but when I try to assign a VirtualHost handing me the following error:
              weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND
              problem: cvc-complex-type.2.4b: Element not allowed: dispatcher@http://java.sun.com/xml/ns/javaee in element filter-mapping@http://java.sun.com/xml/ns/javaee:<null>
              problem: cvc-complex-type.2.4b: Element not allowed: dispatcher@http://java.sun.com/xml/ns/javaee in element filter-mapping@http://java.sun.com/xml/ns/javaee:<null>
              at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:234)
              at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:221)
              at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:146)
              at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:292)
              at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:260)
              Truncated. see log file for complete stacktrace

    <?xml version="1.0" encoding="UTF-8"?>
              <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
              <display-name>portalUchileWeb</display-name>
              <welcome-file-list>
              <welcome-file>index.html</welcome-file>
              <welcome-file>index.htm</welcome-file>
              <welcome-file>index.jsp</welcome-file>
              <welcome-file>default.html</welcome-file>
              <welcome-file>default.htm</welcome-file>
              <welcome-file>default.jsp</welcome-file>
              </welcome-file-list>
              <filter>
              <filter-name>PageFlowJspFilter</filter-name>
              <filter-class>org.apache.beehive.netui.pageflow.PageFlowJspFilter</filter-class>
              </filter>
              <filter>
              <filter-name>PageFlowForbiddenFilter</filter-name>
              <filter-class>org.apache.beehive.netui.pageflow.PageFlowForbiddenFilter</filter-class>
              <init-param>
              <param-name>response-code</param-name>
              <param-value>404</param-value>
              </init-param>
              </filter>
              <filter-mapping>
              <filter-name>PageFlowJspFilter</filter-name>
              <url-pattern>*.jsp</url-pattern>
              <dispatcher>FORWARD</dispatcher>
              <dispatcher>REQUEST</dispatcher>
              <dispatcher>INCLUDE</dispatcher>
              </filter-mapping>
              <filter-mapping>
              <filter-name>PageFlowJspFilter</filter-name>
              <url-pattern>*.jspx</url-pattern>
              <dispatcher>FORWARD</dispatcher>
              <dispatcher>REQUEST</dispatcher>
              <dispatcher>INCLUDE</dispatcher>
              </filter-mapping>
              <filter-mapping>
              <filter-name>PageFlowForbiddenFilter</filter-name>
              <url-pattern>*.java</url-pattern>
              <dispatcher>REQUEST</dispatcher>
              </filter-mapping>
              <filter-mapping>
              <filter-name>PageFlowForbiddenFilter</filter-name>
              <url-pattern>*.jsfb</url-pattern>
              <dispatcher>REQUEST</dispatcher>
              </filter-mapping>
              <filter-mapping>
              <filter-name>PageFlowForbiddenFilter</filter-name>
              <url-pattern>*.jpfs</url-pattern>
              <dispatcher>REQUEST</dispatcher>
              </filter-mapping>
              <listener>
              <listener-class>org.apache.beehive.netui.pageflow.PageFlowContextListener</listener-class>
              </listener>
              <listener>
              <listener-class>org.apache.beehive.netui.pageflow.HttpSessionMutexListener</listener-class>
              </listener>
              <servlet>
              <servlet-name>action</servlet-name>
              <servlet-class>org.apache.beehive.netui.pageflow.PageFlowActionServlet</servlet-class>
              <init-param>
              <param-name>config</param-name>
              <param-value>/_pageflow/struts-config.xml</param-value>
              </init-param>
              <init-param>
              <param-name>debug</param-name>
              <param-value>2</param-value>
              </init-param>
              <init-param>
              <param-name>detail</param-name>
              <param-value>2</param-value>
              </init-param>
              <load-on-startup>2</load-on-startup>
              </servlet>
              <servlet>
              <servlet-name>XmlHttpRequestServlet</servlet-name>
              <servlet-class>org.apache.beehive.netui.pageflow.xmlhttprequest.XmlHttpRequestServlet</servlet-class>
              </servlet>
              <servlet-mapping>
              <servlet-name>action</servlet-name>
              <url-pattern>*.jpf</url-pattern>
              </servlet-mapping>
              <servlet-mapping>
              <servlet-name>action</servlet-name>
              <url-pattern>*.do</url-pattern>
              </servlet-mapping>
              <servlet-mapping>
              <servlet-name>XmlHttpRequestServlet</servlet-name>
              <url-pattern>*.xhr</url-pattern>
              </servlet-mapping>
              <servlet-mapping>
              <servlet-name>XmlHttpRequestServlet</servlet-name>
              <url-pattern>*.render</url-pattern>
              </servlet-mapping>
                   <jsp-config>
              <taglib>
              <taglib-uri>render.tld</taglib-uri>
              <taglib-location>/WEB-INF/lib/render_taglib.jar</taglib-location>
              </taglib>
              <taglib>
              <taglib-uri>/WEB-INF/exesite.tld</taglib-uri>
              <taglib-location>/WEB-INF/exesite.tld</taglib-location>
              </taglib>
              <taglib>
              <taglib-uri>netui-tags-template.tld</taglib-uri>
              <taglib-location>/WEB-INF/netui-tags-template.tld</taglib-location>
              </taglib>
                   <taglib>
              <taglib-uri>netui-tags-databinding.tld</taglib-uri>
              <taglib-location>/WEB-INF/netui-tags-databinding.tld</taglib-location>
              </taglib>
              <taglib>
              <taglib-uri>netui-tags-html.tld</taglib-uri>
              <taglib-location>/WEB-INF/netui-tags-html.tld</taglib-location>
              </taglib>
              <taglib>
              <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
              <taglib-location>/WEB-INF/lib/struts-bean.tld</taglib-location>
              </taglib>
              <taglib>
              <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
              <taglib-location>/WEB-INF/lib/struts-logic.tld</taglib-location>
              </taglib>
              <taglib>
              <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
              <taglib-location>/WEB-INF/lib/struts-adapter-html.tld</taglib-location>
              </taglib>
              <taglib>
              <taglib-uri>um.tld</taglib-uri>
              <taglib-location>/WEB-INF/lib/um_taglib.jar</taglib-location>
              </taglib>
              </jsp-config>
              </web-app>

  • How servlet's init method is overridden ?

    Here is a sample code to override servlet's init method.
    public class BookDBServlet ... {
            private BookstoreDB books;
            public void init(ServletConfig config) throws ServletException {
                // Store the ServletConfig object and log the initialization
                super.init(config);
                // Load the database to prepare for requests
                books = new BookstoreDB();
        }I dont get why super.init(config); is called.
    Comment says +// Store the ServletConfig object and log the initialization+
    what does "Store" mean here ? Where it is stored ?
    how it is logged ( log4j / commons -logging ? ) and where (which file) it is logged ?
    Can we remove this line without any damage ?

    There are several calls you can make to the servlet object which are simply delegated to the ServletConfig object, most notably getServletContext(). The default action of the init(SerletConfig config) method is to store the config in a field which is defined in GenericServlet, so that these calls can work. If you don't do this then calling getServletContext() at some later time will give you a NullPointerException.
    I think the reference to logging is that, if you use the built in servlet logging system, rather than log4j or java.util.loging then this depends on a valid servlet context, which in turn, depends on a valid servlet config reference.

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

  • 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

Maybe you are looking for

  • SOLMAN 4.0 SR2 connect to SAP R/3 Three System landscape (DEV QA and PRD)

    Hi, We have successfully installed SOLMAN 4.0 SR2 (ABAP + JAVA) on WIN2003 SP2 EE MSSQL 2005 EE SP1. I just want to activate the service so that SOLMAN could see my existing SAP R/3 4.6 C Three system landscape (DEV QAS PRD). I heard settings should

  • Format Error in displaying date in WD

    Hi All: I create a simple Type of type date in my dictionary and a context value attribute that is bind it to the value property of an InputField. The problem is that when the application is running, appears the date Navigator and I select a date but

  • Memory leak using thin client

    Subject: Memory Leak while using thin client. From: [email protected] (Alon Albert) Newsgroups: weblogic.developer.interest.jndi I have a small test program that causes a memory leak while connecting to a weblogic server. The code is appended to the

  • External monitor is not listed by xrandr

    Hi, I have an external monitor (VGA) connected to my laptop. All worked fine until the last nvidia-package update. X would no longer start up and therefore I decided to use the free nv driver instead (xf86-video-nv package). I updated my xorg.conf an

  • Inventory fail on 6509E

    I'm currently experiencing some problems with LMS 3.1 where inventory collection fails on cat6500 switches running 12.2(33)SXI1, Sup720. I have changed the SNMP timeout to 30 seconds. Anyone able to help?