You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Wenzhou Wang <We...@Sun.COM> on 2006/04/19 01:19:40 UTC

Re: NamingException running Cactus tests

Suguri,

I get the same error when I try to run the servlet sample's bundled with 
   jakarta-catus-13-1.7.2(see the error message below). Where should I 
add the tomcat5x element ({tmocat5x.home}/conf/server.xml?)

Thanks,


--
Apr 18, 2006 3:24:37 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Apr 18, 2006 3:24:37 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 3347 ms
Apr 18, 2006 3:24:38 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Apr 18, 2006 3:24:38 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.16
Apr 18, 2006 3:24:38 PM org.apache.catalina.realm.UserDatabaseRealm start
SEVERE: Exception looking up UserDatabase under key UserDatabase
javax.naming.NamingException: Cannot create resource instance
         at 
org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceF
actory.java:142)
         at 
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:3
04)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:792)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
         at 
org.apache.catalina.realm.UserDatabaseRealm.start(UserDatabaseRealm.j
ava:253)
         at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1005)
         at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442
)
         at 
org.apache.catalina.core.StandardService.start(StandardService.java:4
50)
         at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:709
)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Apr 18, 2006 3:24:37 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Apr 18, 2006 3:24:37 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 3347 ms
Apr 18, 2006 3:24:38 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Apr 18, 2006 3:24:38 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.16
Apr 18, 2006 3:24:38 PM org.apache.catalina.realm.UserDatabaseRealm start
SEVERE: Exception looking up UserDatabase under key UserDatabase
javax.naming.NamingException: Cannot create resource instance
         at 
org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceF
actory.java:142)
         at 
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:3
04)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:792)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
         at 
org.apache.catalina.realm.UserDatabaseRealm.start(UserDatabaseRealm.j
ava:253)
         at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1005)
         at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442
)
         at 
org.apache.catalina.core.StandardService.start(StandardService.java:4
50)
         at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:709
)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
         at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Apr 18, 2006 3:24:38 PM org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start:
LifecycleException:  No UserDatabase component found under key UserDatabase
         at 
org.apache.catalina.realm.UserDatabaseRealm.start(UserDatabaseRealm.j
ava:261)
         at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1005)
         at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442
)
         at 
org.apache.catalina.core.StandardService.start(StandardService.java:4
50)
         at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:709
)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Apr 18, 2006 3:24:38 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 579 ms

Re: NamingException running Cactus tests

Posted by Wenzhou Wang <We...@Sun.COM>.
Suguri,

Thank you very much! Yes, after added serverxml argument to the tomcat5x 
element, I was able to run the tests.

Thanks again,

Wenzhou

Kazuhito SUGURI wrote:
> Hi Wenzhou,
>
> In article <44...@Sun.COM>,
> Tue, 18 Apr 2006 16:19:40 -0700,
> Wenzhou Wang <We...@Sun.COM> wrote: 
> Wenzhou> I get the same error when I try to run the servlet sample's bundled with 
> Wenzhou>    jakarta-catus-13-1.7.2(see the error message below). Where should I 
> Wenzhou> add the tomcat5x element ({tmocat5x.home}/conf/server.xml?)
>
> The tomcat5x element should be in your ant script.
> Please take a look at Ant Integration pages:
> 	http://jakarta.apache.org/cactus/integration/ant/index.html
> 	http://jakarta.apache.org/cactus/integration/ant/howto_ant_cactus.html
> 	http://jakarta.apache.org/cactus/integration/ant/task_cactus.html
>
>
> The cactus ant task (tomcat-5x) doesn't use ${tomcat5x.home}/conf/server.xml
> to start a tomcat instance as default, but does use a generated one.
> The NamingException arises because the server.xml file generated
> by cactus ant task is not suitable for Tomcat-5.x, unfortunately.
>
>
> To avoid the error, you can specify a server.xml,
> which is used by cactus ant task to start the tomcat instance,
> as a serverxml attribute of the tomcat-5x element.
>
>
> Hope this helps,
> ----
> Kazuhito SUGURI
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>
>   


Re: NamingException running Cactus tests

Posted by Kazuhito SUGURI <su...@lab.ntt.co.jp>.
Hi Wenzhou,

In article <44...@Sun.COM>,
Tue, 18 Apr 2006 16:19:40 -0700,
Wenzhou Wang <We...@Sun.COM> wrote: 
Wenzhou> I get the same error when I try to run the servlet sample's bundled with 
Wenzhou>    jakarta-catus-13-1.7.2(see the error message below). Where should I 
Wenzhou> add the tomcat5x element ({tmocat5x.home}/conf/server.xml?)

The tomcat5x element should be in your ant script.
Please take a look at Ant Integration pages:
	http://jakarta.apache.org/cactus/integration/ant/index.html
	http://jakarta.apache.org/cactus/integration/ant/howto_ant_cactus.html
	http://jakarta.apache.org/cactus/integration/ant/task_cactus.html


The cactus ant task (tomcat-5x) doesn't use ${tomcat5x.home}/conf/server.xml
to start a tomcat instance as default, but does use a generated one.
The NamingException arises because the server.xml file generated
by cactus ant task is not suitable for Tomcat-5.x, unfortunately.


To avoid the error, you can specify a server.xml,
which is used by cactus ant task to start the tomcat instance,
as a serverxml attribute of the tomcat-5x element.


Hope this helps,
----
Kazuhito SUGURI