cancel
Showing results for 
Search instead for 
Did you mean: 

Sapjra for Weblogic server

Former Member
0 Kudos

Hello,

Has anyone successfully deployed the sapjra resource adapter to Weblogic servers?

I've tried to deploy it and it doesn't seem to accept the SAPJRA after I added a weblogic-specific deployment descriptor file (weblogic-ra.xml).

Thanks

Allan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Are you trying to deploy the adapter as a part of your EAR project which contains EJBS also or is it an independent (ra only) deployment?

if its independent, then you would not need to modify the JRA archive with server specific DDs.

Former Member
0 Kudos

Hi Amol,

Thanks for your response.

I am trying deploy the RA on it's own to Weblogic 9.2 server.

I replaced the SAP DD xml with a weblogic-ra.xml DD and it deployed the RA. But I get an error when I try to call the RA from my code.

I changed the sapjra.rar file to the following structure:

-META-INF

- ra.xml

- weblogic-ra.xml

-sapjra.jar

-jrfc.jar

In case it's relevant, here are the contents of the xml descriptors:

<b>weblogic-ra.xml:</b>

<?xml version = "1.0"?>

<weblogic-connector xmlns="http://www.bea.com/ns/weblogic/90">

<outbound-resource-adapter>

<connection-definition-group>

<connection-factory-interface>javax.resource.cci.ConnectionFactory</connection-factory-interface>

<connection-instance>

<jndi-name>eis/SAPJRAFactory</jndi-name>

<connection-properties>

<properties>

<property>

<name>SAPClient</name>

<value>XXX.ca</value>

</property>

</properties>

</connection-properties>

</connection-instance>

</connection-definition-group>

</outbound-resource-adapter>

</weblogic-connector>

<b>ra.xml</b>

<?xml version="1.0" encoding="UTF-8"?>

<connector xmlns="http://java.sun.com/xml/ns/j2ee"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee

http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"; version="1.5">

<display-name>SAPJRA</display-name>

<vendor-name>Java Software</vendor-name>

<eis-type>R/3</eis-type>

<resourceadapter-version>1.0</resourceadapter-version>

<resourceadapter>

<outbound-resourceadapter>

<connection-definition>

<managedconnectionfactory-class>com.sap.mw.jco.jra.JRA$ManagedConnectionFactoryImpl</managedconnectionfactory-class>

<config-property>

<description>Client, i.e. 001</description>

<config-property-name>SAPClient</config-property-name>

<config-property-type>java.lang.String</config-property-type>

<config-property-value></config-property-value>

</config-property>

<connectionfactory-interface>javax.resource.cci.ConnectionFactory</connectionfactory-interface>

<connectionfactory-impl-class>com.sap.mw.jco.jra.JRA$ConnectionFactoryImpl</connectionfactory-impl-class>

<connection-interface>javax.resource.cci.Connection</connection-interface>

<connection-impl-class>com.sap.mw.jco.jra.JRA$ConnectionImpl</connection-impl-class>

</connection-definition>

<transaction-support>LocalTransaction</transaction-support>

<authentication-mechanism>

<authentication-mechanism-type>BasicPassword</authentication-mechanism-type>

<credential-interface>javax.resource.spi.security.PasswordCredential</credential-interface>

</authentication-mechanism>

<authentication-mechanism>

<authentication-mechanism-type>Kerbv5</authentication-mechanism-type>

<credential-interface>javax.resource.spi.security.GenericCredential</credential-interface>

</authentication-mechanism>

<reauthentication-support>false</reauthentication-support>

</outbound-resourceadapter>

</resourceadapter>

</connector>

I can deploy the RA to WLS without any errors. Thus, my code can even see the RA thru JNDI. However, the moment I tried to connect with connectionFactory.getConnection(), I get an exception:

javax.ejb.EJBException: EJB Exception: : java.lang.NoClassDefFoundError

at com.sap.mw.jco.MiddlewareJRfc$Client.connect(MiddlewareJRfc.java:882)

at com.sap.mw.jco.JCO$Client.connect(JCO.java:3159)

The classes it's complaining about are in the jrfc.jar which i have included in my .rar file. Without jrfc.jar, the RA won't deploy. So question is: is there somewhere I need to place this jrfc.jar (or possibly sapjco.jar) other than within the .rar file?

Thanks for your help,

Allan

Former Member
0 Kudos

Allan,

Your lookup code works fine and deployment goes thro' is one good thing and proves that you dont have a setup issue right?

I guess you should try putting jrfc.jar as a part of your EJB client calling code archive as you can see that you are getting an exception of not being able to find the class at runtime...what do you think?

Rgds,

Amol

Former Member
0 Kudos

Hi Amol,

I have some more information about my problem..

When debugging this line of my code:

connectionFactory = (ConnectionFactory) initialcontext.lookup( conn_Factory_Name);

I see that the <b>m_connection_manager</b> property has the correct values set however <b>m_record_factory</b> and <b>m_repository parameters</b> are null.

Within my ra.xml file, I noticed that there's not mention of JRA$RecordFactoryImpl class. Could this be relevant? Is there some reason why the RA is picking up the JRA$ConnectionFactory classes but not the RecordFactory and Repository Classes?

Any insight would be most helpful.

Allan

Answers (1)

Answers (1)

Former Member
0 Kudos

Amol,

I added the jrfc.jar as part of my EJB client and it didn't seem to work. So I have a feeling it's the actual RA that is the problem - or at least its compatibility with Weblogic.

The server gives out this msg when I call the RA:

<Connector> <BEA-190032> << eis/sap/SAPJRAFactoryJNDILocal > ResourceAllocationException thrown by resource adapter on call to ManagedConnectionFactory.createManagedConnection(): "javax.resource.spi.ResourceAdapterInternalException: Failed to create managed connection: java.lang.NoClassDefFoundError ">

This suggests to me that the RA itself is looking for some classes (no idea which ones) and can't find them, even though the jrfc.jar is packaged within the RA itself. Doesn't make sense.

Allan