3 Replies Latest reply on Apr 7, 2004 9:44 AM by adrian.brock

    Connection to SAP using JRA/JCA

    dovb

      Hi,

      I am trying to make a connection using sap JRA, in its latest beta version.

      I have configured JBOSS XML file according to the example file in the docs directory of JBOSS:

      <connection-factories>
      <tx-connection-factory>
      <adapter-display-name>SAPJRA</adapter-display-name>
      <jndi-name>eis/SAPJRA</jndi-name>
      <config-property name="SAPClient" type="java.lang.String">801</config-property>
      <user-name>buydirect</user-name>
      bdirect
      <config-property name="Language" type="java.lang.String">P</config-property>
      <config-property name="ServerName" type="java.lang.String">170.248.72.28</config-property>
      <config-property name="SystemNumber" type="java.lang.String">00</config-property>
      <config-property name="PortNumber" type="java.lang.String">3300</config-property>
      </tx-connection-factory>
      </connection-factories>



      Although everything seems ok during JBOSS service start, when I run my EJB client I get the following exception:

      15:19:47,208 WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection:
      javax.resource.ResourceException: Couldn't create ManagedConnection. com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed
      Connect_PM GWHOST=170.248.72.28, GWSERV=sapgw33, ASHOST=170.248.72.28, SYSNR=33

      LOCATION CPIC (TCP/IP) on local host
      ERROR partner not reached (host 170.248.72.28, service 3333)

      TIME Tue Mar 30 15:19:47 2004
      RELEASE 620
      COMPONENT NI (network interface)
      VERSION 36
      RC -10
      MODULE ninti.c
      LINE 969
      DETAIL NiPConnect2
      SYSTEM CALL SO_ERROR
      ERRNO 10061
      ERRNO TEXT WSAECONNREFUSED: Connection refused
      COUNTER 3

      at com.sap.mw.jco.jra.JRA$ManagedConnectionImpl.(JRA.java:2046)

      It seems that it is trying to connect using a wrong port or system number... How do I fix this?

      Thank you
      Dov

        • 1. Re: Connection to SAP using JRA/JCA
          nort

          Try to run a simple JCO class to create a connection with yours data. If you dont know the system number of the sap, ask your admin. I mean the password is not included within the DD (or you have deleted it?)

          Juraj

          • 2. Re: Connection to SAP using JRA/JCA
            dovb

            I made some tests and discovered that instead of using

            and

            I should use:

            <config-property name="Username" type="java.lang.String"> and
            <config-property name="Password" type="java.lang.String">

            I think the example XML file in JBoss docs was wrong...

            Thanks
            Dov

            • 3. Re: Connection to SAP using JRA/JCA

              Can you post your version that works
              (with your personal information changed to generic values).
              And say which version of the RA and SAP it works with..
              I will add to the examples for others to use.

              Regards,
              Adrian