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

前端 未结 3 1707
情话喂你
情话喂你 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.

    0 讨论(0)
  • 2020-11-28 09:48

    You need a ResourceLink in your META-INF/context.xml file to make the global resource available to the web application.

     <ResourceLink name="jdbc/mydb"
                 global="jdbc/mydb"
                  type="javax.sql.DataSource" />
    
    0 讨论(0)
  • 2020-11-28 09:58

    you put resource-ref in the description tag in web.xml

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