cancel
Showing results for 
Search instead for 
Did you mean: 

com.sap.mw.jco.jra.JRA$ResourceException: Couldn't create ManagedConnection

Former Member
0 Kudos

Hi Forum,

I am running on SP14.

My J2EE application is throwing an error when calling a JRA container-managed factory connection to SAP with a SAP Login Ticket (Kerbv5).

I am getting the following error in the default trace file:

com.sap.mw.jco.jra.JRA$ResourceException: Couldn't create ManagedConnection with . {jco.client.passwd=****, jco.client.lang=EN, jco.client.sysnr=02, jco.client.client=305, jco.client.ashost=saphr.company.com, jco.client.user=AB1234, jco.client.type=A, jco.client.jra_conn=true}

Notice how the userid is known from the SAP Login Ticket being passed. That part is good.

What could be causing this error returned from the JRA/JCO Factory?

I am able to successfully connect to this same SAP system using an application-managed connection, where userid and password are supplied.

Thanks,

Kevin

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Upon further analysis of the problem, I see the following pattern. Only <b>one userid</b> can successfully use the JRA/JCO resource adapter, connecting to SAP with an SAP Login Ticket. Further, that single userid can connect multiple times on individual browser. However, if I try to connect thru that JRA factory pool as a different userid, I get the JRA$ResourceException. I've set the connection pool settings to high numbers, with no effect.

What good is a pool if only one userid can swim in it? Is this restriction occuring as a result of the type of SSO being conducted? I exported an X509cert from my J2EE engine and loaded it to the SAP backend system.

Thanks for any help.

Kevin

When creating the

Former Member
0 Kudos

Hi Kevin,

I have deployed an ear file using the J2Ee Visual admin and trying to access the application using an URL. Then I am getting the following error:-

com.sap.mw.jco.jra.JRA$ResourceException: Couldn't create ManagedConnection with . {jco.client.passwd=****, jco.client.lang=EN, jco.client.sysnr=04, jco.client.client=590, jco.client.ashost=saphr2.sbctest.com, jco.client.user=edify, jco.client.type=A, jco.client.jra_conn=true}

This is same as the one you are getting. Can you please let me know how you have overcome this error? Also, I want to say you that, when I deployed the ear file, no entry is creted under webservices -> container. I think that is the problem.. But please reply me if you have a solution..It's very urgent..Thank you very much

Former Member
0 Kudos

Well let's have a look at this. If you want to use the JCO adapter and SSL you need a cert for each user that wants to connect.

Now looking at the way a resource adapter is supposed to work: All users authenticate on the front end system... The resource adapter creates a pool of resources linked to a SINGLE user id and all users use this as a proxy user ID see setup using JAAS.

So what we have here I believe is a design disconnect.

Enjoy

Former Member
0 Kudos

I'm not understanding. Are you saying that I cannot use a JRA resource adapter to connect as the logged-in user? I don't see how I can hardcode a SINGLE user id. Using a single userid for all connections would only be useful to me if I needed to connect and run RFCs as power user id. I need to connect and run my RFC as the logged-in user.

How will my JAVA application (running on the portal J2EE engine) use JRA to connect to SAP as the user authenticated via the portal?

Thank you for any help you could provide!

Kevin

Former Member
0 Kudos

Hi,

Hope that the following code snippet helps in solving your problem. i am passing the username and password for connection to backend system using JRA in the following code.


InitialContext initialcontext = new InitialContext();
connectionFactory = (ConnectionFactory) initialcontext.lookup("deployedAdapters/eis/SAPJRAFactory/shareable/eis/SAPJRAFactory");

ConnectionSpec connSpec = null;
ConnectionSpecFactory connSpecFactory = null;
connSpecFactory = (ConnectionSpecFactory) initialcontext.lookup("ConnectionSpecFactory");
									
connSpec = connSpecFactory.createConnectionSpec(	clientNo, Username, Password, "EN");

connection = connectionFactory.getConnection(connSpec);		
interaction = connection.createInteraction();

Thanks,

S-B