You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by dfsdf fsdfsd <bu...@yahoo.com> on 2010/12/14 15:13:01 UTC

StartUpServlet in web.xml is not executed

Hi 
I am using Tomcat 5.5.4 under Unix Sun Solaris.
I have a servlet that should be executed on web.xml

<web-app 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"
    version="2.4">

  <display-name>Apache-Axis</display-name>
  <servlet>
    <servlet-name>StartUp</servlet-name>      
    <servlet-class>
        com.dpadmin.config.StartUpServlet
    </servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>



But then now, this servlet is not executed.
I have the same problem around 1 year ago, and by that time, i just deleted the work directory under my webapp and it works.

And now, it doenst work anymore.

Log file when it works :
Using CATALINA_BASE:   /opt/dpmaster/dp7.1.2/dpadminserver
Using CATALINA_HOME:   /opt/dpmaster/thirdparty/jakarta_tomcat
Using CATALINA_TMPDIR: /opt/dpmaster/dp7.1.2/dpadminserver/temp
Using JAVA_HOME:       /usr/java
Aug 31, 2010 4:44:42 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-7600
Aug 31, 2010 4:44:42 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1197 ms
Aug 31, 2010 4:44:42 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Aug 31, 2010 4:44:42 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.4
Aug 31, 2010 4:44:42 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Aug 31, 2010 4:44:43 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive administrator.war
log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.TldConfig).
log4j:WARN Please initialize the log4j system properly.

Aug 31, 2010 4:44:47 PM com.generaladmin.modules.ModuleManager initialize
INFO: No modules found in directory /opt/dpmaster/dp7.1.2/dpadminserver/modules
Aug 31, 2010 4:44:47 PM com.dpadmin.config.StartUpServlet init
INFO: No modules found in directory /opt/smarttrust/dpmaster/dp7.1.2/dpadminserver/modules

Aug 31, 2010 4:44:49 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-7600
Aug 31, 2010 4:44:49 PM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:7602



And now only like this :

Using CATALINA_BASE:   /opt/dpmaster/dp7.1.2/dpadminserver
Using CATALINA_HOME:   /opt/dpmaster/thirdparty/jakarta_tomcat
Using CATALINA_TMPDIR: /opt/dpmaster/dp7.1.2/dpadminserver/temp
Using JAVA_HOME:       /usr/java
Dec 14, 2010 5:57:49 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-7600
Dec 14, 2010 5:57:49 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1050 ms
Dec 14, 2010 5:57:49 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Dec 14, 2010 5:57:49 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.4
Dec 14, 2010 5:57:49 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Dec 14, 2010 5:57:49 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive administrator.war
log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.TldConfig).
log4j:WARN Please initialize the log4j system properly.

Aug 31, 2010 4:44:49 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-7600
Aug 31, 2010 4:44:49 PM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:7602



You may see that the com.dpadmin.config.StartUpServlet init
is not executed.

How do i solve this ?

Thank you.

Best Regard
Sandy



      

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: StartUpServlet in web.xml is not executed

Posted by Pid * <pi...@pidster.com>.
On 14 Dec 2010, at 14:13, dfsdf fsdfsd <bu...@yahoo.com> wrote:

> Hi
> I am using Tomcat 5.5.4 under Unix Sun Solaris.
> I have a servlet that should be executed on web.xml
>
> <web-app 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"
>     version="2.4">
>
>   <display-name>Apache-Axis</display-name>

Uh-oh.

p

>   <servlet>
>     <servlet-name>StartUp</servlet-name>
>     <servlet-class>
>         com.dpadmin.config.StartUpServlet
>     </servlet-class>
>     <load-on-startup>1</load-on-startup>
>   </servlet>
>
>
>
> But then now, this servlet is not executed.
> I have the same problem around 1 year ago, and by that time, i just deleted the work directory under my webapp and it works.
>
> And now, it doenst work anymore.
>
> Log file when it works :
> Using CATALINA_BASE:   /opt/dpmaster/dp7.1.2/dpadminserver
> Using CATALINA_HOME:   /opt/dpmaster/thirdparty/jakarta_tomcat
> Using CATALINA_TMPDIR: /opt/dpmaster/dp7.1.2/dpadminserver/temp
> Using JAVA_HOME:       /usr/java
> Aug 31, 2010 4:44:42 PM org.apache.coyote.http11.Http11Protocol init
> INFO: Initializing Coyote HTTP/1.1 on http-7600
> Aug 31, 2010 4:44:42 PM org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 1197 ms
> Aug 31, 2010 4:44:42 PM org.apache.catalina.core.StandardService start
> INFO: Starting service Catalina
> Aug 31, 2010 4:44:42 PM org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/5.5.4
> Aug 31, 2010 4:44:42 PM org.apache.catalina.core.StandardHost start
> INFO: XML validation disabled
> Aug 31, 2010 4:44:43 PM org.apache.catalina.startup.HostConfig deployWAR
> INFO: Deploying web application archive administrator.war
> log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.TldConfig).
> log4j:WARN Please initialize the log4j system properly.
>
> Aug 31, 2010 4:44:47 PM com.generaladmin.modules.ModuleManager initialize
> INFO: No modules found in directory /opt/dpmaster/dp7.1.2/dpadminserver/modules
> Aug 31, 2010 4:44:47 PM com.dpadmin.config.StartUpServlet init
> INFO: No modules found in directory /opt/smarttrust/dpmaster/dp7.1.2/dpadminserver/modules
>
> Aug 31, 2010 4:44:49 PM org.apache.coyote.http11.Http11Protocol start
> INFO: Starting Coyote HTTP/1.1 on http-7600
> Aug 31, 2010 4:44:49 PM org.apache.jk.common.ChannelSocket init
> INFO: JK2: ajp13 listening on /0.0.0.0:7602
>
>
>
> And now only like this :
>
> Using CATALINA_BASE:   /opt/dpmaster/dp7.1.2/dpadminserver
> Using CATALINA_HOME:   /opt/dpmaster/thirdparty/jakarta_tomcat
> Using CATALINA_TMPDIR: /opt/dpmaster/dp7.1.2/dpadminserver/temp
> Using JAVA_HOME:       /usr/java
> Dec 14, 2010 5:57:49 PM org.apache.coyote.http11.Http11Protocol init
> INFO: Initializing Coyote HTTP/1.1 on http-7600
> Dec 14, 2010 5:57:49 PM org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 1050 ms
> Dec 14, 2010 5:57:49 PM org.apache.catalina.core.StandardService start
> INFO: Starting service Catalina
> Dec 14, 2010 5:57:49 PM org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/5.5.4
> Dec 14, 2010 5:57:49 PM org.apache.catalina.core.StandardHost start
> INFO: XML validation disabled
> Dec 14, 2010 5:57:49 PM org.apache.catalina.startup.HostConfig deployWAR
> INFO: Deploying web application archive administrator.war
> log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.TldConfig).
> log4j:WARN Please initialize the log4j system properly.
>
> Aug 31, 2010 4:44:49 PM org.apache.coyote.http11.Http11Protocol start
> INFO: Starting Coyote HTTP/1.1 on http-7600
> Aug 31, 2010 4:44:49 PM org.apache.jk.common.ChannelSocket init
> INFO: JK2: ajp13 listening on /0.0.0.0:7602
>
>
>
> You may see that the com.dpadmin.config.StartUpServlet init
> is not executed.
>
> How do i solve this ?
>
> Thank you.
>
> Best Regard
> Sandy
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: StartUpServlet in web.xml is not executed

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sandy,

On 12/14/2010 9:13 AM, dfsdf fsdfsd wrote:

Please change your "name" to reflect your real name. Or a fake name if
you wish. "dfsdf fsdfsd" means you're just not trying hard enough.

> I am using Tomcat 5.5.4 under Unix Sun Solaris.

As Chuck says: upgrade.

> I have a servlet that should be executed on web.xml

I think you mean "should be initialized on startup":

>   <display-name>Apache-Axis</display-name>
>   <servlet>
>     <servlet-name>StartUp</servlet-name>      
>     <servlet-class>
>         com.dpadmin.config.StartUpServlet
>     </servlet-class>
>     <load-on-startup>1</load-on-startup>
>   </servlet>

Ok.

> But then now, this servlet is not executed. I have the same problem
> around 1 year ago, and by that time, i just
> deleted the work directory under my webapp and it works.
> 
> And now, it doenst work anymore.

Same version of Tomcat all the way through?

> INFO: Deploying web application archive administrator.war
>
> [snip]
> 
> Aug 31, 2010 4:44:47 PM com.generaladmin.modules.ModuleManager initialize
> INFO: No modules found in directory /opt/dpmaster/dp7.1.2/dpadminserver/modules
> Aug 31, 2010 4:44:47 PM com.dpadmin.config.StartUpServlet init
> INFO: No modules found in directory /opt/smarttrust/dpmaster/dp7.1.2/dpadminserver/modules
> 
> Aug 31, 2010 4:44:49 PM org.apache.coyote.http11.Http11Protocol start
>
> And now only like this :
> 
> INFO: Deploying web application archive administrator.war
>
> [snip]
> 
> Aug 31, 2010 4:44:49 PM org.apache.coyote.http11.Http11Protocol start

Maybe you actually have modules in
/opt/dpmaster/dp7.1.2/dpadminserver/modules and
/opt/smarttrust/dpmaster/dp7.1.2/dpadminserver/modules?

> You may see that the com.dpadmin.config.StartUpServlet init
> is not executed.
> 
> How do i solve this ?

You could use a debugger, memory profiler, or even jhat to check to see
if there are any com.dpadmin.config.StartUpServlet objects in memory. If
there are, then your servlet probably was initialized by Tomcat.

Why not add a log message in your servlet that says "starting up"?

Did you change your logging settings? Have you checked other logfiles in
the logs/ directory?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk0Hk+sACgkQ9CaO5/Lv0PBfRQCgnc/EhoQpxwaJ4+DyrvQ5h9al
rwMAoLfcZGuPZlijPUfKJDeUcAzG1Fzl
=NMCv
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: StartUpServlet in web.xml is not executed

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: dfsdf fsdfsd [mailto:budihartonobhw@yahoo.com] 
> Subject: StartUpServlet in web.xml is not executed 

> I am using Tomcat 5.5.4 under Unix Sun Solaris.

What happens if you try it on a version of Tomcat that isn't older than dirt (measured in Internet years)?  5.5.4 came out over six years ago...

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org