cancel
Showing results for 
Search instead for 
Did you mean: 

SAP JRA "Couldn't create ManagedConnection ..."

Former Member
0 Kudos

Hallo,

i run into trouble using JRA in an EJB, which is available as Webservice. The access to the Webservice is anonymous (Guest). I enabled alle kind of traces in Resource Adapter, but only get message: + Exception: com.sap.mw.jco.jra.JRA$ResourceException: Couldn't create ManagedConnection with . {jco.server.trace=1, jco.client.trace=1, jco.client.passwd=****, jco.client.jra_conn=true, jco.client.ashost=my.server.com, jco.client.type=A, jco.client.user=MYUSER, jco.client.sysnr=31, jco.client.client=200, jco.client.lang=DE}# +.

First of all i deployed the sapjra.jar with Server Settings -> Identity Subject -> Auth Type left blank.

Then i configured the Resource Adapter with the required settings for connection to single App. Server.

In my EJB i do:

InitialContext initialcontext;
		try {
			initialcontext = new InitialContext();
			connectionfactory =
				(ConnectionFactory) initialcontext.lookup("deployedAdapters/eis/SAPJRA_GDC/shareable/eis/SAPJRA_GDC");
			connection = connectionfactory.getConnection();
			
		} catch (Exception e) {
			loc.errorT("Exception: " + e);
		} {/code}
The ejb-jar.xml contains:

<session>

<ejb-name>Mybean</ejb-name>

...

<session-type>Stateless</session-type>

<transaction-type>Container</transaction-type>

<resource-ref>

<res-ref-name>deployedAdapters/eis/SAPJRA_GDC/shareable/eis/SAPJRA_GDC</res-ref-name>

<res-type>javax.resource.cci.ConnectionFactory</res-type>

<res-auth>Application</res-auth>

</resource-ref>

</session>{/code}

As authentication method i`d like to use the DefaultAuthentication mentioned [here|http://help.sap.com/saphelp_nw04/helpdata/en/61/1d88424466d665e10000000a155106/frameset.htm].

Any ideas what could be worng?

Regards Oliver

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Javadevs,

issue solved. Sometimes the easy things make us enjoy the life, e.g. unlock the user ;).

Additional info:

InitialContext initialcontext;
		try {
			initialcontext = new InitialContext();
			connectionfactory =
				(ConnectionFactory) initialcontext.lookup("java:comp/env//eis/SAPJRA_GDC");
			connection = connectionfactory.getConnection();
			
		} catch (Exception e) {
			loc.errorT("Exception: " + e);
		} 

and in ejb-jar.xml

<session>
<ejb-name>Mybean</ejb-name>
...
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<resource-ref>
<res-ref-name>eis/SAPJRA_GDC</res-ref-name>
<res-type>javax.resource.cci.ConnectionFactory</res-type>
<res-auth>Application</res-auth>
</resource-ref>
</session>

also works well.

Regards Oliver