Topic
  • 3 replies
  • Latest Post - ‏2013-03-03T20:41:42Z by KelvinS
KelvinS
KelvinS
3 Posts

Pinned topic JSON & WAS 8.5

‏2012-11-07T20:47:46Z |
My application on WAS 8.5 hangs during login. From debug I can tell that JSON objects are not being stored in the correct format. Here's an example:

var CONTAINER_ERROR_ICONS = <%wcs.getContainerErrorIconJSON()%>;
This method returns a JSON object and it should be written out like this:

var CONTAINER_ERROR_ICONS = {"smartfill":{"event":"errorfocus","tooltip":"Contains errors"},"error":{"event":"errorfocus","tooltip":"Contains errors"},"question":{"event":"errorfocus","tooltip":"Contains errors"},"warning":{"event":"errorfocus","tooltip":"Contains warnings"}};

instead it is written like this:

var CONTAINER_ERROR_ICONS = {question={tooltip=Contains errors, event=errorfocus}, error={tooltip=Contains errors, event=errorfocus}, smartfill={tooltip=Contains errors, event=errorfocus}, warning={tooltip=Contains warnings, event=errorfocus}};

There are no double quotes ("") and an equal (=) is printed instead of a colon (:).

Does WAS 8.5 do any transformation of JSON objects? At first glance this seems like a possible Java JDK difference but JDK 1.6 is used by WAS 8.5 and the only JDK version on the machine. So WAS dev team...anything going on with JSON with WAS 8.5?

--Kelvin
  • SystemAdmin
    SystemAdmin
    590 Posts

    Re: JSON &#38; WAS 8.5

    ‏2012-11-07T21:32:51Z  
    Hello Kelvin,
    Are you using WAS full profile or liberty profile? If liberty profile, which JDK are you using (IBM, Oracle)?
    Thanks, Alex Mulholand.
  • KelvinS
    KelvinS
    3 Posts

    Re: JSON &#38; WAS 8.5

    ‏2012-11-07T21:50:30Z  
    Hello Kelvin,
    Are you using WAS full profile or liberty profile? If liberty profile, which JDK are you using (IBM, Oracle)?
    Thanks, Alex Mulholand.
    Hi Dr. Alex,

    I am running a full WAS 8.5 profile. Not Libety.
    Output from 'java -version'

    C:\Program Files (x86)\IBM\WebSphere\AppServer\java\jre\bin>java -version
    java version "1.6.0"
    Java(TM) SE Runtime Environment (build pwa6460_26sr2ifix-20120419_02(SR2+IV19661
    ))
    IBM J9 VM (build 2.6, JRE 1.6.0 Windows Server 2003 amd64-64 20120322_106210 (JI
    T enabled, AOT enabled)
    J9VM - R26_Java626_SR2_20120322_1722_B106210
    JIT - r11_20120322_22976
    GC - R26_Java626_SR2_20120322_1722_B106210
    J9CL - 20120322_106210)
    JCL - 20120316_01
  • KelvinS
    KelvinS
    3 Posts

    Re: JSON &#38; WAS 8.5

    ‏2013-03-03T20:41:42Z  
    Pete Halbeisen has worked/chased down a fix for this.

    (1)
    We worked around this problem by manually editing our UI template jsp file to serialize() json objects:

    In a template jsp, we javascript variable populated by a call to a session class which returns a json object.

    var CONTAINER_ERROR_ICONS = <%=wcs.getContainerErrorIconJSON()%>;

    Our UI team recommended changing the above to:

    var CONTAINER_ERROR_ICONS = <%=wcs.getContainerErrorIconJSON().serialize()%>;

    (2)
    WAS support does have an ifix available for this issue and it is going in the next WAS 8502 fixpack. Reference APAR PM80871.