CRS#007 - Create & Deploy new ATG Module on local from scratch - Part III

ATG's Commerce Reference Store already has a list of module which it uses for assembly and deployment. We have to add our new module MyCustomProject on the top of the default CRS module list. 

4. Adding module on top of CRS

a. Open "cmd" as Administrator.
b. Navigate to DYNAMO_HOME/bin. [command: cd %DYNAMO_HOME%/bin]
c. Start cim utility [command: cim.bat]
d. This will start the cim utility.
e. Once it is started, and you can see the menu, press "3" for Server Instance Configuration, and press enter. It will give you a server selection, something like below:-

f. Select the option for Production Server (whatever shows on your screen), and press Enter.
g. Press "C" for Modify Calculated List.
h. Press "A" for Add a Custom Module
i. Enter the name of your custom module, enter MyCustomProject, which we created in previous articles. Press Enter.

j. Next, CIM will ask for entering the location of your module. Chose whatever is the last number on your list. For me, it shows "17". Enter that number and press Enter.
k. CIM will display a the module list under "Current Module List". Make sure your module MyCustomProject is placed last. See below screenshot.

l. Press "D" and press enter.
m. It will come back to the previous menu. Press "O" for Configure another instance type, and press Enter. Next, press "D" for Done and press Enter.

n. The screen will come back to the main menu.

NOTE: The above steps are ONLY for adding a new module to existing list. You dont have to do all the steps above every time. These steps must be repeated ONLY when you create a new module.

5. Deploying the application

Start CIM if it is not already runnning. [Use Steps 4-a,b and c above]
a. Make sure your weblogic "ADMIN" server is running.
b. Press "4" for Application Assembly and Deployment.
c. Next, select the option for atg_production_lockserver.
d. CIM will display the ear name [atg_production_lockserver]. Press ENTER directly

d. System will again display a list of all the modules. Make sure your module (MyCustomProject) is present at the end of the list.

e. Press "D" for Deploy Production with Server Lock Manager, and press Enter.

f. If your Weblogic Admin is running, your EAR will be created without errors and the system will come back to the same menu. Check the logs on the CIM screen carefully. It should not have any errors. See below screenshot.

g. Now, your production EAR has been successfully deployed.

NOTE: Now that your module is added to the list, whenever you make changes to your code within this module (MyCustomProject), you have to repeat these steps.

6. Starting the Servers

a. Open "cmd" as Administrator.
b. Navigate to your weblogic domains directory.
[command: cd D:/Oracle/Middleware/domains/atg11/bin]
c. Use the startManagedWebLogic.cmd followed by the server name to start the production server. [command: startManagedWebLogic.cmd atg_production_lockserver]
d. This will start your server.
e. Once your server is started, hit the URL: http://localhost:7003/myWebApp
f. This should open a sample JSP (this is automatically created in the module by eclipse)
Your screen should display like this.

g. Now, open the dyn/admin. [http://localhost:7003/dyn/admin].
h. Login using admin/Welcome1 for first dialogue box, weblogic/Welcome1 for second dialogue box.
h. Go to Component Browser --> Search --> Type MyFirstComponent --> Press Enter
i. Your result should be displayed like this:-

j. This means that your component has been instantiated.
h. Click on this link, and see the "age" and "name" properties with the values you entered in your properties.

Now, you have successfully deployed your custom module. 
Whenever you make any changes in the code, you can skip the Step "4" and jump directly to step "5" and then "6"
Next, we will see how we can create .bat files for automating the startup.


  1. Hi,

    I have tried the same steps given above for custom module but it is not working for me. New custom module is coming in ear file but not able to access.
    Please help me asap.

    1. Try re-deploying the application. Make sure WEBLOGIC instance is running while you are deploying.
      Also, Endeca server should be running when you are starting your server.
      If there are any errors in the logs, you can mail me, and i will look into it.

    2. Thanks Monis, it works for me
      Can you please mail me on below id the steps through which i can import CRS application into eclipse and customize the Estore code and Storefront code with build and deploy?


    3. Hi Ajay, i will write a separate article for this. Stay tuned.

  2. Hi

    Now it is coming but components are not coming then i checked in ear it is not taking .class file of my created component. Will i need to make any changes in build.xml of our new module? or something else.


    1. Open your eclipse, Go to Project -> Clean
      Again, Go to Project -> Build Automatically (should be ticked)

      This will auto-create class files as you write your java files into the \bin folder. It is from the bin folder, your class files are picked and packed into EAR.

  3. Hi Monis,
    For me hitting http://localhost:7003/myWebAppis giving 404 error. Also I am not able to search Component in Dyn admin. Any Help

    1. This means, your app is not deployed correctly.
      Please go to WEBLOGIC_HOME\domains\atg11\servers\atg_production_lockserver\stage\atg_production_lockserver.ear\atg_production_lockserver.ear\atglib

      Make sure, the folder of your custom project is created here. If not, you need to re-deploy your application. [Please close this folder before doing so]

    2. Hi Monis,
      Folder is not present at the mentioned location. I redeployed. It showed same thing on console as shown in ur screenshot but i dont think that it is getting deployed. Is there any problem with the weblogic server.

    3. There is no problem with your Weblogic Server. Your application is simply not deployed correctly.
      1. Restart your weblogic server
      2. Re-deploy your application using CIM.
      Make sure your Module is added in the module list as done in STEP 4. If your module is not added, it will not come up in your ATG Application.

    4. Still its not coming. My Module name is also present in module list in Step 4. And there are no errors on CIM while deploying.

  4. Getting following error, after following all above steps. I'm using JBoss and OracleXE. Please help me out, thanks in advance

    ERROR [nucleusNamespace.atg.dynamo.service.jdbc.DirectJTDataSource] (ServerService Thread Pool -- 68) Failed to resolve java:/ATGProductionDS: javax.naming.NameNotFoundException: ATGProductionDS -- service

    1. This means that the JNDI name for datasource which ATG knows (ATGProductionDS) is different from the JNDI Datasource defined in your jboss. I am not an expert in JBOSS, but my best guess is check your jboss-service.xml, which your datasources are defined.

  5. Hi,
    Is it possible to write batch files for adding module to ATG Environment & deploying the application ?if possible means Can you please help me to write these batch files or otherwise please post batch file having steps with explanation.

    Thanks in advance

    1. Yes, it is possible. runAssembler.bat/sh is the command which takes the module names as arguments. You can add your module here using a batch script.
      You can read more here:



Get All The Latest Updates Delivered Straight Into Your Inbox For Free!