Hi Thomas

Could you clealry explain how the problem got  resolved for this issue.Iam
running acorss the same errors in tomcat.Please help

thomas2004 wrote:
> 
> Hi all,
> 
> I used to set the global data resource in <GlobalNamingResources/> in
> Tomcat 5 as follow:
> 
>               <Resource auth="Container" 
> driverClassName="oracle.jdbc.OracleDriver"
>                       maxActive="20" maxIdle="10" maxWait="-1" 
> name="jdbc/MyDataSource"
>                       password="mypwd" type="javax.sql.DataSource"
>                       url="jdbc:oracle:thin:@hostname:1521:MT"
>                       username="sa" />
> 
> 
> Since I use the Tomcat6, I got problem.
> 
> I read from internet that one has to add the following code in
> /conf/context.xml, 
> 
>       <ResourceLink name="jdbc/MyDataSource" global="jdbc/MyDataSource"
>               type="javax.sql.DataSource" />
> 
> but it doesn't help and I got excpetion:
> 
> SCHWERWIEGEND: Exception looking up UserDatabase under key UserDatabase
> javax.naming.NameNotFoundException: Name UserDatabase is not bound in this
> Context
>       at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
>       at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
>       at
> org.apache.catalina.realm.UserDatabaseRealm.start(UserDatabaseRealm.java:253)
>       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1037)
>       at 
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
>       at
> org.apache.catalina.core.StandardService.start(StandardService.java:516)
>       at 
> org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
>       at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:597)
>       at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
>       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> 16.02.2009 14:07:34 org.apache.catalina.startup.Catalina start
> SCHWERWIEGEND: Catalina.start: 
> LifecycleException:  No UserDatabase component found under key
> UserDatabase
>       at
> org.apache.catalina.realm.UserDatabaseRealm.start(UserDatabaseRealm.java:261)
>       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1037)
>       at 
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
>       at
> org.apache.catalina.core.StandardService.start(StandardService.java:516)
>       at 
> org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
>       at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:597)
>       at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
>       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> 16.02.2009 14:07:34 org.apache.catalina.startup.Catalina start
> ...
> 
> I have to move the <Resource/> into the <Context/>, so it works. But in
> this way, the dataresource is not global resource anymore.
> 
> Has someone idea?
> 

-- 
View this message in context: 
http://old.nabble.com/Problem-by-setting-%3CResources-%3E-in-%3CGlobalNamingResources-%3E-from-Tomcat-6-tp22037058p30797679.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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

Reply via email to