I want to deploy a war file to TomEE but fails with:
Caused by:
javax.naming.NameNotFoundException:
Name openejb/Resource/application_name/mysql_ds" not found.
If I restart the server, the deploy goes fine but only once, then the same error encounters.
I have defined datasource in WEB-INF/resources.xml file
<tomee>
<Resource id="mysql_ds" type="javax.sql.DataSource">
JdbcDriver = com.mysql.jdbc.Driver
JdbcUrl = jdbc:mysql://IP:3306/db?serverTimezone=UTC&autoReconnect=true
UserName = user
Password = password
JtaManaged = true
</Resource>
</tomee>
Also i should mention that there is another cloned application(dev mode) with same configuration and it works fine.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…