7 Replies Latest reply on Jan 31, 2012 7:11 PM by Sham HC

    Connecting from Endeca to CQ5 via RMI

    nandhini NIKE

      Hello,

       

      I am trying to connect to CQ5 from endeca.  I am running a crawl and I am seeing this error in the logs:

      com.endeca.cas.extension.datasource.crx.CrxDataSourceRuntime: org.apache.jackrabbit.rmi.client.RemoteRepositoryException: java.rmi.RemoteException: No target found:

      //10.7.18.160:18200/CRX; nested exception is: java.rmi.NotBoundException: CRX

       

      Any thoughts on how I can fix this?

       

      Thanks in advance for your help!

       

       


        • 1. Re: Connecting from Endeca to CQ5 via RMI
          Sham HC Level 7

          I think it should bound to repository but I am not aware of endeca. Take a look at some example at [1] & use ClientRepositoryFactory.

           

          [1]   http://dev.day.com/docs/en/crx/2-0/developing/accessing_jcr_connectors.html

          • 2. Re: Connecting from Endeca to CQ5 via RMI
            liorz_adok Level 1

            Hi Sham, I am not sure I understand your answer, could add more details please.

            Are suggested the issue is with the CRX or the code that tries to make the connection.

             

            Nanhini, can you post the snippet of code that makes the connection?

             

            Lior

            • 3. Re: Connecting from Endeca to CQ5 via RMI
              Sham HC Level 7

              Hi Lior,

               

              It deponds how they have configured.  An NotBoundException is thrown if an attempt is made to lookup in the registry a name (crx)  that has no associated binding.   Looking at the exception if they are using default cq configuration then crx in the client url should be small letters instead of "CRX".    So what I mean was it should bound to the url defined in web.xml of repository.

               

              An example of default cq with rmi enabled and hello world at [2] if you change the url to [1] you get the same exception "java.rmi.NotBoundException: CRX". Make it small it should work.

               

              Thanks,

              Sham

               

              [1]  //localhost:1099/CRX

               

              [2]   http://dev.day.com/docs/en/crx/2-0/developing/accessing_jcr_connectors.html

               

              Thanks,

              Sham

              • 4. Re: Connecting from Endeca to CQ5 via RMI
                nandhini NIKE Level 1

                Hi Sham,

                 

                Thanks for your help!  I was using the upper case when referring to repository.  Now I am using lower case and it seemed to have fixed that issue.

                 

                However, I am getting the following error when I try to connect to CQ5 from endecca. 

                 

                2012-01-25 12:31:04,144 INFO [/cas] [cas-ecn10cq5-worker-1] com.endeca.cas.extension.datasource.crx.CrxDataSourceRuntime: -Connecting to //xx.x.xx.160:18200/crx

                2012-01-25 12:31:04,144 INFO [/cas] [cas-ecn10cq5-worker-1] com.endeca.cas.extension.datasource.crx.CrxDataSourceRuntime: --- Property Set..

                2012-01-25 12:31:05,414 INFO [/cas] [cas-ecn10cq5-worker-1] com.endeca.cas.extension.datasource.crx.CrxDataSourceRuntime: --- factory.getRepository(url) Done.. Repository toString is org.apache.jackrabbit.rmi.client.ClientRepositoryFactory$1@307022af

                2012-01-25 12:31:05,414 INFO [/cas] [cas-ecn10cq5-worker-1] com.endeca.cas.extension.datasource.crx.CrxDataSourceRuntime: --- Workspace name is : crx.default

                2012-01-25 12:31:05,914 ERROR [/cas] [cas-ecn10cq5-worker-1] com.endeca.cas.extension.datasource.crx.CrxDataSourceRuntime: org.apache.jackrabbit.rmi.client.RemoteRepositoryException: java.rmi.ConnectException: Connection refused to host: xx.x.xx.160; nested exception is:

                    java.net.ConnectException: Connection refused

                 

                Any ideas? 

                 

                Thanks.

                -Nandhini

                • 5. Re: Connecting from Endeca to CQ5 via RMI
                  nandhini NIKE Level 1

                  In addition to my previous post, I have another question.  I checked the CRX documentation for rmi connection and

                  it requires certain jar files need to be in certain directories for rmi to work.  Some of these files indicated below are missing from the CRX directory.  Would these missing files be the cause for rmi connection not working?

                   

                    \crx-quickstart\server\lib\container\jcr-*.*.jar
                  \crx-quickstart\server\runtime\0\_crx\WEB-INF\lib\jackrabbit-jcr-rmi-*.*.*.jar
                  \crx-quickstart\server\runtime\0\_crx\WEB-INF\lib\crx-rmi-*.*.*.jar

                   

                  Thanks.

                  -Nandhini


                  • 6. Re: Connecting from Endeca to CQ5 via RMI
                    liorz_adok Level 1

                    it seems that actually the first one is missing from the default cq5.4 distribution. 

                      \crx-quickstart\server\lib\container\jcr-*.*.jar

                     

                    I cannot seem to find it as well on our server.

                     

                    Please let us know if that missing jar could cause the connection refused error.

                     

                    Thanks,

                    Lior

                    • 7. Re: Connecting from Endeca to CQ5 via RMI
                      Sham HC Level 7

                      Connection refused has no relation with missing jar files. Make sure in <cq_home>/crx-quickstart/server/runtime/0/_crx/WEB-INF/web.xml rmi is enabled.

                          <init-param>

                            <param-name>rmi-port</param-name>

                            <param-value>1099</param-value>

                            <description>

                              The RMI port for registering the repository in the RMI Registry.

                              If equals 0, the default port is used. Omit this parameter to

                              disable RMI server entirely.

                            </description>

                          </init-param>

                         

                         

                      For rmi clients the jar that may required are

                      <CQ_HOME>/crx-quickstart/server/runtime/0/_crx/WEB-INF/lib/crx-rmi-2.2.0.jar

                      <CQ_HOME>/crx-quickstart/server/lib/common/jcr-2.0.jar

                      <CQ_HOME>/crx-quickstart/server/runtime/0/_crx/WEB-INF/lib/jackrabbit-jcr-rmi-2.2.4.jar

                      <CQ_HOME>/crx-quickstart/server/runtime/0/_crx/WEB-INF/lib/slf4j-api-1.5.11.jar

                      <CQ_HOME>/crx-quickstart/server/runtime/0/_crx/WEB-INF/lib/slf4j-log4j12-1.5.11.jar

                      <CQ_HOME>/crx-quickstart/server/runtime/0/_crx/WEB-INF/lib/log4j-1.2.14.jar

                      1 person found this helpful