Fixing ACC “Preview site using profile” on Mac OS X

April 11, 2007

The Preview Site Using Profile functionality from the ACC does not work out of the box on Mac OS X. This is functionality which is really nice to have so you can preview the JSP page with a specific profile.

Because we are using the Linux installer on Mac OS X, I was unsure how the browser was started when you pressed preview. I did a global grep and noticed the containing the script to start the browser. This contains code to either startup Mozilla or Netscape. This will not work of course. So we need to change this. However before this can be done another step is needed.

Firefox new instance

Starting Firefox from the command line will not work if Firefox is already started. If somebody knows a way to open an already started Firefox with an URL I would really like to know.

Unknown to most people, but you can start Firefox for a second time with another Firefox profile.

To create a Firefox profile I did the folowing:

ls <firefox path>/

./firefox -Profilemanager
And created a new firefox profile. I named mine atg.


Then I altered the and added the following line

/<firefox path>/ -p atg ${1}

And behold: It just works™

JBoss startup errors

April 9, 2007

Finally I got around to remove some errors which were visible during JBoss ATG startup.

One of them was:
FATAL [JspServletOptions] The scratchDir you specified: ……… is unusable (or something along that line)

This one is solved by setting the permissions correctly. A chown will solve this. I guess you won’t see such an error on Windows..

The other one was a [URLDeploymentScanner] Incomplete Deployment listing on jboss-xa-jdbc.rar.
I have no idea how to get rid of that one, but since I won’t be doing Distributed datasource there is actually no problem….I think.


Got rid of that one also. Somehow a jboss-xa-jdbc.rar folder folder was inside the deploy folder of JBoss. Yes a folder with folder in the name. Removing that one solved the problem. (of course you have to keep the jboss-xa-jdbc.rar there)

JBoss logging and ATG

April 8, 2007

I’m describing the obvious I guess. However it took me longer than expected. So for the occasional clueless (like me in 2 months time when I forgot this)

The Dynamusic 🙂 examples use console logging with debug message type. However if you use JBoss, setting in DAS will not help you…..

JBoss logging is configured with log4j.xml in the atg server configuration. The entry:
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="Target" value="System.out"/>
<param name="Threshold" value="INFO"/>
<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] Message\n -->
<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>

Has loglevel INFO. So debug statements will not pass through. At first I thought to create a nucleus category with priority DEBUG. I haven’t looked it up in the Log4j docs, but it seems it is not possible to set logging priorities lower than the appender threshold. Sounds logical…

So changing the threshold

<param name="Threshold" value="DEBUG"/>

Will get the ATG debug statements through the console.


<category name="org.jboss">
<priority value="INFO"/>

Keeps all those JBoss debug statements out.

MySQL preference pane

April 5, 2007

When using the MySQL preference pane to start and stop MySQL on my Mac, I was not quickly able to find which script was actually run. This was not configurable. Find and grep did not help me.

It seems that the prefpane goes to /usr/local/mysql/support-files/mysql.server and does a start and stop

Since I use a couple of MySQL versions, setting your symbolic link becomes really important.