cancel
Showing results for 
Search instead for 
Did you mean: 

JCO and JRA under JBoss

Former Member
0 Kudos

Hi,

I'm using Eclipse 3.2 and JBoss 4.0.4.GA and I want to deploy wars on my JBoss that have to connect to one of our SAP servers (kernel 640 138, hot-pack base 620 56, abap 620 56, appli 470 25 and IS-U 472 10 (and some others hot packages).

I deployed the <b>sapr3-service.xml</b> in the ...\jboss\server\default\conf directory.

[code]<?xml version="1.0" encoding="iso-8859-1"?>

<server>

<!-- ==================================================================== -->

<!-- Example ConnectionFactoryLoader for SAP R/3 connector -->

<!-- Put sap.rar in deploy also. This rar should contain jars -->

<!-- ra.jar and jCO.jar. The native libraries need to be moved by hand -->

<!-- to your PATH. -->

<!-- Author: David Jencks d_jencks@users.sourceforge.net -->

<!-- Author: Paul McLachlan paulm@yambay.com -->

<!-- ==================================================================== -->

<mbean code="org.jboss.resource.ConnectionFactoryLoader"

name="JCA:service=ConnectionFactoryLoader,name=SAPConnectorFactory">

<attribute name="ManagedConnectionFactoryProperties">

server-name=xxx.xxx.xxx.xxx

system-name=W01

system-number=00

UserName=UNAME

password=PWD

Language=FR

</attribute>

<attribute name="JndiName">eis/SAPJRA</attribute>

<attribute name="TransactionManagerName">java:/TransactionManager</attribute>

<mbean-ref name="ResourceAdapterName">JCA:service=RARDeployment,name=SAP ConnectorFactory</mbean-ref>

<mbean-ref name="ConnectionManagerFactoryLoaderName">JCA:service=ConnectionManagerFactoryLoader,name=MinervaSharedLocalCMFactory</mbean-ref>

<attribute name="ConnectionManagerProperties">#

BlockingTimeoutMillis=500000

IdleTimeoutMinutes=30

MaxSize=10

CleanupIntervalMinutes=30

MinSize=0

MaxIdleTimeoutPercent=1.0

</attribute>

<attribute name="PrincipalMappingClass">

org.jboss.resource.security.ManyToOnePrincipalMapping

</attribute>

<attribute name="PrincipalMappingProperties">

UserName=UNAME

password=PWD

</attribute>

</mbean>

</server>

[/code]

I deployed the <b>sapjco.jar</b> (version 2.1.7) and the <b>sapjcorfc.dll</b> (same version) in the ...\jboss\server\default\deploy directory

Also I copy the sapjra.rar founded in a WAS 640. It includes a sapjra.jar and a META-INF directory which contains 2 xml files and a manifest.mf. I didn't modify the <b>connector-j2ee-engine.xml</b> file as you can see

[code]

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

<connector-j2ee-engine>

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

<authentication-type>caller impersonation</authentication-type>

<loader-references>

<loader-name>library:com.sap.mw.jco</loader-name>

</loader-references>

</connector-j2ee-engine>

[/code]

but I gave some values to the properties in the <b>ra.xml</b>, like this

[code]

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

<!DOCTYPE connector PUBLIC '-//Sun Microsystems, Inc.//DTD Connector 1.0//EN' 'http://java.sun.com/dtd/connector_1_0.dtd'>

<connector>

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

<description>J2EE Connector Architecture 1.0 based... and a very long description...</description>

<vendor-name>SAP</vendor-name>

<spec-version>1.0</spec-version>

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

<version>6.45.2</version>

<resourceadapter>

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

<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>

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

<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>101</config-property-value>

</config-property>

<config-property>

<config-property-name>UserName</config-property-name>

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

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

</config-property>

<config-property>

<config-property-name>Password</config-property-name>

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

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

</config-property>

<config-property>

<description>I.e. DE or EN</description>

<config-property-name>Language</config-property-name>

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

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

</config-property>

<config-property>

<description>SAP Applicatino Server, i.e. us7400</description>

<config-property-name>ServerName</config-property-name>

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

<config-property-value>xxx.xxx.xxx.xxx</config-property-value>

</config-property>

<config-property>

<description>System number, i.e. 01</description>

<config-property-name>PortNumber</config-property-name>

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

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

</config-property>

<!--config-property>

<description>Setting on false turns off automatic commit for non-transactional calls that improves performance for reading accesses on DB. On default is true</description>

<config-property-name>AutoCommit</config-property-name>

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

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

</config-property-->

<authentication-mechanism>

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

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

</authentication-mechanism>

<!-- used on WEBAS 630 for SAP Logon Tickets -->

<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>

</resourceadapter>

</connector>

[/code]

and I finally created the file <b>sapr3-ds.xml</b> located in the ...\jboss\server\default\deploy directory

[code]

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

<connection-factories>

<tx-connection-factory>

<adapter-display-name>SAPConnectorFactory</adapter-display-name>

<jndi-name>eis/SAPJRA</jndi-name>

<rar-name>sapjra.rar</rar-name>

<connection-definition>javax.resource.cci.ConnectionFactory</connection-definition>

<config-property name="SAPClient" type="java.lang.String">101</config-property>

<user-name>UNAME</user-name>

<password>PWD</password>

<config-property name="Language" type="java.lang.String">FR</config-property>

<config-property name="ServerName" type="java.lang.String">xxx.xxx.xxx.xxx</config-property>

<config-property name="SystemNumber" type="java.lang.String">00</config-property>

<config-property name="PortNumber" type="java.lang.String">99</config-property>

</tx-connection-factory>

</connection-factories>

[/code]

I don't understand why I have to give 3 times the logon (in the sapr3-service.xml, the ra.xml and the sapr3-ds.xml) and I'm confused to understand the difference between the SystemNumber and the PortNumber, as the SystemNumber is sometimes described as being a port number...

But my problem in booting my JBoss server is this one

[code]

[ServiceController] Problem starting service jboss.jca:service=ManagedConnectionFactory,name=eis/SAPJRA

java.lang.ExceptionInInitializerError

at com.sap.mw.jco.jra.JRA$ManagedConnectionFactoryImpl.createPrintWriter(JRA.java:1302)

at com.sap.mw.jco.jra.JRA$ManagedConnectionFactoryImpl.<init>(JRA.java:1140)

[/code]

and many lines later

[code]

Could not initialize SAP Java Resource Adapter Library. Found SAP Java Connector version 2.1.7 but version 6.30.1 or higher is required.

at com.sap.mw.jco.jra.JRA.<clinit>(JRA.java:218)

[/code]

I already founded a post in this forum (url ) that says

Remember The JRA implements the JCA 1.0 specification but The JRA is NOT an implementation of the JCA 1.0 specification as it is not portable / plugable into any J2EE 1.xx compliant environment! Thanks SAP.

Does it mean that we can't deploy the sapjra on a JBoss server ?

Can you tell me what I can do to solve this problem. Thanks in advance.

Jean-Michel

Accepted Solutions (0)

Answers (1)

Answers (1)

eugen_pritzkau
Explorer
0 Kudos

Hi Jean,

the JRA is supported only within SAP Web AS. So, we cannot provide support for using it within JBoss.

The error

Could not initialize SAP Java Resource Adapter Library. Found SAP Java Connector version 2.1.7 but version 6.30.1 or higher is required.

at com.sap.mw.jco.jra.JRA.<clinit>(JRA.java:218)

means, that you use in JBoss the standalone JCO. But JRA needs the JCO provided withing SAP Web AS.

regards,

Eugen