Tag: JBoss
Tweets for 2010-01 and 2010-02
by Frank Kim on Feb.28, 2010, under Miscellaneous
Ruby on Rails
- Numeric data types and zerofill. Explains what all those int(11) columns are in your Ruby on Rails tables. http://bit.ly/9Tcf7q #
- undefined local variable or method "acts_as_list"? – Ruby Forum. Do ruby script/plugin install acts_as_list http://bit.ly/9kFWbG #
- ruby on rails : adding child records to an existing parent without visiting the parent – Stack Overflow http://bit.ly/cQiGSP #
- Multi-Table Inheritance in Rails – When two tables are one… This is not easy and I wish it was. http://bit.ly/9fbzgk #
- has_many :through – count vs length vs size. Use count if u don’t want to load the contents of association into memory. http://bit.ly/dtqXe1 #
- A gentle reminder about pluralizations. config/initializers/inflections.rb to customize pluralizations in Ruby on Rails http://bit.ly/bN9GO5 #
- Ruby on Rails – Rails Migrations Cheatsheet – Dizzy. Pretty helpful. http://bit.ly/9wNvRx #
- RailsGuides Migrations. Nice guide, especially about explaining the naming convention which I don’t like. http://bit.ly/cjZ7aB #
ATG
- Configuring ATG to Send Email via Comcast SMTP – betweenGo. Configuring your ATG app to use your ISP’s SMTP server. http://bit.ly/7M5bhx #
- Enabling non-XA Resources in JBoss 4.2 with ATG – betweenGo. http://bit.ly/aDN3Po #
- Combining XML in ATG – betweenGo. Combining XML files not as straight-forward as w/ properties files but more flexible. http://bit.ly/8kVwvA Jan 12 12:00 PM
Eclipse
- Debugging Applications in IBM Rational Application Developer. Page 12 for how to set up server for debugging. http://bit.ly/aaYUHb #
JavaScript
- How can I submit a form along with some parameters using JavaScript? (JSF forum at JavaRanch). Answer #3 was helpful. http://bit.ly/b17ymm #
JSP
- Testing Which Page Loaded your JSP Page Fragment – betweenGo. Simple enough to do w/ JSTL but I always forget how.
http://bit.ly/cEh7IZ #
Miscellaneous
- Cygwin 1.7.x, mounts and /etc/fstab – betweenGo. Mounts are no longer saved from session to session in Cygwin 1.7. http://bit.ly/bmaYEu #
- Git in 5 Minutes http://bit.ly/bSt3dd and Git for the lazy – Spheriki http://bit.ly/aefD17 #
- The Thing About Git. Nice article describing how flexible Git is, especially compared to SVN. I may never use SVN again http://bit.ly/bD0tuS #
- I use DreamHost and am shamelessly plugging them both for a referral and to try to win an iPad. Honestly they’re great. http://bit.ly/ctYv3Z #
Enabling non-XA Resources in JBoss 4.2 with ATG
by Frank Kim on Jan.28, 2010, under Configuration
(Photo: a dog and it’s boss by Pixel Addict)
ATG documents how to enable non-XA resources in JBoss 4.2 for SOLID. We ended up following the same instructions to work with Oracle.
JBoss Note: JBoss 4.2 by default assumes XA drivers, which some ATG applications use; however, there are no XA drivers for SOLID. To enable multiple non-XA resources in JBoss 4.2, add the property in bold text to the jbossjta-properties.xml file, under the <property depends="arjuna" name="jta"> tag:
<property depends="arjuna" name="jta"> <property name="com.arjuna.ats.jta.allowMultipleLastResources" value="true"/>You may still see warnings in your log file, but ATG applications will run correctly. To suppress these warnings, add the following to your jboss-log4j.xml file:
<category name="com.arjuna.atg.jta.logging"> <priority value="ERROR"/> </category>
For further reading please see Starting the SOLID SQL Database document in the Running Nucleus-Based Applications section of the ATG Installation and Configuration Guide.
Running JBoss with Oracle
by Frank Kim on Sep.28, 2009, under JBoss

(Photo: oracle by you are the atman)
Most commercial websites that use JBoss also use Oracle. To run JBoss with Oracle you simply need to tell JBoss where to find the Oracle JDBC drivers. To do this modify run.bat or run.sh and set the JBOSS_CLASSPATH to include the Oracle JDBC jar file before
set JBOSS_CLASSPATH=C:\oracle\product\10.2.0\db_1\jdbc\lib\ojdbc14.jar
I did this right before run.bat checks to see if JBOSS_CLASSPATH is empty.
rem If JBOSS_CLASSPATH or JAVAC_JAR is empty, don't include it, as this will rem result in including the local directory in the classpath, which makes rem error tracking harder. if not "%JAVAC_JAR%" == "" set RUNJAR=%JAVAC_JAR%;%RUNJAR% if "%JBOSS_CLASSPATH%" == "" set RUN_CLASSPATH=%RUNJAR% if "%RUN_CLASSPATH%" == "" set RUN_CLASSPATH=%JBOSS_CLASSPATH%;%RUNJAR%
After doing this you might need to tell your web application how to configure the data sources. I wrote a post about how to configure your data source for ATG web applications.
Microsoft Windows Vista Error 0×80070091 and Cygwin
by Frank Kim on Sep.25, 2009, under Windows
In Windows Vista I installed JBoss. When I then logged in as another user for some reason all the JBoss directories had no permissions, i.e. their permissions were 000. I ignored this and went ahead and copied one of the server directories. Then I tried to go into the copied server directory and could not.
Thinking something was funky I tried to delete the whole JBoss directory but got this maddening and uninformative window.

I googled for a long time but could not find a satisfying solution. I gave myself full control permissions for all files and folders but that did not help. Then I noticed that if I clicked on one of the directories that Windows Vista was not letting me delete I would be prompted for permission to enter this directory. Then I would repeat this process for all directories within. After doing this I could delete that directory.
I then looked in Cygwin and found out what Vista had done, it had simply given the directory read and write permission.
Therefore the simple solution was to do the following:
chmod -R 500 .
After doing that simple change I could remove everything.
betweenGo Consults with Cineplex to Release Latest Version of Online Store on ATG
by Frank Kim on Sep.01, 2009, under Consulting
On Monday, August 30 Cineplex launched the latest version of its store running on ATG 2007.1 and JBoss 4.0.5.GA.
betweenGo with Bell Canada was proud to be part of this release. betweenGo implemented the handling of gift cards and product bundles and other eCommerce features.
Specific features we implemented for gift cards and product bundles included:
- product listing
- search listing
- display in cart and throughout checkout
- handling of taxes and shipping costs
- promotions
- inventory status
- adding gift cards to the cart (required some JavaScript magic
Other features we implemented included:
- lightbox to display after login if user’s cart has been modified to include items from their last session
- fixed order transaction issues
betweenGo was proud to be part of this enjoyable project. If you need expert ATG consulting please contact us.
Debug ATG running on JBoss with Eclipse
by Frank Kim on Jul.27, 2009, under Programming
With Eclipse debugging an ATG application running on JBoss is fairly straightforward.
- Configure JBoss to start up with Java options for debugging.
On UNIX you do this by uncommenting this line in <JBoss>/bin/run.conf.
#JAVA_OPTS="$JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y"
On Windows you do this by uncommenting this line in <JBoss>/bin/run.bat.
rem set JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y %JAVA_OPTS%
- Create a remote Java application debug configuration using the port you specified in step 1. The default port is 8787.
For further reading please see Debugging Nucleus components in JBoss with Eclipse or Remote Debugging with Eclipse. There is also a very complete tutorial from O’Reilly Media called Configuring Eclipse for Remote Debugging.
NameNotFoundExceptions during start up of ATG application on JBoss
by Frank Kim on Jul.21, 2009, under Configuration
When you start up your ATG application on JBoss and see NameNotFoundExceptions like the following it could be because you did not configure your ATG datasources correctly.
Unable to start service "/atg/dynamo/service/jdbc/JTDataSource": atg.nucleus.ServiceException: Unable to resolve reference to JNDI component: java:/atgcore_ds ERROR [nucleusNamespace.atg.dynamo.service.jdbc.JTDataSource] javax.naming.NameNotFoundException: atgcore_ds not bound
To properly configure it create an atg-oracle-ds.xml file. I have a sample one below. atgcore_ds is the datasource for most of the ATG repositories. You will probably need to configure datasources for Catalog A and Catalog B if you are doing eCommerce, e.g. atgcataloga_ds and atgcatalogb_ds. The atg-oracle-ds.xml file will go into your server’s configuration, e.g. <jboss>/server/betweengo/deploy.
<?xml version="1.0" encoding="UTF-8"?> <datasources> <local-tx-datasource> <jndi-name>atgcore_ds</jndi-name> <!-- <connection-url>jdbc:oracle:oci:@Dynamo</connection-url> --> <connection-url>jdbc:oracle:thin:@localhost:1521:orcl</connection-url> <driver-class>oracle.jdbc.driver.OracleDriver</driver-class> <user-name>foo</user-name> <password>bar</password> <min-pool-size>1</min-pool-size> <max-pool-size>4</max-pool-size> </local-tx-datasource> </datasources>
Note that the connection URL should be the same as what you configured in your tnsnames.ora file. If you installed Oracle with a Microsoft Loopback Adapter and pointed the host in your tnsnames.ora configuration to the loopback connection, e.g. 192.168.1.200, then you should do the same in your atg-oracle-ds.xml file.
For further reading please see Getting Started with ATG – jBoss and Oracle and Create Additional JBoss Application Server Configurations.
Create Additional JBoss Application Server Configurations
by Frank Kim on Jul.20, 2009, under JBoss
I thought to create an additional JBoss application server configuration one would have to use some kind of administration tool.
It turned out to be much simpler.
cp -R server/default server/betweengo
If you want to create an ATG application server configuration you can do this.
cp -R server/atg server/betweengo
The only difference between the default server configuration and the atg server configuration is that the latter has two additional datasource XML files for communicating with the SOLID database.
atg/deploy/atg-apps-solid-ds.xml atg/deploy/atg-solid-ds.xml
For further reading please see JBoss configurations to run an application (need active ATG support contract to see this document) or Building Your Own JBoss Configuration or Using JBoss Application Server.
Recurring Illegal Access Errors in JBoss when running ATG
by Frank Kim on Jul.14, 2009, under Configuration
I recently installed ATG 2007.1 with no patches on JBoss 4.0.5.GA. When I started it up I continually saw these illegal access errors.
16:01:24,296 INFO [WebappClassLoader] Illegal access: this web application instance has been stopped already. Could not load org.apache.log4j.Level.
The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1241)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1201)
at org.apache.commons.logging.impl.Log4jProxy$1.run(Log4jProxy.java:66)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.commons.logging.impl.Log4jProxy.threadContextClassLoader(Log4jProxy.java:88)
at org.apache.commons.logging.impl.Log4jProxy.(Log4jProxy.java:94)
at org.apache.commons.logging.impl.Log4JLogger.(Log4JLogger.java:39)
at sun.reflect.GeneratedConstructorAccessor22.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:372)
at atg.nucleus.logging.commons.CommonsLoggingLogListener.logEvent(CommonsLoggingLogListener.java:106)
at atg.nucleus.GenericService.sendLogEvent(GenericService.java:291)
at atg.nucleus.GenericService.logInfo(GenericService.java:737)
at atg.nucleus.GenericService.logInfo(GenericService.java:715)
at atg.ui.j2edit.model.CachingJ2eeArchiveDirectoryAgent.updateCacheData(CachingJ2eeArchiveDirectoryAgent.java:513)
at atg.ui.j2edit.model.CachingJ2eeArchiveDirectoryAgent.performScheduledTask(CachingJ2eeArchiveDirectoryAgent.java:573)
at atg.service.scheduler.ScheduledJob.runJobs(ScheduledJob.java:441)
at atg.service.scheduler.Scheduler$2handler.run(Scheduler.java:760)
Fortunately this is a common problem and there are many support incidents about it. Problem Report #144586 says that the problem occurs if:
- say “Yes” to deploying Quincy Fund during installation
- use startDynamoOnJBoss to run any other application
The work around is to remove Quincy Funds.ear from the JBoss deployment directory. Or just don’t install Quincy Funds.
If you need to run the Quincy Funds demo then the Error running Quincy Funds demo on JBoss document suggests:
- stop the server
- delete the ATGDAF.ear from the JBoss installation
- start JBoss with the run.bat|sh command; the Quincy Funds demo is automatically started
For further reading please see How to use the startDynamoOnJBOSS script and JBoss configurations to run an application. You may need to have an active ATG support contract to view these and other ATG support documents referenced in this article.
HTTP Proxy
by Frank Kim on Apr.16, 2009, under Web
Recently I was having a problem where a Flash video was not being displayed. It turned out the Flash video had not been created properly and had a dependency on other Flash files that were not available. When I was viewing this Flash video directly using JBoss I did not see any errors. But when I viewed it using Apache the logs showed the dependency problems.
Another developer, Allan Scott, suggested next time I use Charles or Fiddler as HTTP proxies.
Did you try watching the HTTP traffic with a tool like Fiddler or Charles?
If there is a dependency on something and it failed to download it then you should be able to see the 404 or some other error.


