Little ATG annoyances

March 27, 2007

I’m a complete ATG newbie. So perhaps some stuff is due to my inexperience, but things which seem odd to me:

Eclipse ATG plugin

When doing the New ATG Module in Eclipse a manifest is created with

ATG-Required: DAS DPS DSS DAS

There is a double DAS entry there.

ACC

I missed the create J2EE application under the ACC. It seems this is only available if you use DAS. Since I’m using JBoss, this is not available. Why is this?

More items are missing in the ACC. Well the ACC is going the way of the mammoth I guess.

Dynamusic

Positive: It seems that Dynamusic from Developing ATG Applications is going to work. The Solid SQL script creating the Dynamusic tables was accepted by MySQL (after removing the drop statements). At least the first chapter worked. Although you have to use Eclipse in stead of the ACC.


ATG, JBoss and MySQL on Mac OS X

March 25, 2007

Since Mac OS X is not a platform supported by ATG , installation can be… a bit troublesome. Everything ATG related is hard to find with Google so I decided to write this down. This is the installation of the ATG 2006.3 version.

At the end perhaps not everything is necessary, but the result works for me.

I found a lot of tips on Nabble by qmnonic . Thanks for sharing

<EDIT on June 15, 2007>

Steps 7, 8 and 9 are not necessary. So you can skip them

</EDIT>

Pre installation

  • Have jboss-4.0.3SP1 ready. This is the only version supported by ATG.
  • Have MySQL ready. Only 5.0.20 is supported. However I have used 5.0.27 and so far it seems to be working fine. Make sure you use the InnoDB engine instead of the MyISAM. If you don’t, prepare for the infamous 1000 characters unique key problem. I found this on Nabble. Further integration of MySQL and JBoss is described below. However I used an O’Reilly article: JBoss and MySQL
  • Take care of your permissions.
  • Add export JBOSS_HOME=< your JBOSS path here> to .bash_login. If you use another shell, you know what to do.

Installation and configuration

  1. Download the unix installer ATG2006.3.bin and install ATG. Your life will be easier if you do not use the default space.
  2. Drop your license files in <ATG folder>/home/localconfig
  3. Add Darwin to <ATG folder>/home/bin/DynamoEnv.sh as explained in ATG SolutionID atg33147 as follows:
    1. Add: DARWIN_OSDIR_NAME=”Darwin”
    2. Add: elif [ $UNIXFLAVOR = Darwin ]
      then
      OSDIRNAME=$DARWIN_OSDIR_NAME
  4. Added dasEnv.sh to <ATG folder>/home/localconfig/ with the next line
    export ATGJRE=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Commands/java as described on Nabble.
  5. Copy MySQL JDBC driver to <JBOSS_HOME>/server/atg/lib
  6. Add mysql-ds.xl to <JBOSS_HOME>/server/atg/deploy fill in the correct database name etc.
  7. Add MySqlDS datasource to standardjaws.xml as follows:
    <jaws>
    <datasource>java:/MySqlDS</datasource>
    <type-mapping>mySQL</type-mapping>
    </jaws>
  8. Edit standardjbosscmp-jdbc.xml (I guess this is not necessary, since it is for EJB’s. But better safe then sorry. I’ll remove it later to see if still works)
    <jbosscmp-jdbc>
    <defaults>
    <datasource>java:/MySqlDS</datasource>
    <datasource-mapping>mySQL</datasource-mapping>
    </defaults>
    </jbosscmp-jdbc>
  9. Add the following text to login-config.xml (Again I’m not sure is needed, I’ll check this later):
    <application-policy name = “MySqlDbRealm”>
    <authentication>
    <login-module code = “org.jboss.resource.security.ConfiguredIdentityLoginModule”
    flag = “required”>
    <module-option name =”principal”>sa</module-option>
    <module-option name =”userName”>sa</module-option>
    <module-option name =”password”></module-option>
    <module-option name =”managedConnectionFactoryName”>
    jboss.jca:service=LocalTxCM,name=MySqlDS
    </module-option>
    </login-module>
    </authentication>
    </application-policy>
  10. Create a file, like this: /<ATG_HOME>/home/localconfig/atg/dynamo/service/jdbc/JTDataSource.properties
    The ATG documentation states to create a jbossconfig folder with a change to a manifest to point to that path. I skipped that.
  11. Edit this JTDataSource.properties. It should contain:
    JNDIName=java:/MySqlDS
    and should NOT contain
    $class=atg.nucleus.JNDIReference
    This is wrong. error in ATG docs I guess. It results in classnotfoundexception in my case. Leaving it out seems to fix it?!
  12. Run datascripts
    /Applications/ATG 2006.3/DAS/sql/install/mysql/das_ddl.sql
    /Applications/ATG 2006.3/DPS/sql/install/mysql/dps_ddl.sql
    /Applications/ATG 2006.3/DSS/sql/install/mysql/dss_ddl.sql
    I used mysql <dbname> < dss_ddl.sql –user=<user> –password=<password>

After installation

Run by using the startDynamoOnJBOSS.sh script form <ATG_HOME>home/bin folder and use -c atg to use the atg server-config-name.

I sometimes had to delete the ATGDAF.ear from the Deploy folder and retry, when changing some configuration. It seems they are not always recopied.

These steps worked for me to get a basic Nucleus install where the ACC is working correctly.

Good luck