From: Tom P. <to...@to...> - 2011-07-13 21:04:12
|
I am trying to install jtrac 2.1.0 on top of the Ubuntu version of Tomcat 6. In addition to running it on top of Tomcat, I would like to use MySQL as my backend database, and I would like to reference the db using a JNDI name. However, when I deploy jtrac, Tomcat can't find my data source. Here's the error that I'm getting: 2011-07-12 21:10:52,371 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] ERROR [org.hibernate.connection.DatasourceConnectionProvider] - Could not find datasource: JtracDB javax.naming.NameNotFoundException: Name JtracDB is not bound in this Context Tomcat is saying that it can't find the data source in the context, which seems odd to me, because here's the contents of my /etc/tomcat6/context.xml file: <Resource name="SomeOtherDS" ... /> <Resource name="JtracDB" auth="Container" type="javax.sql.DataSource" username="jtracdbo" driverClassName="com.mysql.jdbc.Driver" password="somepass" url="jdbc:mysql://localhost:3306/jtracdb" maxActive="100" maxIdle="30" maxWait="10000" /> What is it about jtrac's context that makes it unable to find this data source? I've tried adding and removing a "jdbc/" prefix before the data source name, but that didn't help. All data sources in this file should be accessible to every application in this Tomcat instance, right? Also, Here's my jtrac.properties file: database.username=jtracdbo database.password= hibernate.dialect=org.hibernate.dialect.MySQL5Dialect hibernate.show_sql=false database.datasource.jndiname=JtracDB Thanks in advance! Tom Purl |