I have following situation:
- I have a Maven war project in NetBeans 6.7
- I added Tomcat 6.0 as a server, which I use to run this project
- NetBeans itself creates context.xml file in META-INF directory, I added jdbc resources there, I am sure they are correct. The name is 'jdbc/defaultDS';
- I checked in the target directory, context.xml file is copied correctly.
- I use 'java:comp/env/jdbc/defaultDS' as JNDI location to access this data source.
- When I run this project on Tomcat (no resources in conf/context.xml) I get exception:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource': Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
I have no clue as to what is happening, any help is appreciated.