Fraska Portal

Exploring the WebSphere Commerce world

WebSphere Commerce, FEP7, Toolkit, foundation enablement and Search REST services

Posted by on in Administration
  • Font size: Larger Smaller
  • Hits: 6832
  • 42 Comments
  • Subscribe to this entry
  • Print

 Working with the Aurora starter store- provided with the FEP7- could bring some misconfiguration, in particular on the Developer version, lead to "break" the front-end, like in this case:

b2ap3_thumbnail_WCS_FEP7_Toolkit_REST_1.png

 

The above screenshot reports just the top part of the front page were is visible an issue rendering the menu. Looking at the log, an exception gets a glimpse on the possible reason:

 
[5/7/14 16:47:12:451 CEST] 00000148 LoggingHelper E /GenericJSPPageError.jsp - java.io.FileNotFoundException: http://myserverhostname:80/search/resources/store/11451/categoryview/@top?catalogId=10401&depthAndLimit=11%2C11&responseFormat=json&responseFormat=json&langId=-1
                                 java.lang.RuntimeException: java.io.FileNotFoundException: http://myserverhostname:80/search/resources/store/11451/categoryview/@top?catalogId=10401&depthAndLimit=11%2C11&responseFormat=json&responseFormat=json&langId=-1
	at com.ibm.commerce.foundation.internal.client.util.RESTHandler.execute(RESTHandler.java:122)
	...
	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1656)
Caused by: java.io.FileNotFoundException: http://myserverhostname:80/search/resources/store/11451/categoryview/@top?catalogId=10401&depthAndLimit=11%2C11&responseFormat=json&responseFormat=json&langId=-1
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	...com.ibm.commerce.foundation.internal.client.util.RESTUtil.getWithMultiValuedParams(RESTUtil.java:172)
	at com.ibm.commerce.foundation.internal.client.util.RESTHandler.execute(RESTHandler.java:116)
	... 103 more
Caused by: java.io.FileNotFoundException: http://myserverhostname:80/search/resources/store/11451/categoryview/@top?catalogId=10401&depthAndLimit=11%2C11&responseFormat=json&responseFormat=json&langId=-1
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1457)
	at com.ibm.commerce.foundation.internal.client.util.RESTUtil.getWithMultiValuedParams(RESTUtil.java:136)
	... 104 more

Target:

System Administrators and Developers

Environment:

  • WebSphere Commerce Developer v 7.0.0.8 FEP7
  • WebSphere Application Server 7.0.0.29
  • DB2 9.7

 Something wrong with the SOLR REST services. The problematic URL was: http://myserverhostname:80/search/resources/store/11451/categoryview/@top?catalogId=10401&depthAndLimit=11%2C11&responseFormat=json&responseFormat=json&langId=-1

By the way, my infrastructure is pretty common: WCS Toolkit v7 FEP7 with local DB and local search engine.

The URL, reported above, is a classic request for the SOLR server where WAS is asking for the top categories of the store 11451 for the catalogId 10401.

I strongly suggest to investigate these kind of issues with the adoption of SoapUI: it's a great tool to check the status of web services (request and response) or- like in this case- RESTFul services. The following screenshot reports what the REST service was returning using SoapUI:

b2ap3_thumbnail_WCS_FEP7_Toolkit_REST_2.png

Use the following guide to test REST services: Getting started with REST Testing

The response was stating: The requested URL was not found.

Looking at the SOLR server's log, this request did not reach out the engine at all. So, it leads to think something wrong in the IHS server. The first thing I reviewed was the steps made for foundation enablement: Deploying the WebSphere Commerce search server locally (standard deployment mode)

I actually made again the enablement using also the following properties:

enableFeature.bat -DfeatureName=foundation -DautoConfigSearchWebserver=true -DisShareWCWebserverProduct=true

They suppose to configure the IHS plugin; however, it's not so clear- in the Info Center- if it's valid for the Toolkit too. Anyway, enable again the foundation feature did not help. At this point, I reviewed the IHS plugin configuration which has to be ready to handle /search/resources requests.

Opening the configuration I saw there was no mention to /search/resources. So, the web server was not forwarding the requests to the SOLR server.

The fille <plugin install directory>\config\webserver1\plugin-cfg.xml contained just the /solr context.

 <UriGroup Name="VH_demo_search_solrServer_demo_search_node_Cluster_URIs">
      <Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/solr/*"/>
   </UriGroup>  

I added the /search/resources too.

 <UriGroup Name="VH_demo_search_solrServer_demo_search_node_Cluster_URIs">
      <Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/solr/*"/>
      <Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/search/resources/*"/>
   </UriGroup>  

Than, I just restarted the web server and the RESTful services were accessible and they started to returns proper results.

 
UPDATE 21/05/2014:

An important APAR (JR49995) has been released regarding a compression issue related to accepted-encoding header. Without installing this APAR the REST services could not be consumed by WCS using wcf:rest tag.
For further details review the following topic: Problems with compressed REST response.

 

Rate this blog entry:
1

Comments

Leave your comment

Guest
Guest Wednesday, 17 October 2018

Most Popular Post

WebSphere Commerce, the SOLR extension index
Administration
Rate this blog entry:
4
WebSphere Commerce, Data Load and SOLR Delta Index
Data Load
Rate this blog entry:
0
WebSphere Commerce, the curious life of a front-end catalog request
Core
Rate this blog entry:
5

Latest Blogs

WebSphere Commerce, CommandLevelAuthorizationCache
Cache
Rate this blog entry:
0
WebSphere Commerce v8, toolkit exception, ClassNotFound db2
Administration
Rate this blog entry:
1
WebSphere Commerce, ATP migration
Store
Rate this blog entry:
0
WebSphere Commerce, the curious life of a front-end catalog request
Core
Rate this blog entry:
5
WebSphere Commerce, Performance analysis of few European stores
Performance
Rate this blog entry:
0