How to define MySQL data source in TomEE?

前端 未结 4 1183
名媛妹妹
名媛妹妹 2020-12-20 00:11

Platform: TomEE Web profile 1.5.0.

I am trying to do a very basic thing, setup a data source for MySQL. I have read the official guide (http://openejb.apache.org/co

4条回答
  •  一向
    一向 (楼主)
    2020-12-20 01:07

    I have tracked down the root cause. The problem happens only when I start TomEE from Eclipse. If I start it from command line, my data source definition works just fine.

    It appears that when I run TomEE from command line, it uses configuration files from /.metadata/.plugins/org.eclipse.wst.server.core/tmp0/conf. To change this, I had to take these steps in Eclipse:

    1. Remove all deployed projects from the server.
    2. Open server settings and from "Server Locations" choose "Use Tomcat installation". This section is greyed out if you have at least one project still deployed to the server. So, make sure you have done step #1.
    3. Restart the server and redeploy the application. Now, my application is finding the data source.

提交回复
热议问题