4 Replies Latest reply on Dec 22, 2008 10:00 PM by lightguard

    SAP as a JMS provider

    lightguard

      I'm trying to communicate with SAP PI via JMS. I want to subscribe to one of it's queues, but I'm running into issues. I'm running JBoss 4.2.3.GA.

      This appears to be the main exception:

      14:05:22,308 WARN [MessagingContainer] destination not found: queue/default/SAPMaterialUpdateQueue reason: javax.naming.CommunicationException: Could not obtain connection to any of these urls: sdaxipi:50204 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to retrieve stub from server sdaxipi:50204 [Root exception is java.io.EOFException]]
      


      Here's my mbean code:
      <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
       name="jboss.mq:service=JMSProviderLoader,name=RemoteSAPJMSProvider,server=sdaxipi">
       <attribute name="ProviderName">RemoteSAPJMSProvider</attribute>
       <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
       <!-- The queue connection factory -->
       <attribute name="QueueFactoryRef">UIL2XAConnectionFactory</attribute>
       <!-- The topic factory -->
       <attribute name="TopicFactoryRef">UIL2XAConnectionFactory</attribute>
       <attribute name="Properties">
       java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
       java.naming.factory.url.pkgs=org.jnp.interfaces
       java.naming.provider.url=sdaxipi:50204
       java.naming.security.principal=xxx
       java.naming.security.credentials=yyyy
       </attribute>
       </mbean>
      


      I have the 000_logging.jar, exception.jar, and sapj2eeclient.jar in the server/default/lib directory

      Ideas?

        • 1. Re: SAP as a JMS provider
          lightguard

          Oops... ignore that user name and password. Looks like I can't edit the message.

          • 2. Re: SAP as a JMS provider

            I doubt you can access the SAP jndi server using jnp?
            jnp is the jboss jndi protocol name.

            • 3. Re: SAP as a JMS provider

               

              "adrian@jboss.org" wrote:
              I doubt you can access the SAP jndi server using jnp?
              jnp is the jboss jndi protocol name.


              I also doubt SAP call their jms ConnectionFactory binding UIL2XA...
              that's the jbossmq name.

              • 4. Re: SAP as a JMS provider
                lightguard

                Thanks for the reply Adrian. No, I can't access the SAP queues or Connection factory that way, I had to use their JNDI lookups:


                <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
                 name="jboss.mq:service=JMSProviderLoader,name=RemoteSAPJMSProvider,server=sdaxipi.octanner.com">
                 <attribute name="ProviderName">RemoteSAPJMSProvider</attribute>
                 <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
                 <attribute name="QueueFactoryRef">jmsfactory/default/XAQueueConnectionFactory</attribute>
                 <attribute name="TopicFactoryRef">jmsfactory/default/XATopicConnectionFactory</attribute>
                
                 <attribute name="Properties">
                 java.naming.factory.initial=com.sap.engine.services.jndi.InitialContextFactoryImpl
                 java.naming.provider.url=sdaxipi.octanner.com:50204
                 java.naming.security.principal=xxx
                 java.naming.security.credentials=yyy
                 </attribute>
                 </mbean>


                But then it comes back with a JMSSecurityException: You do not have consume permission... The more I've dug into this over the weeks it seems like it's SAP's problem.