212014Oct

Creating ATG Module From Scratch (without cim configuration)

Creating new atg project in eclipse is always a bummer for ATG beginners (was also for me). So here it is simply described how to create an ATG module from scratch.

Prerequiste

  • JDK7
  • ATG11.1
  • JBoss6+
  • Oracle 11G
  • Eclipse With Installed ATG Plugin

After getting all the required software installed open the eclispe and go with the screenshots listed below.

Click File -> New -> New ATG Module

atgm1

Make sure your project location is ATG root directory where ATG is installed.

atgm2

Click Next.

atgm3

By default DAS, DPS, DSS modules are included as they are base for any ATG module.

Configuration Directory is the folder where all your components reside.

Click Next.

atgm4

Click Next.

atgm5

Click Finish.

You have successfully created a new ATG module. You can check your new module in ATG root folder.

As we have seen there are three base modules DAS, DPS, DSS that are necessary for ATG application so we database configuration to get these modules running.

Database Configuration :-

  • Login Oracle
  • Create a new user
  • Grant permissions to that user
  • Login with new user
  • Run the following commands

SQL:>@<ATG_ROOT>\DAS\sql\install\oracle\das_ddl.sql

SQL:>@<ATG_ROOT>\DPS\sql\install\oracle\dps_ddl.sql

SQL:>@<ATG_ROOT>\DSS\sql\install\oracle\dss_ddl.sql

Configuring JBoss server :-

  • Go to <JBOSS_HOME>\standalone\configuration
  • make a copy of standalone.xml
  • name it MyStore.xml and open it in notepad++
  • find the string “urn:jboss:domain:datasources
  • remove the default datasource configuration and change as shown below

We have given MyStoreDs as datasource name in datasource cnfiguration so we have to configure this datasource in ATG. Follow following steps to configure MyStoreDs.

  • Go to:  <ATG_ROOT>\home\localconfig\atg\dynamo
  • Create following folder structure \service\jdbc
  • Create DirectJTDatasource.properties with the following properties

    Now we are done with all configurations, so now we assemble the application and deploy it in JBoss.
  • Open command prompt and go to this location <ATG_ROOT>\home\bin
  • run the following command

runAssembler <JBOSS_HOME>\standalone\deployments\MyStore\Mystore.ear -m MyStore

Copy the ojdbc6.jar in the MyStore folder created in JBoss deployment folder.

Run the Jboss server with the configuration file we have created MyStore.xml. GGo to JBOSS_HOME>\bin and run the following command.b<JBOSS_HOME>\bin and run the following command.

standalone.bat –server-config=MyStore.xml -b 0.0.0.0

Go to browser and open http://localhost:8089/mystore and index.jsp will render on your browser. Here /mystore is the context root we have given while making module in eclipse.

Note :- Port no will vary so to verify go to Mystore.xml check http port there and you can also change it to desired port no.

  • asdsad

    very good artical

  • Himanshu Aggarwal

    Hello,
    The article is pretty nice but I need a little help from you as to how should I setup the XML file for MYSQL Databases.

  • Swati Ghai

    SQL:>@DASsqlinstalloracledas_ddl.sql
    SQL:>@DPSsqlinstalloracledps_ddl.sql
    SQL:>@DSSsqlinstalloracledss_ddl.sqlnd
    am not able to understand where to run this…please ellaborate more

    • Login Oracle
      Create a new user
      Grant permissions to that user
      Login with new user
      Run the following commands

      As written above login to oracle using “sqlplus” command on “cmd” and follow above step only on cmd

      • Swati Ghai

        I am getting this error after running jboss with this command standalone.bat -server-config=MyStore1.xml -b 0.0.0.0 as you told JBAS015801: Invalid option ‘ûserver-config=MyStore1.xml’

        • It is because of special character. Paste it in text editor and remove “-” and again type “-“

          • Swati Ghai

            Thanks alot

    • what you exactly want to do ?

  • Swati Ghai

    also It would be very great if you can provide me , deployment with cim

  • Swati Ghai

    Hi,it is deploying my ojdbc but it is not deploying my mystore.xml

  • Swati Ghai

    hiii,please reply after the last step am getting this error in server logs——–ERROR [nucleusNamespace.atg.dynamo.server.RmiInitialization] (ServerService Thread Pool — 70) null: java.net.SocketException: factory already defined

  • Swati Ghai

    ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation (“add”) failed – address: ([(“interfa
    ce” => “public”)]) – failure description: “JBAS014692: Invalid address ${jboss.bind.address:127.0.0.1} (0.0.0.)”……..please help

  • Nash

    I have followed the above steps but im getting a WARN in my jboss server(6.1-eap) log while starting up ,

    22:02:52,554 WARN [org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService$AS7DataSourceDeployer] (MSC service thread 1-7) IJ020016: Missing element. XA recovery disabled for: java:/MyStoreDs