10 Replies Latest reply on Apr 17, 2003 3:08 AM by gdaswani

    Trouble deploying SAP-RA

    FM Newbie


      i tried to deploy the sap resource adapter which i downloaded from the sap site (version 1.0.5 Beta with JCo 2.0.8). I placed 'sapjra.rar' in my deploy folder and added the sapr3-service.xml from the docs\examples directory of my jboss-3.0.5_tomcat-4.1.18. starting the server gives the following output:


      10:59:03,428 INFO [MainDeployer] Starting deployment of package: file:/C:/java/
      10:59:03,506 WARN [MainDeployer] The manifest entry in file:/C:/java/jboss-3.0.
      ar-contents/sapjra.jar references URL file:/C:/java/jboss-3.0.5_tomcat-4.1.18/se
      .jar which could not be opened, entry ignored
      10:59:03,522 INFO [MainDeployer] Deployed package: file:/C:/java/jboss-3.0.5_to


      10:59:22,819 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean ope
      ration 'checkIncompleteDeployments()'
      Cause: Incomplete Deployment listing:
      Packages waiting for a deployer:

      Incompletely deployed packages:

      MBeans waiting for classes:

      MBeans waiting for other MBeans:
      [ObjectName: jboss.jca:service=XaTxCM,name=SAPConnectorFactory
      state: CONFIGURED
      I Depend On: jboss.jca:service=RARDeployer

      Depends On Me: , ObjectName: jboss.jca:service=XaTxDS,name=SAPConnectorFactory
      state: CONFIGURED
      I Depend On: jboss.jca:service=RARDeployment,name=SAPConnectorFactory

      Depends On Me: jboss.jca:service=XaTxCM,name=SAPConnectorFactory
      10:59:22,897 INFO [URLDeploymentScanner] Started
      10:59:22,897 INFO [MainDeployer] Deployed package: file:/C:/java/jboss-3.0.5_to
      10:59:22,897 INFO [Server] JBoss (MX MicroKernel) [3.0.5 (CVSTag=JBoss_3_0_5 Da
      te=200301130206)] Started in 0m:43s:578ms

      has anybody any hint?


        • 1. Re: Trouble deploying SAP-RA
          FM Newbie

          I've got two replies (e-mail notification) but they are not listed in the thread - I suppose they got lost. So I post them again.

          ----------[David Jencks]
          1. It looks like you may need to deploy the jco.jar somewhere explicitly, but that is not causing the problem you show.

          2. Look in the jmx-console for each mbean in the "I depend on" list and see if it is there and what it's state (configured, created, started, etc) is. If one is missing, try to figure out why. There might be a slight name difference also, so check very carefully for an exact match. Also make sure there are no extra spaces after the "OldRarDepeloyment object name" it should look like
          <depends ....>jboss.jca:service=SAPWHATEVER with no extra space.

          3. Look in the server log when the sap-service.xml is getting deployed to see if there are any problems reported.

          If you don't see what is wrong, post the server log excerpt when sap-service.xml is being deployed.
          ----------[David Jencks]

          at 1.: I put the jco.jar into the server//lib so that it should be in the classpath. Putting it into the classpath worked for Weblogic 6.1. Is this different in JBoss?

          at 2 and 3: I couldn't figure it out... the server log says not much about deploying sapr3-service.xml. All I found is:

          2003-03-28 14:03:07,310 INFO [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/C:/java/jboss-3.0.5_tomcat-4.1.18/server/jpbc/deploy/sapr3-service.xml
          2003-03-28 14:03:07,435 INFO [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Creating
          2003-03-28 14:03:07,435 INFO [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Created
          2003-03-28 14:03:07,451 INFO [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Starting
          2003-03-28 14:03:07,451 INFO [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Started
          2003-03-28 14:03:07,451 INFO [org.jboss.deployment.MainDeployer] Deployed package: file:/C:/java/jboss-3.0.5_tomcat-4.1.18/server/jpbc/deploy/sapr3-service.xml
          2003-03-28 14:03:15,701 WARN [org.jboss.deployment.MainDeployer] The manifest entry in file:/C:/java/jboss-3.0.5_tomcat-4.1.18/server/jpbc/tmp/deploy/server/jpbc/deploy/sapjra.rar/21.sapjra.rar-contents/sapjra.jar references URL file:/C:/java/jboss-3.0.5_tomcat-4.1.18/server/jpbc/tmp/deploy/server/jpbc/deploy/sapjra.rar/21.sapjra.rar-contents/sapjco.jar which could not be opened, entry ignored

          The state of the MBean

          MBean Name: Domain Name: jboss.jca
          service: XaTxCM
          name: SAPConnectorFactory
          MBean Java Class: org.jboss.resource.connectionmanager.XATxConnectionManager

          is "stopped" - but I don't know why. If I try to start it (out of the jmx-console) I get the following error:

          [root cause]
          MBeanException: Exception in MBean operation 'start()'
          Cause: org.jboss.deployment.DeploymentException: couldn't get oldRarDeployment!; - nested throwable: (javax.management.InstanceNotFoundException: jboss.jca:service=RARDeployment,name=SAPConnectorFactory is not registered.)
          at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:303)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
          at org.jboss.jmx.adaptor.control.Server.invokeOpByName(Server.java:227)
          at org.jboss.jmx.adaptor.control.Server.invokeOp(Server.java:196)
          at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.invokeOp(HtmlAdaptorServlet.java:183)
          at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.processRequest(HtmlAdaptorServlet.java:78)
          at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.doPost(HtmlAdaptorServlet.java:60)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

          • 2. Re: Trouble deploying SAP-RA
            FM Newbie

            and this is the other reply:

            > From: George Daswani
            > Subject: Re: Trouble deploying SAP-RA
            > Where can the SAP's JCA Resource Adapter be download from?
            > Checking SAP's site, I can only find which the JCo (java connector which is not the same as the resource adapter)...


            Just go to http://service.sap.com/netweaver > SAP Netweaver in Detail > Application Platform > Connectivity > Connectors > SAP Java Connector > Tools & Services

            • 3. Re: Trouble deploying SAP-RA
              David Jencks Master

              Thanks for rescueing my reply from oblivion.

              You have deployed jco.jar appropriately.

              I think SAP may have changed the display name of the adapter. The problem you are seeing is that the mbeans in sap-service.xml can't find the sap adapter. After the sap.rar is deployed, look in the jmx-console under jca: you should see an mbean for the sap adapter. Get the object name exactly as it is written and put it in the "old rar deployment" depends element in sap-service.xml. Make sure there is no extra space
              <depends ...>OBJECT NAME


              <depends ...>BLAH

              • 4. Re: Trouble deploying SAP-RA
                FM Newbie

                You're welcome, David :)

                You were right with your assumption that SAP changed the DISPLAY-NAME. It is now "SAPJRA". I changed this for the OldRarDeployment but now I am facing some other problems. JBoss cannot find some classes. First it complained about a missing JCO class. It put the jco.jar out of the lib and into the deploy-dir and it seemed to work. Then it couldn't find a class out of the sapjra.jar which is contained in sapjra.rar. So I took the jar and placed it into the lib-dir but the error remained. Then I explicitely specified in my startjboss.cmd that sapjra.jar should be in the classpath. But now JBoss gives me a "NoClassDef FoundError" for the javax.resource.cci.ConnectionSpec class which is in server\\lib\jboss-j2ee.jar.

                How do I setup my classpath properly in this case?

                • 5. Re: Trouble deploying SAP-RA
                  juraj Newbie


                  can you send me your sapr3-service.xml? I try to deploy the SAPJRA on Jboss, too. I don't know how to write such a service.xml file.

                  Thnak you,

                  • 6. Re: Trouble deploying SAP-RA
                    FM Newbie


                    I'm still struggling with my classloader problem. I desperately need to know how to set it up that the sapjco.jar is recognized and the classes out of the sapjra.jar (included in the deployed .rar) are recoginzed.

                    Can anybody help me please? Many thanks in advance!

                    @nort: I took the sapr3-service.xml out of the <jboss-3.0.5-installdir>\docs\examples\jca and filled in the login data. These data are explained in SAPJRA API Specification, coming with the adapter.

                    • 7. Re: Trouble deploying SAP-RA
                      juraj Newbie

                      Hi marven,

                      okay, I can it deploy now. I just wonder why the server.xml needs the same data how the ra.xml has?!?!?!

                      I have put the jco.jar to my lib directory of Jboss. jca.jar and jco.jar are also in the sapjra.rar included. And additionally I has the needed dll files from jco in my PATH (Winnt/system32)..

                      Now I have some problems with the XA Transactions. The service.xml from exemples uses a XATxConnectionManager, but SAP doesn't support XA Trasactions (hahaha). I will try out some configurations, but perhaps you have an idea??


                      • 8. Re: Trouble deploying SAP-RA
                        juraj Newbie

                        Okay, the adapter runs now. But still are some questions open:

                        - SAP doesn't suppero XA transactions, so I have replaced the XATransMng to LocalTxConnectionManager. Whats with the name attribute? Have I replace this, too? I didn't and get some XA transactions...

                        08:10:32,463 WARN [TxCapsule] XAException: tx=XidImpl [FormatId=257, GlobalId=N
                        ORT003//12, BranchQual=] errorCode=XA_UNKNOWN(0)
                        javax.transaction.xa.XAException: wrong xid in rollback: expected: null, got: Xi
                        dImpl [FormatId=257, GlobalId=NORT003//12, BranchQual=1]
                        at org.jboss.resource.connectionmanager.LocalTxConnectionManager$LocalCo

                        - I think there is a bug in Jboss or the SAPJRA. I have entered the right system number to my property file, but the sapjra couldn't create a connection. Then I entered also to the portnumber the value of the system number and after this the connection could be created. Also the JMX console shows wrong values of the attributes. Perhaps can someone reproduce this failure?

                        A resource adapter can have system- or application based properties. How can I set the configuration to use the application based properties, which are collected current the run-time??????

                        With the examples conf. are only the system configurations used.


                        • 9. Re: Trouble deploying SAP-RA
                          David Jencks Master

                          --marvin: The deployer should make all .jars inside the .rar available. If this is not working please be even more specific about what the setup is. Meanwhile, putting .jars in server/default(or other conf)/lib is the other reliable way of making them available. lib and the jboss classpath don't work very well.

                          --nort: The RARDeployment mbean shows some of the attributes from the ra.xml but nothing from the *-service or *-ds.xml file. The names (XATxCM) of the mbeans don't affect the tx support, just which class is used. Some earlier versions of jboss ignore the attribute values from ra.xml. I'm unclear about your distinction between system and application properties. By properties file do you mean *-service or *-ds.xml? What do you mean by using run-time properties? If you mean calling


                          you will have to consult the SAP docs to see what config-object should be. You will also have to set the pooling criteria to ByApplication.

                          • 10. Re: Trouble deploying SAP-RA
                            gdaswani Newbie

                            Thanks alot Marvin - I've been looking for it forever.. SAP needs to definitely revamp their confusing site..