Unable to find a WCS cookie in the HTTP Request
Header
|
Technote
(troubleshooting)
Problem(Abstract)
|
You notice when trying to access the WebSphere Commerce
Accelerator, AdminConsole, OrgAdminConsole, or the storefront, you get the
Generic error page.
Looking in the WC_SERVER trace, you see messages indicating there are no
cookies found, such as:
[9/5/07 15:05:20:384 EDT] 00000036 WC_SERVER >
com.ibm.commerce.browseradapter.AbstractHttpBrowserAdapter
handleCookieDetection Entry
[9/5/07 15:05:20:391 EDT] 00000036 WC_SERVER 3 CookieDetector static block
Cookie detection enabled.
[9/5/07 15:05:20:416 EDT] 00000036 WC_SERVER > CookieDetector handle()
Entry
[9/5/07 15:05:20:416 EDT] 00000036 WC_SERVER > CookieDetector
isAcceptanceCheckNeeded() Entry
[9/5/07 15:05:20:416 EDT] 00000036 WC_SERVER > CookieDetector
isAcceptanceCookieSet() Entry
[9/5/07 15:05:20:416 EDT] 00000036 WC_SERVER > SessionHelper
getCookieValue Entry
[9/5/07 15:05:20:416 EDT] 00000036 WC_SERVER 3 SessionHelper
getCookieValue Unable to find a WCS cookie in the HTTP Request Header.
However, the browser is NOT blocking cookies, and you see various cookies
created in the browser session from the WebSphere Commerce
application.
|
Cause
|
The WebSphere Commerce server is only accepting cookies
for a particular domain name. This configuration is found in the WebSphere Commerce configuration file:
<cookie acceptance="false"
age="-1"
display="false"
domain="mydomain.com"
enabled="true"
path="/"
persistence="wcs"
sslauth="false" />
In this example, cookies are only going to be accepted from mydomain.com.
If the old hostname was host1.mydomain.com, but this domain has now been
modified to host1.newdomain.com, this problem would occur.
When the Commerce server creates the new cookie, it is created with domain
newdomain.com. However the instance configuration will only allow the
server to accept cookies from mydomain.com, therefore it will not find
these cookies it just created. This problem can be encountered after
migrating, after a hardware change, or after a webserver or application
server hostname change.
|
Resolving the
problem
|
Modify the instance configuration in the wc-server.xml to
change the domain to the correct new domain (or leave it as "").
<cookie acceptance="false"
age="-1"
display="false"
domain="newdomain.com"
enabled="true"
path="/"
persistence="wcs"
sslauth="false" />
|
|
|
Cross Reference information
|
Segment
| Product
| Component
| Platform
| Version
| Edition
|
Commerce
| WebSphere Commerce Enterprise
| Runtime
| AIX, Linux, Solaris, Windows
| 6.0
|
|
Commerce
| WebSphere Commerce Business Edition
| Runtime
| AIX, Linux, Solaris, Windows
| 5.6, 5.6.1
|
|
Commerce
| WebSphere Commerce - Express
| Runtime
| Linux, Windows
| 5.6, 5.6.1, 6.0
|
|
Commerce
| WebSphere Commerce Developer Enterprise
| Runtime
| Windows
| 6.0
|
|
Commerce
| WebSphere Commerce Developer Business Edition
| Runtime
| Windows
| 5.6, 5.6.1
|
|
Commerce
| WebSphere Commerce Developer Professional Edition
| Runtime
| Windows
| 5.6, 5.6.1, 6.0
|
|
Commerce
| WebSphere Commerce Developer Express
| Runtime
| Windows
| 5.6, 5.6.1, 6.0
| |
|
Current web document: http://www.ibm.com/support/docview.wss?uid=swg21269816
|