You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Kalpana HV <te...@gmail.com> on 2006/05/16 14:32:47 UTC

Problem with starting tomcat

Hi People,

I am new to Java/Webserver. I have installed JDK1.4.0 and have copied
jakarta-tomcat-4.1.31 to my system(Win 2K). I have set JAVA_HOME &
CATALINA_HOME environment variables and ran the startup script. I am getting
the following exception:


May 16, 2006 6:09:44 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Starting service Tomcat-Standalone
Apache Tomcat/4.1.31
May 16, 2006 6:09:46 PM org.apache.commons.digester.Digester endElement
SEVERE: End event threw exception
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.
java:61)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAcces
sorImpl.java(Compiled Code))
        at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
        at org.apache.commons.beanutils.MethodUtils.invokeMethod(
MethodUtils.jav
a:252)
        at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
        at org.apache.commons.digester.Rule.end(Rule.java:276)
        at org.apache.commons.digester.Digester.endElement(Digester.java
:1058)
        at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source
)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(
Unknown Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.commons.digester.Digester.parse(Digester.java:1567)
        at org.apache.catalina.core.StandardHostDeployer.install
(StandardHostDep
loyer.java:338)
        at org.apache.catalina.core.StandardHost.install(StandardHost.java
:772)
        at org.apache.catalina.startup.HostConfig.deployDescriptors(
HostConfig.j
ava:395)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java
:352
)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:671)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(
HostConfig.java
:311)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent
(Lifecycl
eSupport.java:119)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java
:1149)

        at org.apache.catalina.core.StandardHost.start(StandardHost.java
:707)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java
:1141)

        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java
:316
)
        at org.apache.catalina.core.StandardService.start(
StandardService.java:4
50)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java
:214
3)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:463)
        at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)
        at org.apache.catalina.startup.Catalina.process(Catalina.java:129)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.
java:61)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAcces
sorImpl.java:40)
        at java.lang.reflect.Method.invoke(Method.java:335)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)
Caused by: java.lang.IllegalStateException: ContainerBase.addChild: start:
Lifec
ycleException:  Context startup failed due to previous errors
        at org.apache.catalina.core.ContainerBase.addChildInternal
(ContainerBase
.java:777)
        at org.apache.catalina.core.ContainerBase.addChild(
ContainerBase.java:76
0)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java
:548)

        at org.apache.catalina.core.StandardHostDeployer.addChild
(StandardHostDe
ployer.java:653)
        ... 38 more
May 16, 2006 6:09:47 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
May 16, 2006 6:09:47 PM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
May 16, 2006 6:09:47 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/62  config=E:\DownloadDirector\jakarta-
tomcat-4.1.3
1\jakarta-tomcat-4.1.31\conf\jk2.properties

I am getting this error from yesterday but could not fix it. Please, could
any one help. I have attached the log file also.

Thanks in Advance,

tech

Re: Problem with starting tomcat

Posted by Mark Petrovic <ms...@gmail.com>.
It looks like there may be a problem with your admin.xml file, but I'm not
sure.  Maybe you can post it.

On 5/16/06, Kalpana HV <te...@gmail.com> wrote:
>
> Hi People,
>
> I am new to Java/Webserver. I have installed JDK1.4.0 and have copied
> jakarta-tomcat-4.1.31 to my system(Win 2K). I have set JAVA_HOME &
> CATALINA_HOME environment variables and ran the startup script. I am getting
> the following exception:
>
>
> May 16, 2006 6:09:44 PM org.apache.coyote.http11.Http11Protocol init
> INFO: Initializing Coyote HTTP/1.1 on http-8080
> Starting service Tomcat-Standalone
> Apache Tomcat/4.1.31
> May 16, 2006 6:09:46 PM org.apache.commons.digester.Digester endElement
> SEVERE: End event threw exception
> java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:61)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAcces
> sorImpl.java(Compiled Code))
>         at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
>         at org.apache.commons.beanutils.MethodUtils.invokeMethod(
> MethodUtils.jav
> a:252)
>         at org.apache.commons.digester.SetNextRule.end(SetNextRule.java
> :256)
>         at org.apache.commons.digester.Rule.end (Rule.java:276)
>         at org.apache.commons.digester.Digester.endElement(Digester.java
> :1058)
>         at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
> Source
> )
>         at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement (
> Unknown Source)
>         at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
> Dispatcher.dispatch(Unknown Source)
>         at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument (Un
> known Source)
>         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
> Source)
>         at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
> Source)
>         at org.apache.xerces.parsers.XMLParser.parse (Unknown Source)
>         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
> Source)
>         at org.apache.commons.digester.Digester.parse(Digester.java:1567)
>         at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDep
> loyer.java:338)
>         at org.apache.catalina.core.StandardHost.install(StandardHost.java
> :772)
>         at org.apache.catalina.startup.HostConfig.deployDescriptors(
> HostConfig.j
> ava:395)
>         at org.apache.catalina.startup.HostConfig.deployApps(
> HostConfig.java:352
> )
>         at org.apache.catalina.startup.HostConfig.start(HostConfig.java
> :671)
>         at org.apache.catalina.startup.HostConfig.lifecycleEvent (
> HostConfig.java
> :311)
>         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent
> (Lifecycl
> eSupport.java:119)
>         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java
> :1149)
>
>         at org.apache.catalina.core.StandardHost.start(StandardHost.java
> :707)
>         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java
> :1141)
>
>         at org.apache.catalina.core.StandardEngine.start(
> StandardEngine.java:316
> )
>         at org.apache.catalina.core.StandardService.start(
> StandardService.java:4
> 50)
>         at org.apache.catalina.core.StandardServer.start (
> StandardServer.java:214
> 3)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:463)
>         at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)
>         at org.apache.catalina.startup.Catalina.process (Catalina.java
> :129)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.
> java:61)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:40)
>         at java.lang.reflect.Method.invoke(Method.java:335)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)
> Caused by: java.lang.IllegalStateException : ContainerBase.addChild:
> start: Lifec
> ycleException:  Context startup failed due to previous errors
>         at org.apache.catalina.core.ContainerBase.addChildInternal
> (ContainerBase
> .java:777)
>         at org.apache.catalina.core.ContainerBase.addChild (
> ContainerBase.java:76
> 0)
>         at org.apache.catalina.core.StandardHost.addChild(
> StandardHost.java:548)
>
>         at org.apache.catalina.core.StandardHostDeployer.addChild
> (StandardHostDe
> ployer.java:653)
>         ... 38 more
> May 16, 2006 6:09:47 PM org.apache.coyote.http11.Http11Protocol start
> INFO: Starting Coyote HTTP/1.1 on http-8080
> May 16, 2006 6:09:47 PM org.apache.jk.common.ChannelSocket init
> INFO: JK2: ajp13 listening on /0.0.0.0:8009
> May 16, 2006 6:09:47 PM org.apache.jk.server.JkMain start
> INFO: Jk running ID=0 time=0/62  config=E:\DownloadDirector\jakarta-
> tomcat-4.1.3
> 1\jakarta-tomcat-4.1.31\conf\jk2.properties
>
> I am getting this error from yesterday but could not fix it. Please, could
> any one help. I have attached the log file also.
>
> Thanks in Advance,
>
> tech
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>


-- 
Mark
AE6RT

Re: JK Connector not distinguishing between Virtual hosts

Posted by Bill Barker <wb...@wilshire.com>.
"Naren Koka" <na...@indidge.com> wrote in message 
news:7.0.1.0.0.20060516054359.02304800@indidge.com...
>I am using mod_jk with Tomcat 5 and Apache 2.2. JK is directing to the 
>default Host in Tomcat Server. It is not able to distinguish the sites. 
>When we go to abc2.com, it shows half the content from abc1.com, which has 
>a lot of files with the same name as abc2.com. Is this a known bug? Anybody 
>has seen it?
>
> Ealier, I was using WebApp connector for Name Based Virtual Hosting on my 
> Apache server. Everything was working fine.  Here is the httpd.conf when 
> using WebApp.
>
> LoadModule webapp_module modules/mod_webapp.so
> WebAppConnection        conn    warp    localhost:8008
>
> NameVirtualHost 192.168.1.201
>
> <VirtualHost 192.168.1.201>
>     ServerName "www.abc.com:80"
>     ServerAdmin "abc@abc.com"
>     DocumentRoot "/var/abc"
>     ErrorLog "/var/abc/logs/errorlog"
>     WebAppDeploy . conn /
> </VirtualHost>
>
> <VirtualHost 192.168.1.201>
>     ServerName "www.abc2.com:80"
>     ServerAdmin "abc@abc2.com"
>     DocumentRoot "/var/abc2"
>     ErrorLog "/var/abc2/logs/errorlog"
>     WebAppDeploy . conn /
> </VirtualHost>
>
> When I tried to upgrade to Tomcat 5, I found out that WebApp is deprecated 
> and we should be using the JK connector. I changed the httpd.conf to:
>

It's not deprecated in Tomcat 5:  It doesn't work at all ;-).

> LoadModule jk_module modules/mod_jk.so
> JkWorkersFile conf/workers.properties
>
> NameVirtualHost 192.168.1.201
>
> <VirtualHost 192.168.1.201>
>     ServerName "www.abc.com:80"
>     ServerAdmin "abc@abc.com"
>     DocumentRoot "/var/abc"
>     ErrorLog "/var/abc/logs/errorlog"
>     JkMount /*.jsp worker1
>     JkMount /*.do worker1
> </VirtualHost>
>
> <VirtualHost 192.168.1.201>
>     ServerName "www.abc2.com:80"
>     ServerAdmin "abc@abc2.com"
>     DocumentRoot "/var/abc2"
>     ErrorLog "/var/abc2/logs/errorlog"
>     JkMount /*.jsp worker2
>     JkMount /*.do worker2
> </VirtualHost>
>

You don't mention what your setting is for 'UseCanonicalName'.  If it is 
'on', then your ServerNames don't match the Host names in your Tomcat 
configuration.

>
> Here is my Tomcat configuration
>
> <Server>
>   <Service>
>     <Engine>
>       <Host name="abc.com" debug="0" appBase="/var/abc" 
> unpackWARs="false">
>                 <Context path="" docBase="/var/abc" />
>       </Host>
>
>       <Host name="abc2.com" debug="0" appBase="/var/abc2" 
> unpackWARs="false">
>                 <Context path="" docBase="/var/abc2" />
>       </Host>
>     </Engine>
>   </Service>
> </Server>
>
> I had to change the servlets to be named as .do and then add the JKMount 
> statement, otherwise the servlets were not executing.
>
> Any help is appreciated.
>
> Thanks,
> Naren 




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


JK Connector not distinguishing between Virtual hosts

Posted by Naren Koka <na...@indidge.com>.
I am using mod_jk with Tomcat 5 and Apache 2.2. JK is directing to 
the default Host in Tomcat Server. It is not able to distinguish the 
sites. When we go to abc2.com, it shows half the content from 
abc1.com, which has a lot of files with the same name as abc2.com. Is 
this a known bug? Anybody has seen it?

Ealier, I was using WebApp connector for Name Based Virtual Hosting 
on my Apache server. Everything was working fine.  Here is the 
httpd.conf when using WebApp.

LoadModule webapp_module modules/mod_webapp.so
WebAppConnection        conn    warp    localhost:8008

NameVirtualHost 192.168.1.201

<VirtualHost 192.168.1.201>
     ServerName "www.abc.com:80"
     ServerAdmin "abc@abc.com"
     DocumentRoot "/var/abc"
     ErrorLog "/var/abc/logs/errorlog"
     WebAppDeploy . conn /
</VirtualHost>

<VirtualHost 192.168.1.201>
     ServerName "www.abc2.com:80"
     ServerAdmin "abc@abc2.com"
     DocumentRoot "/var/abc2"
     ErrorLog "/var/abc2/logs/errorlog"
     WebAppDeploy . conn /
</VirtualHost>

When I tried to upgrade to Tomcat 5, I found out that WebApp is 
deprecated and we should be using the JK connector. I changed the 
httpd.conf to:

LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties

NameVirtualHost 192.168.1.201

<VirtualHost 192.168.1.201>
     ServerName "www.abc.com:80"
     ServerAdmin "abc@abc.com"
     DocumentRoot "/var/abc"
     ErrorLog "/var/abc/logs/errorlog"
     JkMount /*.jsp worker1
     JkMount /*.do worker1
</VirtualHost>

<VirtualHost 192.168.1.201>
     ServerName "www.abc2.com:80"
     ServerAdmin "abc@abc2.com"
     DocumentRoot "/var/abc2"
     ErrorLog "/var/abc2/logs/errorlog"
     JkMount /*.jsp worker2
     JkMount /*.do worker2
</VirtualHost>


Here is my Tomcat configuration

<Server>
   <Service>
     <Engine>
       <Host name="abc.com" debug="0" appBase="/var/abc" unpackWARs="false">
                 <Context path="" docBase="/var/abc" />
       </Host>

       <Host name="abc2.com" debug="0" appBase="/var/abc2" unpackWARs="false">
                 <Context path="" docBase="/var/abc2" />
       </Host>
     </Engine>
   </Service>
</Server>

I had to change the servlets to be named as .do and then add the 
JKMount statement, otherwise the servlets were not executing.

Any help is appreciated.

Thanks,
Naren



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