25-Jul-03 (Created: 25-Jul-03) | More in 'Howto'

How to debug when something goes wrong while painting an HTML screen that uses Aspire Tags?

Check your stack trace

When something goes wrong while painting a page, Aspire will throw an exception. This exception will show up either on the screen or in the aspire log file. The aspire log file can be found in the logs subdirectory. This file is usually named ai.log. A stack trace that indicates an error with "AITransformX" indicates that the painting process is in error.

Locate your html template

Locate the html template page that aspire is trying to paint. Some lines above the stack trace you will see the URL that is resulted in this stack trace. From the URL you can find out what is the html template file that is being used. You can look up the properties file to see what template this URL file is pointing to. The log file may also have the name of this template file directly. Most of the times you know the html template file with out this process because you are developing that page.

Double check your aspire tags on that page

Now you know the html template page. Most likely error is that the tags that are specified are in error. There are two types of tags in Aspire. Replacement tags, loop tags and if tags. Beginers usualy do not touch if tags. So I am not going to cover those tags here. The idea here is to check the syntax of these tags to see if they are in error.

Checking replacement tags

Replacement tags are usually inside of {{ and }}. Example: {{mykey}}. These tags can occur both inside and outside of loops. There is no space between {{ and }}. Usually it is the terminating ones that will cause exceptions.

Checking loop tags

These loop tags usually start with <!--RLF_TAG. Example <!--RLF_TAG BGN_LOOP loopname -->. There is no space preceeding RLF_TAG. Use spaces to separate words all the way down. There is only one space between the "loopname" and -->. Also check the end of this tag. The end tag looks like <!--RLF_TAG. Example <!--RLF_TAG END_LOOP loopname --> Another reason why this happens is because your loop name may not match the loop name in the properties file.

Dealing with duplicate property file entries

Occasionally you entries in the properties file gets duplicated. This can happen when you are doing cut and paste. So your URL may be pointing to two different html template files. In such case Aspire will pick up the last property file entry that matches the same name. Because of this make sure there are no duplicate entries in your properties files.

More support

Goto Aspire's home page and visit the support page for further help. On this page you can locate the aspire news group and send a message to the news group.