0 Replies Latest reply on Sep 18, 2004 10:47 AM by 421621

    ClassCastException with a synchronous Request sent to a custom adapter

    421621
      Hello,

      I have written a custom adapter for a Java application. In the scenario, a client application connected to the hub will make a synchronous request to this Java application via the hib and the custom adapter. The result will be a List (Vector) of data that should be returned to the client application.

      The client application send the request, a message is sent, it goes through the hub and customer adapetr and it is received in teh bridge of the Java written custom adapter. A method of the Java application is called, it returns a Vector of data, a message object is created by the custom adapter and sent back as a response. Unfortuantely, I have obtained the following exception that seems to be related to the logging mechanism:
      java.lang.ClassCastException
      at oracle.oai.agent.common.AttributeObjectImpl.toString(AttributeObjectI
      mpl.java:558)
      at oracle.oai.agent.common.AttributeObjectImpl.toString(AttributeObjectI
      mpl.java:513)
      at oracle.oai.agent.common.MessageObjectImpl.toString(MessageObjectImpl.
      java:456)
      at oracle.oai.agent.common.logger.LogManager.writeToLogFile(LogManager.j
      ava:515)
      at oracle.oai.agent.common.logger.LogManager.log(LogManager.java:404)
      at oracle.oai.agent.common.logger.LogManager.log(LogManager.java:374)
      at oracle.oai.agent.client.AgentImpl.logStatusMessage(AgentImpl.java:542
      )
      at oracle.oai.agent.client.SmartQueueDispatcher.doPostMessageReceivedPro
      cessing(SmartQueueDispatcher.java:623)
      at oracle.oai.agent.client.SmartQueueDispatcher.run(SmartQueueDispatcher
      .java:510)
      at java.lang.Thread.run(Thread.java:534)

      I have to say that it seems that the data are taken properly in the get method of the MessageData class.

      Is there anyone who has a clue?

      Thanks a lot in advance!

      Regards,
      Marinel