-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: "Could not find datasource" after reinstalling on
PostPosted: Fri Feb 06, 2004 11:24 pm 
Newbie

Joined: Fri Feb 06, 2004 11:13 pm
Posts: 2
Hi,

i've got a really strange problem: my application runs fine after a fresh start of the Tomcat (5.0.18), but when I remove and re-install the application using the manager webapp of tomcat, I get this:

SEVERE: Could not find datasource: java:comp/env/jdbc/lt04jay
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:814)
at org.apache.naming.NamingContext.lookup(NamingContext.java:184)
at org.apache.naming.NamingContext.lookup(NamingContext.java:825)
at org.apache.naming.NamingContext.lookup(NamingContext.java:184)
at org.apache.naming.NamingContext.lookup(NamingContext.java:825)
at org.apache.naming.NamingContext.lookup(NamingContext.java:197)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:183)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at net.sf.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:44)
[...]

I've tried some other solutions from the forum like the declaration of the datasource in the <GlobalNamingResources> or adding a name="blah:/something/else" to the <session-factory> in hibernate.cfg.xml, but nothing works.

I even tried to use Tomcat 4.1.29: same problem.

Only a full server restart makes the app working again. ;-(

It feels really strange to me that my application runs fine until I _completely remove_ it and re-installing it from scratch while the server is running. I would think that after the removal, nothing is left of the app, even no open connections that might cause this problem...?

Any ideas?

Thanks,
Michael


Top
 Profile  
 
 Post subject: Resolved the Problem..
PostPosted: Sat Feb 07, 2004 5:08 pm 
Newbie

Joined: Fri Feb 06, 2004 11:13 pm
Posts: 2
It works, when the DataSource or a ResourceLink is specified in the META-INF/context.xml file rather than the server.xml. Seems that Tomcat does not work well with removing and re-deploying applications which context ist defined in server.xml.

Jakarta documentation sucks! This fact should go into the documentation!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.