Installing Oracle Commerce 11.1 with Commerce Reference Store

Installing Oracle Commerce 11.1 with Commerce Reference Store

The Commerce Reference Store (CRS) is an important part of Oracle Commerce/ATG because it is a fully functional implementation that is rich in features, and a reference for how to do things for many projects. I originally wrote a blog post on installing CRS with ATG 10, but thought I’d make an update for ATG 11.1. With Endeca thrown into the mix, it has certainly gotten more complicated, but also easier in a way because of the large Endeca community.

I’d highly recommend battling through the installation of the whole stack by yourself if you’re looking to learn more about the fundamentals of Oracle Commerce/ATG. If not, continue on and I’ll hopefully make this as painless as possible.

Tips before starting:

  • Plan on at least half of a day to do this. One working day is more realistic. If you’re new to the platform, plan on a few days of struggle.
  • Take extra time to verify functionality of the individual pieces we setup before moving on. You need to have 100% confidence before adding more layers on.
  • Don’t be afraid to reference the Oracle documentation for this setup.

We’re going to install everything on a prebuilt Linux VM released by Oracle. You can get better performance by building one yourself from a clean Linux distro, however using a prebuilt VM saves time. Below is an overview of what’s being installed.

Name Location
JDK 1.7.0_55 /opt/java/jdk1.7.0_55
JBoss 6.1 EAP /opt/jboss/jboss-eap-6.1
Endeca MDEX 6.5.1 /opt/endeca/MDEX
Endeca Tools & Frameworks 11.1 /opt/endeca/ToolsAndFrameworks
Endeca Platform Services 11.1 /opt/endeca/PlatformServices
Endeca CAS 11.1 /opt/endeca/CAS
ATG 11.1 /opt/atg/ATG11.1
CRS 11.1 /opt/atg/ATG11.1/CommerceReferenceStore

Everything is installed under the Oracle user and stems from the /opt directory.

Prerequisite Steps

1. Download and install VirtualBox and 7zip if you do not already have them.

2. You’re also going to need JBoss 6.1 EAP version. I can’t provide this. If you can’t find the EAP version, the community releases should work, but I can’t guarantee. You could also use a different application server, but then a few steps in this document won’t work.

3. Next, download this prebuilt Oracle VM. We only care about having Oracle Database 11g installed, since it’s a pain to install it yourself. Obviously this isn’t ideal, but it will work to get your feet wet with the whole Oracle Commerce/ATG installation process.

4. Stitch up the VM using 7zip and double click the resulting .ova file to import it into VirtualBox.

5. Once imported, open up the settings for the VM, go to the “Shared Folders” tab and add a folder in.

 

I’m adding my local ATG folder and will be referencing it for the rest of this post. All files we download will also be placed into this folder. They can be accessed on the VM in the directory /media/sf_ATG.

6. Now navigate to the “Network” tab, then click “port forwarding”. These ports on the guest (the VM) are forwarded out to the host (your PC), which allow the host to access services from the guest. Add/remove the ports until you get what’s shown below.

 

7. Start VM and login with oracle/oracle. The root password is also oracle. There’s an overview of the VM here.

Note: You should also be able to ssh into the VM using the command:

ssh oracle -p 2222 localhost

8. Once started and the desktop launched, navigate to Applications > Oracle Database 11g Express Edition > Run SQL Command Line:

connect system/welcome1

EXEC DBMS_XDB.SETHTTPPORT(0);

8. By default Oracle Database has a service on port 8080, which we will use for our JBoss server. We will move it to a different (invalid) port (credit from here).

9.Finally shutdown/startup the database using the options in the menu.

JDK Installation

Download JDK 1.7.0_55 for the 64 bit Linux platform from here. I unzipped it before transferring into the VM.

su – root

mkdir /opt/java

cp -R /media/sf_ATG/jdk1.7.0_55 /opt/java

chown oracle -R /opt/java/

JBoss Installation

JBoss is really easy, you just copy the JBoss folder into it’s new home:

su – root

mkdir /opt/jboss

unzip /media/sf_ATG/jboss-eap-6.1.0.zip -d /opt/jboss

chown oracle -R /opt/jboss

Endeca Installation

Head over to edelivery.oracle.com and download the following software for the Linux 64 bit platform:

  • Oracle Commerce MDEX Engine 6.5.1 for Linux
  • Oracle Commerce Guided Search Platform Services 11.1 for Linux
  • Oracle Commerce Experience Manager Tools and Frameworks 11.1 for Linux
  • Oracle Commerce Content Acquisition System 11.1 for Linux

Installing Oracle Commerce 11.1 with Commerce Reference Store-3 KEEP

We want to install everything under the Oracle user in this VM. Run these to get the installation directory setup:

su – root

mkdir /opt

chown -R oracle /opt

Installing MDEX

su – root

unzip /media/sf_ATG/V46002-01.zip -d /opt

chown oracle /opt/OCmdex6.5.1-Linux64_829811.sh

exit (back to oracle user)

sh /opt/OCmdex6.5.1-Linux64_829811.sh –target /opt

It should be painless to install. Afterwards, run this to set the proper environment variables to a shell file we’ll use when starting/stopping Endeca.

echo ‘source /opt/endeca/MDEX/6.5.1/mdex_setup_sh.ini’ >> ~/endeca-env.sh

source ~/endeca-env.sh

The recommended method is to add this into your ~/.bash_profile file, however I prefer to keep these variables outside of the user, because it can get complicated if another version of Endeca is added to the user down the road. I will do the same with a file named atg-env.sh for ATG a bit later on.

Installing Platform Services

su – root

unzip /media/sf_ATG/V45999-01.zip -d /opt

chown oracle /opt/OCplatformservices11.1.0-Linux64.bin

exit (back to oracle user)

/opt/OCplayformservices11.1.0-Linux64.bin –target /opt

  • Oracle Guided Search HTTP Service port: 8888
  • Shutdown port: 8090
  • Choose Y for EAC
  • Use /opt/endeca/MDEX/6.5.1 for the MDEX engine path
  • Choose N for the reference implementation

After you’re done, run:

echo ‘source /opt/endeca/PlatformServices/workspace/setup/installer_sh.ini’ >> ~/endeca-env.sh

Installing Experience Manager

For the Experience Manager installation, refer to this document if you have any troubles. Experience manager is a bit different to install than others.

su – root

unzip /media/sf_ATG/V46389-01.zip -d /home/oracle/Desktop

chown oracle -R /home/oracle/Desktop/cd

mkdir /u01/app/oraInventory

chown oracle -R /u01/app/oraInventory

From the desktop, navigate to the cd/Disk1/install folder and double click the runInstaller executable.

Click through. Do the complete installation option. Specify /opt/endeca/ToolsAndFrameworks as the home directory when prompted.

After the installation, run:

su – root

sh /u01/app/oraInventory/orainstRoot.sh

exit (back to oracle)

echo ‘export ENDECA_TOOLS_ROOT=/opt/endeca/ToolsAndFrameworks/11.1.0’ >> ~/endeca-env.sh

echo ‘export ENDECA_TOOLS_CONF=$ENDECA_TOOLS_ROOT/server/workspace’ >> ~/endeca-env.sh

Installing Content Acquisition System (CAS)

su – root

unzip /media/sf_ATG/V46393-01.zip -d /opt/

chown oracle /opt/OCcas11.1.0-Linux64.sh

exit (back to oracle user)

sh /opt/OCcas11.1.0-Linux64.sh –target /opt

Use these installation values (the defaults):

  • CAS port: 8500,
  • Shutdown port: 8506,
  • CAS hostname: localhost.

It should be painless.

Verifying Endeca Installation

The Endeca installation is now complete, but we should test it before moving forward. Follow the steps listed later in this document to provision and deploy a basic Endeca application.

You should be able to click the facets on the left to narrow down the search, as well as click on the products. If this does not work, do not continue until you’ve fixed it.

ATG Installation

Once again, head on over to edelivery.oracle.com and download the following software for the Linux 64 bit platform:

  • Oracle Commerce Platform 11.1 for UNIX
  • Oracle Commerce Reference Store 11.1 for UNIX

 

su – root

mkdir /opt/atg

chown oracle -R /opt/atg

unzip /media/sf_ATG/V46005-01.zip -d /opt

chown oracle /opt/OCPlatform11.1.bin

exit (back to oracle)

/opt/OCPlatform11.1.bin

  • Products to install: 1,2,3,4 (there should be 6, select everything except Motorprise and Quincy Funds)
  • Use /opt/atg/ATG11.1 as the installation folder
  • Select JBoss as the application server
  • JBoss Home: /opt/jboss/jboss-eap-6.1
  • JDK Home: /opt/java/jdk1.7.0_55
  • JBoss port: 8080
  • RMI port: 8860

After installation, make a file named ~/atg-env.sh that has these contents. Then run source ~/atg-env.sh to place those variables into your current shell session.

CRS Installation

su – root

unzip /media/sf_ATG/V46007-01.zip -d /opt

chown oracle /opt/OCReferenceStore11.1.bin

exit (back to oracle)

/opt/OCReferenceStore11.1.bin

Ensure it’s getting installed into /opt/atg/ATG11.1 and take all the defaults. It shouldn’t be a problem.

Next, we need to make the two database schemas required for CRS. You can do this from sqlplus as we did earlier to change the Oracle process listening on port 8080, or you can use sqlplus, which I prefer. Anyway, use these connection details:

 

Once in, run the following:

create user crs11_core identified by crs11_core;

create user crs11_pub identified by crs11_pub;

grant connect, resource, dba to crs11_core, crs11_pub;

commit;

Oracle Commerce/ATG almost always has two database catalog schemas, plus one called core that contains things like user data and order info. In this setup, we’re going to combine these three schemas into a single one to take some complexion out of the setup process.

Important:

After the database is ready, we need to get a driver for the Oracle Database. Download ojdbc6.jar here, and copy it into /opt/atg. Be sure the Oracle user has full permissions on it.

Finally, create the Apps directory for the new CRS app that we’ll make:

mkdir /opt/endeca/Apps

Next, run CIM using:

source ~/atg-env.sh

sh $DYNAMO_HOME/bin/cim.sh

Steps through the CRS installation:

  • Choose “Product Selection” and the 9th option for only Commerce Reference Store. This option includes the necessary dependencies.
  • Addons: None
  • Demo Apps: None
  • Choose non-switching datasource
  • Index by sku
  • Setup databases:
  • The ending database URL should be jdbc:oracle:thin:@localhost:1521:xe
  • Production uses crs11_core
  • Publishing uses crs11_pub
  • Specify ojdbc6.jar for the driver
  • Then do the schema creation and data imports
  • Despite what CIM says, you can skip the OPSS Security configuration
  • Create the publishing JBoss server
  • Ports should be +100, meaning all ports are +100 of the standard JBoss configuration
  • Create the production JBoss server, accepting the defaults
  • Along with the production server, choose option D to provision the endeca application
  • With Experience Manager Preview
  • App deployment path: /opt/endeca/Apps
  • CAS Path: /opt/endeca/CAS/11.1.0
  • User segment server port: 8180
  • Oracle Wallet jps-config.xml: /opt/endeca/ToolsAndFrameworks/11.1.0/server/workspace/credential_store/jps-config.xml
  • Tools and Frameworks: /opt/endeca/ToolsAndFrameworks/11.1.0
  • MDEX: /opt/endeca/MDEX/6.5.1
  • Platform Services: /opt/endeca/PlatformServices/11.1.0
  • Then deploy the endeca app. See troubleshooting at the end for help if it doesn’t work.
  • Assemble and deploy the application

At this point, CRS is configured and should start correctly. You can start each server by calling:

source ~/atg-env.sh

sh /opt/jboss/jboss-eap-6.1/bin/standalone.sh –server-config=atg_publishing_lockserver.xml -b 0.0.0.0

sh /opt/jboss/jboss-eap-6.1/bin/standalone.sh –server-config=atg_production_lockserver.xml -b 0.0.0.0

Verify that the BCC comes up and that you can login. Also, verify that the storefront has a clean log and you can access it. The store will look empty because we haven’t yet deployed some assets over from the publishing schema.

Deploying Fresh Content

When you initially do the CRS installation, some assets require a deployment from the publishing instance over to the storefront. You don’t have to do this, but you’ll have very limited CRS storefront data.

Make sure the store is also started. Login to the BCC at localhost:8180/atg/bcc using admin / <your password>.

Follow these steps from the CRS 11.1 installation documentation exactly.

This will probably not work the first time, and you’re probably on your own to figure out what’s wrong. See the troubleshooting section below for some help.

After the content has been deployed, an index should be kicked off. You can view the index status by going to http://localhost:8080/dyn/admin/nucleus/atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin/.

You can also kick off a new index here by clicking “Baseline Index”.

Installing Oracle Commerce 11.1 with Commerce Reference Store-7 KEEP

Afterwards, no matter if you did an index manually or from the BCC full deployment, run the following:

sh /opt/endeca/endeca/Apps/CRS/control/promote_content.sh

Do not do this until the index is 100% successful. If all went well, you should be able to navigate to localhost:8080/crs and successfully search for an item. I would also recommend doing a checkout, just to ensure that side of things is functional.

At this point, you’ve successfully setup Oracle Commerce 11.1 (ATG 11.1 + Endeca 11.1) as well as the Commerce Reference Store. In the next post, we’ll be walking through the steps to setup the native iOS app.

Troubleshooting and Extra Help

I ran through this setup twice on my own to make sure my instructions actually worked. I ran into quite a lot of issues. Here are the biggest problems you might face:

Database Space Issues

You may run into some errors complaining about insufficient tablespace sizes. This means that the tablespace for the schema we’re trying to insert into has insufficient space.

You can run:

select file_name, bytes, maxbytes from dba_data_files;

To get a listing of these files, and how full they are crs11_core and crs11_pub should write to system.bdf.

To expand system.bdf, run:

alter database datafile ‘/u01/app/oracle/oradata/XE/system.dbf’ autoextend on maxsize

2048M;

This will expand the tablespace as needed to a max of 2gb (previously it was ~600mb).

Dyn/admin Password Invalid

I can’t remember if I fat-fingered the production dyn/admin password, but it suddenly stopped working for me halfway through the installation. This can be fixed by assembling the application with the Admin.Reset module.

This can be added from CIM in the Application Assembly & Deployment section for the production server.

Endeca Problems

I’m fairly new to Endeca, and certainly had many Endeca problems. They stemmed from 2 issues:

1. Not provisioning the CRS Endeca app correctly from CIM

It’s really picky to get the app to import correctly (especially if you’ve imported it and deleted it once before). After doing this a few times, I came up with this script to help remove the CRS app entirely so that it can be retried.

2. Endeca is not running

You should be 100% sure that all parts of Endeca are running before doing almost everything in the post. You can start the various parts of Endeca using:

Platform Services:

/opt/endeca/endeca/PlatformServices/11.1.0/tools/server/bin/startup.sh

Tools & Frameworks (workbench):

/opt/oracle/endeca/ToolsAndFrameworks/11.1.0/server/bin/startup.sh

Experience Manager:

/opt/endeca/PlatformServices/11.1.0/tools/server/bin/startup.sh

CAS:

/opt/endeca/endeca/CAS/11.1.0/bin/cas-service.sh

Although now I prefer to just start the workbench, then login and manually turn the other services on.

Port Reference

All port configurations mentioned here take the default values, except:

  • The ATG publishing instance should have ports +100 in value than normal, because you can’t run production and publishing at the same time if they’re on the same port set
  • The Endeca user segment server should have port 8180

18 Comments

  1. Seng Leong 6 years ago

    Above mentioned “In the next post, we’ll be walking through the steps to setup the native iOS app.”, but I cannot find the next post. Can you please post the link?

  2. tim 6 years ago

    What are the steps to : provision and deploy a basic Endeca application? I can’t figure this out based on your post.

  3. tim 5 years ago

    I tried following your tutorial, but when I run cim.sh I get this error:
    Error occurred during initialization of VM
    java/lang/NoClassDefFoundError: java/lang/Object

    I posted my full issue here:
    https://community.oracle.com/message/12997291#12997291

    Any help is appreciated

  4. Peter Goetsch 5 years ago

    Tim,

    I’m not familiar with that specific error, but after some research, it sounds like an error of your JDK installation.

    I’d suggest trying to unpack rt.jar, as discussed here: http://stackoverflow.com/a/14480193/1046744

    Make sure after calling source ~/atg-env.sh that you can call “java -version” and it works correctly.

    Hope this helps.
    Peter

  5. André 5 years ago

    Hi
    I also tried just to install the reference store, but until now I didn’t get it working. I tried to do nearly the same as you described in this article, but I got some strange errors while importing initial data into database via CIM:
    https://community.oracle.com/message/13018709
    some of the errors i could eliminate by changing the language of my host system to en_EN … 😀
    If you have any suggestion to this thread.. you are welcome 🙂

    KR André

  6. Zeeshan 5 years ago

    I think you can give the exact URL for the jdk which is now as following.
    http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html#jdk-7u55-oth-JPR
    The users should download the ” Linux x64 131.82 MB jdk-7u55-linux-x64.tar.gz” file.

    ZT.

  7. Elena 5 years ago

    Thank you, Zeeshan! We have updated the link.

  8. Ramesh 5 years ago

    Please let me know what are the steps to be done while migrating Endeca 3.1.2 to 11.1 in the java application level . We are using CRS and what are the changes to be done in the java application

  9. Kishore 5 years ago

    Hi,

    Can you let us know the contents we need use in (atg-env.sh) file.
    I could’t found any information on this blog.. what are the files we need to place in (atg-env.sh) file.

    Thanks
    Kishore

  10. Peter Goetsch 5 years ago

    Kishhore,

    The contents of atg-env.sh should be:

    #!/bin/sh
    export JDK_HOME=/opt/java/jdk1.7.0_55
    export JAVA_HOME=$JDK_HOME
    export JBOSS_HOME=/opt/jboss/jboss-eap-6.1
    export DYNAMO_ROOT=/opt/atg/ATG11.1
    export DYNAMO_HOME=$DYNAMO_ROOT/home
    export ATGJRE=$JDK_HOME/bin/java

  11. Peter Goetsch 5 years ago

    Ramesh,

    We currently don’t have the steps formally written up for the endeca 11.1 migration. Perhaps in a future blog post we can cover that task.

  12. cristianValdes 5 years ago

    hello
    please can you tell me the technical specifications of the machine to lift a development environment

  13. Peter Goetsch 5 years ago

    Cristian,

    You need a decent processor and I’d suggest 16gb ram. Most higher-end laptops now days will fit those requirements. It really depends how fast you want to work. I’ve seen people pull up an ATG environment on a stock macbook air, it just wasn’t the fastest.

  14. Guillermo 4 years ago

    hello

    At the point of installin the CRS, at Create the publishing JBoss server, show me a couple of options im not sure how to fill.

    At CIM MAIN MENU
    [1] Database Configuration – Done
    *[2] Configure OPSS Security
    [3] Server Instance Configuration
    [4] Application Assembly & Deployment
    [R] Set the Administrator Password – Done
    [P] Product Selection – Done (Oracle Commerce Platform-Guided Search
    Integration & Oracle Commerce Reference Store & Content Administration &
    Oracle Commerce Site Administration)
    [A] Select Application Server – Done (JBoss)
    [C] Custom CIM Plugin Launcher

    Select 3

    0 Instances Configured

    *[P] Publishing Server – 0 Instances Configured
    [S] Production Server – 0 Instances Configured
    [D] Done

    Select P

    [P] Publishing Server General Configuration – REQUIRED

    P

    An then show me to fields not sure about:

    Enter Production Lock Server Hostname >
    and
    Enter the Fully-qualified Workbench Hostname, Including Domain >

    Thanks for the help

  15. Peter Goetsch 4 years ago

    Hi Guillermo,

    You can use localhost for both. If that does not work, please let me know.

  16. Gururaj Kulkarni 4 years ago

    Hi Peter Goetsch,

    This is the one i was looking for from 1-2 days….thanks for great article with detailed steps to build a CRS VM.
    Could you please help me with instructions to build VM for 11.2 CSA?

    Regards,
    Guru

    • Peter Goetsch 4 years ago

      Hello Gururaj,

      I have not yet setup CSA on 11.2. If or when we create another installation guide like this, I will consider including the CSA piece too.

      Best Regards,
      Peter

Leave a reply

Your email address will not be published. Required fields are marked *

*