Thursday, May 4, 2017

Create Rest Service on Oracle Commerce ATG11.x

Oracle Commerce does provide with a rest service module that we can use to expose services. it is very easy to do, in this diagram is explained in high level how this can be done.
Let's say we are gonna create a Service that returns the review for a particular product.
We need to create a service component that will get the Reviews, that will be as follows:


Then, we need to register that new service as an Actor as follows:






Then register that new service chain url into ActorChainRestRegistry.properties, OOTB that already exist and holds the configuration for all the services.

Everything on how to do this is documented at http://docs.oracle.com/cd/E52191_03/Platform.11-1/ATGWSFrameGuide/html/s0502restmvcserviceflowexample01.html

And in the top of this you can add a new layer for cache the data using Cache Adapter.
That will looks like this.
In order to do implement the cache, you can use this page that is a very useful guide https://www.sparkred.com/blog/writing-a-custom-atg-cache/
The Actor chain definition will change a little bit to use the cache instead of the service, that will look like:


Give it a try.

Friday, December 30, 2016

ScenarioManager is not accepting new scenarios

I was creating new scenarios and those were not reflected on the ScenarioManager, I have listed all the OOTB scenearios, but not my custom ones.

I found this Warning on the Logs:

/atg/scenario/ScenarioManager   Unable to declare this instance as the default ProcessEditorServer. Another instance has already been run against this schema, and has declared itself as the default ProcessEditorServer. This instance will be started as an individual server. To declare this instance as the ProcessEditorServer, either configure the /atg/scenario/scenarioManager.xml file, or remove the applicable row from the dss_server_id table. The first option is the recommended one, since it will prohibit this problem from occurring in the future. Turn on debug logging for this component to see further details (server restart may be required).

So I turned on logging debug on Scneario Manager, and found that all my custom Scmearios were not considered at all.

The problem was that the table dss_server_id was having a record for another computer (an other VM) I just updated this to use the actual name for the processEditor Server and that fixed the problem.

This is a common problem that you could face if you get a database dump from other computer.

How To Remove an EAC application

While installing an endeca application I faced a problem where I needed to reinstall again, in order to do such thing you need to remove the EAC application first, otherwise Error saying that the application already exist.

In order to remove an EAC application just run the follwoing scripts:


Then you will be able to install the application again with not a problem.

CRS configuration guide has the stesp listed as well: http://docs.oracle.com/cd/E52191_03/CRS.11-1/ATGCRSInstall/html/s0306removingtheeacapplicationandcasa01.html

Thursday, December 29, 2016

How to disable basic http auth on WebLogic 12

WebLogic by defeault has enabled basic http authentication.

This can be a problem if you want to run some application that connect to your instances like Oracle Commerce ACC (Admin Control Center)

In order to disable this you just need to go to config.xml on your domin config.

<WEBLOGIC_HOME >/user_projects/domains/mydomain/config/config.xml

and add insdide node the  


<enforce-valid-basic-auth-credentials>false</enforce-valid-basic-auth-credentials>

With this configuration basic auth is disabled and ACC or other apps that does not have a way to provide basic http auth credentials will be able to connect to your application deployed on web logic.




Tuesday, December 27, 2016

How to install Endeca Silently on Linux

This will be a simple guide to install endeca on Linux.

First thing to know is that endeca is nos  a single product, is a set of products, those are related and need to be aware of each of them.

The order that you install them is important.

There are 4 installers, MDEX, Platform and Services, Tools and Frameworks, and CAS, this is the right order for the installation.

All the installers below are to do the installation with a configuration file that will be used for silent install.

This guide assume you will install this under your /home/ directory, so everything will end installed under /home//endeca.

You can install where it fits better for you i.e. /opt, /u01...