tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zsaade <>
Subject EAR Datasource javax.naming.NameNoFoundException
Date Wed, 13 Feb 2019 08:39:41 GMT
Dear All

I have an EAR file that i'm deploying under
<apache-tomee-plume-7.1.0-home>\apps folder, I added the the below
Datasource configuration in the tomee.xml file located under

<?xml version="1.0" encoding="UTF-8"?>
	<Deployments dir="apps" />
	<Resource id="services" type="javax.sql.DataSource">
		jdbcDriver oracle.jdbc.OracleDriver
		jdbcUrl jdbc:oracle:thin:@//db-server:1521/ORA11
		userName test_server
		password test_server
		jtaManaged true
		defaultAutoCommit true

In my EJB i'm calling the datasource as per the below code:

Context initContext = new InitialContext();
DataSource ds = (DataSource) initContext.lookup("services");
this.ConnectDataSource = ds;

But When i'm starting TomeEE i'm getting the below exception:

javax.naming.NameNoFoundException: Name [services] is not bound in this
Context. Unable to find [services.]

Kindly advice

Best Regards

Sent from:

View raw message