Jetty Data Source, Hibernate, datasource not found

前端 未结 1 882
心在旅途
心在旅途 2021-01-16 03:44

I\'m attempting to configure a data source in Jetty 7.4. I was able to do this successfully with my webapp in a Tomcat context.xml.

Here\'s what I have in the jetty

相关标签:
1条回答
  • 2021-01-16 04:09

    Yep, that's a bizzarerry of some application servers. Some need the "java:comp/env" prependded to the JNDI resource name, some do not. I think Spring has even an option for enabling/disabling that prefix when you declare a JNDI resource bean (like a datasource).

    Try:

    <property name="connection.datasource">jdbc/myDB</property>
    

    in your Hibernate config.

    0 讨论(0)
提交回复
热议问题