Name [jdbc/mydb] is not bound in this Context

前端 未结 3 1723
情话喂你
情话喂你 2020-11-28 09:15

I see this question was raised several times already and I went through all of them. But I am still unable to fix my problem.

Could anyone help me pinpoint what I am

3条回答
  •  春和景丽
    2020-11-28 09:41

    For those who use Tomcat with Bitronix, this will fix the problem:

    The error indicates that no handler could be found for your datasource 'jdbc/mydb', so you'll need to make sure your tomcat server refers to your bitronix configuration files as needed.

    In case you're using btm-config.properties and resources.properties files to configure the datasource, specify these two JVM arguments in tomcat:

    (if you already used them, make sure your references are correct):

    • btm.root
    • bitronix.tm.configuration

    e.g.

    -Dbtm.root="C:\Program Files\Apache Software Foundation\Tomcat 7.0.59" 
    -Dbitronix.tm.configuration="C:\Program Files\Apache Software Foundation\Tomcat 7.0.59\conf\btm-config.properties" 
    

    Now, restart your server and check the log.

提交回复
热议问题