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:

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  


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...

Thursday, December 1, 2016

How to fix ORA-01110

This problem happens when you delete a tablespace on the file system

Then when Oracle DB is not able to find it and return an exception as follows:

ORA-01110: data file 5: '/u01/app/oracle/oradata/XE/data'

This can be fixed by letting the oracle DB know that the file is deleted as follows:

Friday, November 18, 2016

ORA-39087 - How to Create a DATA_PUMP directory on Oracle to import a DMP on custom DATA_PUMP Location.

When running an import a directory needs to be set in the impdp command as follows:

impdp schemas=MERCH directory=DATA_PUMP dumpfile=MERCH.DMP logfile=impdp_merch.log

If you send a directory that actaully exist on your system, Oracle still will complain about it.

impdp schemas=MERCH directory=/media/sf_shared dumpfile=MERCH.DMP logfile=impdp_merch.log

ORA-39087: directory name /MEDIA/SF_SHARED is invalid

As you can see oralce sees my directory on UPPER case, so I needed to make sure that /MEDIA/SF_SHARED existed on my system, so I created a symbolic link to make it work.

But the issue was still present:

ORA-39087: directory name /MEDIA/SF_SHARED is invalid

So, I found that 3 things need to happen:

1.- directory must exist on your system, and must have read and write privileges
2.- directory must exist with UPPER case since oralce impdp will require it like that
3.- Database needs to be aware of that directory so you need to create it as follows:

after the 3 conditions are met, you can do this:

impdp schemas=MERCH directory=DATA_PUMP_SHARED dumpfile=MERCH.DMP logfile=impdp_merch.log

And then the import will work without the ORA-39087 error, I hope this is helpful for you :D

UPDATE (2/16/2017):
I have learn that the directory that is needed into the impdp, needs to live in dba_directories table , with the reference to the path you are trying to set, so instead of doing upper case as described above just make sure you use the correct Directory_name

Special thanks to this guy:

Error Importing DMP on Oracle XE 11.2

I was trying to run a simple import of dmp on a Oracle XE database, and I faced this error

ORA-30094: failed to find the time zone data file for version 11 in $ORACLE_HOME/oracore/zoneinfo

I google it and found the following:

Cannot import data pump export into XE11 - bug?
ORA-30094: failed to find the time zone data file for version ... in $ORACLE_HOME/oracore/zoneinfo

Both talk about timestamp file, that you can get with this query:

And returns the version you have installed:

And as you can see in my Error, says version 11, and does not match with what the DB has.

ORA-30094: failed to find the time zone data file for version 11 in $ORACLE_HOME/oracore/zoneinfo

What I did to fix it was I went to $ORACLE_HOME/oracore/zoneinfo and copy the 2 files to be version 11, and that fixed my import.

The DB still points to version 14, but the import uses the version 11 somehow, not sure the reason, but what is sure is that this fixed my issue and helped me to import my DMP without any issues.

Thursday, November 10, 2016

How to Know which jsp files are used in CSC

CSC custom development is a common thing that retailers does, in order to be aware of how CSC works internally in the front end, you can enable useDebugPanelStackMode at /atg/svc/agent/ui/AgentUIConfiguration/, this will make CSC tell you which jsps are used in each section of the page, as follows:

This will tell you the name of the .jsp, the location, ans other sort of information, I can tell you this is great tool for support and development, so start using it, it will save you lots of time :)

This can be found on the ATG documentation at and is available from ATG10.1 and newer versions.

Friday, October 21, 2016

Setting Proxy settings on DynTrace installation

I had a hard time trying to install dynaTrace on my linux environment, and it was due the proxy settings, so what I did it was the following:

I have Edited the .sh that dynatrace provides you.
And changed the following Settings:

If you choose option, the script will ask you  to use a defined proxy, no_proxy in my case, and if you choose no, you can procvide your own.

I had a hard time due my password has special characters on it the example in the gist above shows my p@55w0rd you can notice that @ is encoded, I found that here 

If you do this correctly dynatrace will be able to load your agent.

Thursday, September 22, 2016

jboss 5.1 is not acception remote connection

I have jboss-eap-5.1 running in a virtualMaching, and when I wanted to access the jboss from the host machine it was not able to, however I was able inside form the virtual machine.

So I was missing a parameter that will allow Jboss to acept remote connections, and is not set by default.


Jboss have -b by defautl. this is documented at

So if you are not able to get your jboss from other computer that is the reason.

This works for older versions as well.

Monday, September 5, 2016

How to move stuck BCC project

If you have worked with automatic publish workflow, there is a chance that you can end up with projects that are stuck due the server went down, or somehting odd happened on one of your targets.

There is a way to continue working with those projects, that seems to be stuck, this is documented at

It is matter of knowing the name of the project you want to move, and the target you want to move it.

In order to fix them just go to


And select tthe project, the target and the Status, then click on Send Deployment Complete Message

Doing this will send a message so your project continue on the workflow.

Tuesday, August 30, 2016

Missing menu items on BCC

Recently I faced a problem where my bcc menu was incomplete, so I checked that I had the correct roles on my user, so it was not an issue with roles being missing. searching on the web I have found this:
ATG Merchandising menu not appearing in BCC

Is a not answered question, however it should be answered question:

The post Says:

Please validate you have configured your publishing instance as PES in atg/epub/workflow/process/workflowProcessManager.xml

And that is what I did, and the hostname was corret along with my drp port.

The problem was, that I was using an alias for the box as the hostname, and BCC does not like that, so even thoguth that the hostname and the port were correct for me, were not, I needed to use the acutal name on the server not the logical/alias name that I had for it.

Here is what I am talking about

The server name was:
The alias I had was:

The code ended up to be as follows:

The right way to do it is use the actual servername or the IP address, not the alias/logical name given to it.

That was the fix, special Thanks to Andres that found that this was the probelm.

To Find out what is the drp port you can go to on your BCC/PES instance:


Friday, August 26, 2016

Get ProjectId inside BCC with a tamperMonkey/greaseMonkey Script

When you are doing trouble shoot on BCC, you need to know the projectId of the project you are working on, that is easy to get, just inspect the anchor for the project and the projectId will be there present as a parameter, or query the DB to get the projectId by name.

Since is something is always need, I have made this script, that will hightlight the projectId for you.

The output is as follows:

In order to install this, you need to have tamperMonkey for Chrome or greaseMonkey for FireFox.

just add the following Script: and that's it

I hope you find this helpufull, and save you a some time :)

Wednesday, July 20, 2016

DDL from a query (Oracle)

All the good db clients like SQL developer, TOAD and so on are good at showing you the DDLs for the tables your are working on, but sometimes these tools are not available at the current environament you have. i.e ATG JDBC Browser:

So you can get the DDL with a Query for any DB object, here is how to do it:

And this is how it looks like the output on JDBC browser which is where I needed to use it:

I found this here

Friday, July 8, 2016

Oracle Query / Kill Sessions

DBAs have great power over the Database, this gist will give us a taste of that.

And This is becuase with the above sql queries you will be able to find out how many sessions are running against your DB, who is using it, to which schema ar connected and more..

And even better if you need to kill a session for some maintaincance is as easy as just Kill  the sessions that won't let you do it.

Note: Be kind to ask whom ever is connected to disconnect before killing sessions.


Wednesday, July 6, 2016

milliseconds on entry

While I was doing startup on my localenvironment I found an exception this exception:

milliseconds on entry

I did not find a solution on the internet, but lucky for me oracle have a solution for this on the Oracle Knowlage base.

The root cause seems to be an unexpected stop or kill of the current application leaving the locks alive in Server Lock Manager, since this was on my local environment the solution was easy for me.

just do: 


on my ClientLockManager components.

The solution for non development instances is shoutdown the LockManager server, so it release the locks

Friday, June 10, 2016

Self document your Spring MVC api

When you are developing web services, documentation is important for the clients that will consume them, basic stuff such as:

emdpointName, HTTP Method, Paramters, Content Type: and so on.

So I found that Spring MVC will let you read that info, so you can expose it, I found it here:

So I changed it a little bit to return the data in json object, the code will be as follows:

Note that you can read everything you Need from RequestMappingInfo object, I am not displaying all of it.

The result of the above code will be something like this, and this can be delivered to the clients consuming your web service along with the acutal documentation, the advantage of this is that they can know what is exacly published in the server, in case the documetation is not updated.

There are tools out there that does this in a more elagant way, is one of
them, give them a try :)

Wednesday, May 18, 2016

DeploymetServerMonitor (ATG Oracle commerce)

There is a chance that some of your deployment projects in BCC are huge and takes several minutes, even hours to deploy, so a tool that delivers the status of such project's deployment comes in handy, I have created a deploymentServerMonitor component that will email you the status of the current state of both of your configured Sites, in my case I have both, production and Staging.

This is how those notification looks like on outlook and Android email clients.

Here is the code, It can be changed to use your own emailTools to generate the email, the message can be created as you are used to, and it can be changed to display more information if needed, and the chart is coming from, that can be changed to use what you like better.

Tuesday, May 17, 2016

Find broken sequence on DCS_PRD_CHLDSKU (ATG Oracle Commerce)

With this PL/SQL you can find which records on your DCS_PRD_CHLDSKU table are missing a sequence, is is an edge case, but when it happens you need to go and find them and fix them otherwise your deployment will be stuck, this will help you to do it for all your products.

The output will be tell you which products are missing the sequence, and it will be easy for you go and fix that miss.

This is and edge case that happens when one  of the schemas is modified out of the BCC, in an ideal world that should never happen, however we are not there and this kind of things happen.

When this happens you will find something similar to these messages on the logs:

The referenced item 'sku_id in the childSKUs property of the item 'productId' cannot be found 

on target, which implies a data inconsistency between source and target.  It will not be included

in the deployed list.
Error reading list or array index from the database. Expected: 'sequence number', got 

'other sequence number'. The following property was not read: "{The name of a property}",

for item id: 'product_id'. This means the database table holding this property does not
have sequential integers starting with 0 in its multi-column.

This should only happen if the database table was modified directly (outside of Dynamo).

This can be done also with a Query, but is a very heavy query, this as heavy as your catalog size, Special Thanks to Roberto Ibarra who build this query

Thursday, April 7, 2016

JRebel + ATG (Oracle Commerce)

As you know JRebel is such a great tool for deploy your java classes on the fly to a server that is running, this saves you time doing builds and time starting your server.

Also you know ATG builds are not fast, and also ATG applications take some time at start up due start lots of components for first time when starting.

So JRebel Team made JRebel work with ATG, and here are the steps that I did.

Do the JRebelQuickStart steps

After you are done with it you will end up with something like this:

This is not part of the quick Start but is fine if you turn on ATG plugin on the Plugins Tab.

Use the JRebel 6 Agent instead of the Legacy that is selected by default.

We are almost there, now you need to make sure the following:
You must have a rebel.xml file for each java project you configured on the Projects tab above, that file must be something like this:

JRebel will reload your .properties files on your ATG installation inside nucleus server, and in order to make that happen, instead of going and changing those on the atg installation you can just point your project to fileSync the files with your atg Installation.

Once these Steps are done, now you can go and change components on the fly without have to Restart, like create new property, no method or inject new component, the only thing that you need to do is make sure you change both your .properties file and your java class, so JRebel redeploys the configuration for the component.

I'll upload a video if these steps in action as soon as I have time.

Enjoy JRebel running on your ATG installation!

Very Important Note:
Make sure that your project is a java project and also does not have build-path errors, otherwise the auto-compile will not work, so your classes will not be deployed.

If you want to try JRebel, just email at to get a trail license for free.

Special Thanks to JRebel team that helped me out on setting my ATG environment to work correctly.

Thursday, March 24, 2016

atg.process.ProcessException: Unknown segment "main" in process /Common/commonWorkflow.wdl (ATG Oracle Commerce)

This issue happens for all the workflows, not just for commonWorkflow.wdl atg.process.ProcessException: Unknown segment "main" in process

When this happen BCC will not be able to display the workflows and you BCC home page will be something like this:

This happens due /atg/epub/workflow/process/WorkflowProcessManager/ does not have well defineda Process Editor Server:

this can be done by adding the PES as follows:

Very Important Note: Do not use localhost, use the serverName instead.

This needs to be deployed in the same path, I did it at server layer on my atg installation /opt/ATG/ATG10.1.2/home/servers/bcc/localconfig/atg/epub/workflow/process , do it where it fits best for your project.

 The server-name will contian the host and the drpPort The Drp port can be found at /dyn/admin/nucleus/atg/dynamo/Configuration/?propertyName=drpPort

When the server starts with the correct configuration for the PES (Process Editior Server) the Unknown segment "main" in process /Common/commonWorkflow.wdl Exception will not happen anymore, and BCC home page will work as usual.

 I hope this helps you to fix the issue.
Special Thanks to Andres Martinez who is the BCC King!

Monday, March 7, 2016

How To Know which Oracle version is running (Oracle)

If you want to know which the exact Oracle Database version is running, you can find this by running the following query:


This will give you the installed version details.

Is very useful when you are requesting support from oracle, they will ask for this, or when you are connected to a database but do not know details about it.

The details about this are here.

Friday, March 4, 2016

javac error on /dyn/admin (ATG Oracle Commerce)

Today happened that I was creating a vm and installing atg on it, and I ran into the following issue:

unable to access the dyn/admin homepage

And the solution there is basically make the /dyn/admin use javac inside /dynamo server

I did the steps, which basically are to set the following property:


At the following components:


However the issue changed to be:

08:27:58,803 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/dyn/admin].[AdminProxyServlet]] (http-/ JBWEB000236: Servlet.service() for servlet AdminProxyServlet threw exception: java.lang.NoClassDefFoundError: com/sun/tools/javac/Main

Due using different compiler and jar file was missing:

Oracle gives the solution below at Accessing Dynamo Admin Fails With Error: java.lang.NoClassDefFoundError: com/sun/tools/javac/Main (Doc ID 1943579.1)

Add the JDK's tools.jar library to the CLASSPATH environment variable of your application server's JVM. The tools.jar file can be found in your JDK's lib directory, for example: C:\jdk1.7.0_60\lib\tools.jar.
Refer to your application server documentation for additional information on the steps required to add this library to the CLASSPATH.

As easy as that,  I hope this helps you with this odd issue.

    Monday, February 15, 2016

    Promotion based on Payment Method (ATG Oracle Commerce) ATG11.1

    As you know The Promotion engine is powerful and it let you create advanced promotions with the Advanced Promotion template.

    This template let you use the order and shipping properties to create the promotion.
    However OOTB there is not a way to get a promotion based on the Payment Method, and the reason is due the order can have more than one, in order to make this happen you need to do some changes.

    Let's say we want to create a promo to the users that use paypal, or the ones that use visa.

    The steps to make this happen are here:

    First you need to extend the atg.commerce.order.OrderImpl Class, which is very common when you are doing custom changes to the order definition, and create a method to return the paymentType used on the order.

    Then that new class needs to be registered on /atg/commerce/order/OrderTools component as follows:

    This is pretty standard order extend customization, however the trick is that the changes we are doing need to be deployed into BCC instance otherwise we won't be able to see the new property paymentType displayed on this advanced Promotion template.

    And as you see there is no need to extend orderRepoistory.xml since this is a derived property.

    If everything above is done correctly you will be able to see all the properties inside your OrderImpl bean displayed as options in the Advanced promotion template.

    No need to change QualifierService or anything else to make this promo work.

    All of this is documented at, here mention that you need to extend orderRepository.xml and the reason is becuase this is a generic example, since our payment type can be calculated we did not have to extend the orderRepository.

    Friday, February 12, 2016

    jvm arg to make StackTrace be smaller (java)

    There is an easy way to make JVM to log smaller stack trace in most of the cases the stack trace have the most useful information in the very first few lines, so there is no need to print it all.
    Also printing the complete stack trace will make bigger logs on you server.

    Just need to add the following XX arg to your jvm:


    The depth depends on you, I made it 5, but it can be what you want, the default is 1024.

    And the results will be as the below image:

    Here is the definition of this XX arg:

    MaxJavaStackTraceDepthMax. no. of lines in the stack trace for Java exceptions (0 means all).
    With Java > 1.6, value 0 really means 0. value -1 or any negative number must be specified to print all the stack (tested with 1.6.0_22, 1.7.0 on Windows).
    With Java <= 1.5, value 0 means everything, JVM chokes on negative number (tested with 1.5.0_22 on Windows).

    And you can find a list of all the XX args that can be added to jvm:

    Saturday, January 9, 2016

    Better Dyn Admin (ATG Oracle Commerce)

    Let's give it a try
    On Firefox

    Install Greasemonkey extension
    Go to this url :
    Accept installation
    Go to a dyn admin page and enjoy :)
    If you're not happy with BDA behaviour, you can simply disable it by clicking on the monkey head of Greasemonkey.

    On Google Chrome

    Install Tampermonkey extension
    Go to this url :
    Accept installation
    Go to a dyn admin page and enjoy :)

    Credits: Jean-Charles MANOURY