cancel
Showing results for 
Search instead for 
Did you mean: 

CMP EJB deployment problem

david_fryda2
Participant
0 Kudos

Hi,

I created a simple CMP bean.

I get the following exception when deploying the EAR file :

Reason: it has hard reference to resource CAR_RENTAL_POOL with type javax.sql.DataSource, which is not active on the server.

What is the Data Source Name that is required in the persistent.xml ?

How can I solve the problem ?

Thanks a lot.

Regards.

Accepted Solutions (1)

Accepted Solutions (1)

Jeff-Gebo
Advisor
Advisor
0 Kudos

Hi David,

on your Enterprise Application project, right click on the root project node and select New > META-INF/data-source-alias.xml, set the alias value to CAR_RENTAL_POOL...rebuild the EAR and deploy...this should solve your problem.

This will connect the dataSource Alias to the default datasouce of your J2EE Engine where the tables you are trying to read/update from are at.

Now if you are trying to connect to an external database somewhere in your landscape then this will not fix things, but I suspect you are connecting to the local J2EE Engine's DB.

Cheers,

Jeff

david_fryda2
Participant
0 Kudos

Hi Jeff,

I did what you wrote in your last post.

Yes, I am trying to connect to the local J2EE Engine's DB.

I still get an exception while trying to deploy the ear file:

java.rmi.RemoteException: Only Administrators have the right to perform this operation

Thanks for the help.

Regards.

Message was edited by:

David Fryda

Vlado
Advisor
Advisor
0 Kudos

Hi David,

See the end of long thread.

HTH!

-Vladimir

david_fryda2
Participant
0 Kudos

Thanks guys for the help!

Regards.

David

Answers (0)