6 Replies Latest reply on Sep 16, 2004 8:17 AM by 416900

    OAI Adapter Error - Unable to connect to Repository

    423709
      The Database adapter has this in the log file:

      hu Aug 26 21:35:54 CEST 2004: The Adapter service is starting..
      Thu Aug 26 21:35:55 CEST 2004: Registering your application (GDDBAPP)..
      Thu Aug 26 21:35:56 CEST 2004: Initializing the Bridge oracle.oai.agent.adapter.database.DBBridge..
      Thu Aug 26 21:35:56 CEST 2004: Subscribing to message (XXGD_CURR_CONV.curr_conv:OAI/V1,OAI/V1,false,0)
      Thu Aug 26 21:35:58 CEST 2004: Messenger: subscribed to topic oai_hub_queue with subscriber name GDDBAPP
      Thu Aug 26 21:35:58 CEST 2004: Subscribing to message (XXGD_PO_REC.req_receipt:OAI/V1,OAI/V1,false,0)
      Thu Aug 26 21:35:58 CEST 2004: Subscribing to message (XXGD_AR_BAL.sync_balance:OAI/V1,OAI/V1,false,0)
      Thu Aug 26 21:35:58 CEST 2004: Subscribing to message (XXGD_CURRENCY.sync_curr_rate:OAI/V1,OAI/V1,false,0)
      Thu Aug 26 21:35:58 CEST 2004: Subscribing to message (XXGD_CUSTOMER.sync_customer:OAI/V1,OAI/V1,false,0)
      Thu Aug 26 21:35:58 CEST 2004: Subscribing to message (XXGD_HEARTBEAT.sync_heartbeat:OAI/V1,OAI/V1,false,0)
      Thu Aug 26 21:35:58 CEST 2004: db_bridge_writer_1 has been started.
      Thu Aug 26 21:35:58 CEST 2004: Starting the Bridge oracle.oai.agent.adapter.database.DBBridge..
      Thu Aug 26 21:35:58 CEST 2004: Service started successfully.
      Thu Aug 26 21:35:58 CEST 2004: db_bridge_reader_1 has been started.
      Thu Aug 26 21:35:58 CEST 2004: db_bridge_reader_1 has connected to the database successfully.
      Thu Aug 26 21:35:58 CEST 2004: db_bridge_reader_1 is attempting to read a message (2,470) from its database.
      Thu Aug 26 21:35:58 CEST 2004: db_bridge_writer_1 has connected to the database successfully.
      Thu Aug 26 21:36:00 CEST 2004: Error connecting to the OAI Repository. Please make sure that the hub database and the OAI Repository are started properly. Once everything is started properly, the connection will be automatically re-established. However, if you have provided incorrect parameters concerning your hub database or the OAI Repository during installation of this Adapter, please stop the Adapter, fix the information and restart.
      com.sun.corba.se.internal.corba.AnyImpl@2cb158
           at oracle.aob.repository.aobRepositoryCartridge.RepositoryExceptionHelper.read(RepositoryExceptionHelper.java:10)
           at oracle.aob.repository.aobRepositoryCartridge._st_DSOMgr.getDSO(_st_DSOMgr.java:199)
           at oracle.oai.agent.server.OAIRepositoryImpl.readAOInfo(OAIRepositoryImpl.java:634)
           at oracle.oai.agent.server.MetadataManager.readAOInfoFromRepo(MetadataManager.java:1239)
           at oracle.oai.agent.server.MetadataManager.getAOInfo(MetadataManager.java:1017)
           at oracle.oai.agent.server.MetadataManager.getImpliedApplicationObjectInfo(MetadataManager.java:374)
           at oracle.oai.agent.common.MessageObjectImpl.setMessageInfo(MessageObjectImpl.java:162)
           at oracle.oai.agent.client.AgentImpl.createMessageObject(AgentImpl.java:173)
           at oracle.oai.agent.adapter.database.DBMessageReader.readDBMessageUsingNewOaiSchema(DBMessageReader.java:527)
           at oracle.oai.agent.adapter.database.DBMessageReader.sendDBMessage(DBMessageReader.java:648)
           at oracle.oai.agent.adapter.database.DBMessageReader.run(DBMessageReader.java:242)
           at java.lang.Thread.run(Thread.java:484)
      Thu Aug 26 21:36:01 CEST 2004: Received a message from hub queue oai_hub_queue.


      The reposiotry is up and I am able to connect using iStudio...but this adapter show us that error
      And when I try to stop the adapter , it hangs with the status stopping.
      This was working fine till yesterday .

      what happened here ?

      Thanks,
      Devika.



        • 1. Re: OAI Adapter Error - Unable to connect to Repository
          KavithaSrinivasan
          Hi Devika:

          Pl., try to stop (worst case kill) all processes - all adapters and repository. And then start the repository and adapters back (note order for stopping and starting).

          Regards,
          Kavitha
          • 2. Re: OAI Adapter Error - Unable to connect to Repository
            4164
            HI.

            I have the same error. Stopping and starting the adapters, etc. does not seem to help. Anyone have any workaround?

            Thanks,
            Robin
            • 3. Re: OAI Adapter Error - Unable to connect to Repository
              423709
              Hi Robin,

              The Note 259914.1 in metalink will give you an explanation on how to fix this problem .

              To fix this :
              I stopped all other adapters.
              Stopped the repository.
              Deleted all the entries in OAI_HUB_QUEUE table from sqlplus.
              Deleted the entry for the adapter having problem from COMPONENTINFO table.
              Reboot the server. This will stop the adapters.
              Delete the persistence directory for the adapter and restart the adapter.

              This was our test environment so I was able to play around.

              Regards,
              Devika.
              • 4. Re: OAI Adapter Error - Unable to connect to Repository
                4164
                Thanks! By the way, this is 10g (9.0.4) on windows.

                Thanks again for the response,
                Robin
                • 5. Re: OAI Adapter Error - Unable to connect to Repository
                  4164
                  Devika,

                  Hi. I followed the note (and your summary) and I still see the same error.

                  This is a test environment, too.

                  :(

                  Robin
                  • 6. Re: OAI Adapter Error - Unable to connect to Repository
                    416900
                    Hi,

                    Just a thought here but I've had a similar problem too. My problem was caused by swapping and changing repositories from one system (DEV), to another (TEST).

                    Here, I think, are possible reasons for your error.

                    You have created alot of messages on your DEV environment. These messages go through OK up until (a) you have re-created the OAI schema (thus resetting the sequences back to 1 again) or (b) you've taken a cut of your repository from the DEV system, and oaiimport-ed into your TEST Hub system. Your new TEST application is therefore using a "used" repository.

                    In short, your sequences are all over the place. OAI tries to add some crude security by preventing you re-submitting the same message payload; which is identified by its ID.

                    I have fixed this by looking at the oaiexport or oaiexport.bat script, and compared this to the hub3.sql script found in $ORACLE_HOME/oai/9.0.4/repository/sql. hub3.sql says "-- Stuff not to be exported".

                    e.g.

                    Your oaiexport script may look like this.

                    echo Exporting metadata ...
                    echo " Executing: exp $connect_string TABLES=(...) FILE=$2"
                    exp $connect_string TABLES=\(sequence_values,at,lcogroup,lco,lcoattr,lcolabel,eventgroup,event,eventlabel,
                    eventlco,emd,emddatalet,storedproc,emdlabel,dso,dsoattr,dsolabel,idoc,xref_dvm,
                    eventmap,eventmap_conditions,cbr,mcm,partition,dsodtd,lcodtd,bf,bp,bpemd,%xref%,%dvm%,
                    lookupid,lookup,ComponentInfo,ComponentInfoValue,AppIDTable,RepoIDTable,MessageInfoIDTable,
                    msg_correlation,MessageStatusTable,oai_agent_error,
                    lcoextratypeattr,dsoextratypeattr,emdcomments\) STATISTICS=NONE FILE=$2

                    But...

                    >> Objects created by hub3.sql <<
                    -- Stuff not to be exported
                    * lookupid
                    * lookup
                    * ComponentInfo
                    * ComponentInfoValue
                    * AppIDTable
                    * RepoIDTable
                    * MessageInfoIDTable
                    * msg_correlation
                    * MessageStatusTable
                    * oai_agent_error

                    Possible FIX

                    Shut down your adapters, repository, iStudio or any other services (like SQL*Plus) connecting to your Hub/Repository.

                    1. Backup your original oaiexport or oaiexport.bat file first.
                    2. Change the "echo Exporting metadata ..." entry, removing the objects listed above.
                    3. Run the amended oaiexport script to create a new *.DMP file.
                    4. Use oaiimport to drop the existing schema, and recreate it with your new *.DMP file (i.e. without the offending data.)

                    When you start up the repository, adapters etc. and try sending the message again, the problem should have gone away.

                    Hope this at least points you in the right direction.

                    Yan