cancel
Showing results for 
Search instead for 
Did you mean: 

Datasource connection failing with error "Cannot open resource"

Former Member
0 Kudos

Hi All,

I have created a datsource in VA with JDBC 1.X driver type for a SQL Server.

However, now when I try to connect to the datasource from an udf in the Message Mapping, I am getting the below error:

Error: com.sap.engine.services.dbpool.exceptions.BaseSQLException: ResourceException in method ConnectionFactoryImpl.getConnection(): com.sap.engine.services.connector.exceptions.BaseResourceException: Cannot open resource(Managed Connection) with LocalTransaction support or add a second one in the same transaction, for component "webContainer/applications/sap.com/TestDB/TestDB" in application "sap.com/TestDB"

I checked the SAP Help link given below where it is mentioned as a solution that the datasource should be made shareable.

http://help.sap.com/saphelp_nw04/helpdata/en/5c/2f2c4142aef623e10000000a155106/frameset.htm

In SAP Help, it mentions that datasource can be made shareable by modifying the deployment descriptor as mentioned in the link below. However, the datasource was configured in the VA and not deployed using archive. Hence, we do not have a deployment descriptor to modify and redeploy.

http://help.sap.com/saphelp_nwce10/helpdata/en/e8/47591ac2e843d09a374e88b044bda9/frameset.htm

Could you please provide pointers on how configure and make the datasource shareable.

Thanks & Regards,

Rosie Sasidharan.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Actually shareable properties need not be specified and the interface works with both JDBC 1.X and 2.0 datasources.

The only hange is that the transaction-type should be u201CBeanu201D instead of u201CContaineru201D within the u2018ejb-jar.xmlu2019 file. This resolves the erro I was facing.

Former Member
0 Kudos

Hi Rosie ,

This information is really really helpful for me . I was trying to solve this problem from last 4 days. Today i am able to solve just because of reference given by you.

Once again thank you very much