0 Replies Latest reply on May 29, 2008 9:54 AM by Erez_Toaf

    Session exception with BlazeDS

    Erez_Toaf
      Hi All,
      I"m using BlazeDS and Flex in the client side along with Java in the server side.
      The server receives an http requests from the flex client, and from other sources.
      In the service-config.xml file of the BlazeDS I define http channel, as one of the connection channels, to the server.

      <channel-definition id="my-http" class="mx.messaging.channels.HTTPChannel">
      <endpoint url=" http://{server.name}:{server.port}/{context.root}/messagebroker/http" class="flex.messaging.endpoints.HTTPEndpoint"/>
      <properties>
      <invalidate-session-on-disconnect>true</invalidate-session-on-disconnect>
      </properties>
      </channel-definition>

      The problem is, that from this moment every http request to the server, that doesn't come from the Flex client, throws the following exception, and finaly causes the server to go out of memory:

      [BlazeDS] [ERROR] HttpSession to FlexSession map not created in message broker for L2bKsGRr252wg4G9Q1zLvM4jY2HhQHWfXgSz1v2zPxySTt37Q7bJ!-2076572288!1212078858850
      <May 29, 2008 7:34:40 PM IDT> <Error> <HTTP> <BEA-101362> <[weblogic.servlet.internal.WebAppServletContext@1f3428f - name: 'CsrUI', context-path: '/CsrUI'] could not deserialize the servlet-context scoped attribute with name: "LCDS_HTTP_TO_FLEX_SESSION_MAP"
      -----------------------------------------------------
      java.lang.ClassCastException: cannot assign instance of edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantLock$NonfairSync to field edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantLock.sync of type edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantLock$Sync in instance of edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap$Segment
      at java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:1977)
      at java.io.ObjectStreamClass.setObjFieldValues(ObjectStreamClass.java:1157)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1918)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
      Truncated. see log file for complete stacktrace
      >

      When I remove the definition of the http channel in the service-config.xml file, all the http requests go well, but the Flex client can't access the server.

      Does anyone has ideas?