Notes by nogeek
Displaying keyword search results 1 - 8
Created by nogeek on November 17, 2011 14:30:28
Last update: November 17, 2011 14:30:28
CATALINA_HOME is the root directory where Tomcat is installed.
CATALINA_BASE is the same as CATALINA_HOME for single instance Tomcat configuration. For multiple instance configurations CATALINA_BASE is the root of that instance.
The startup script prints out the values of CATALINA_HOME and CATALINA_BASE at startup:
Using CATALINA_BASE: "C:\Apps\tomcat-7.0.22"
...
Created by nogeek on February 03, 2011 13:08:38
Last update: February 03, 2011 13:14:10
The log line was like this:
2011-01-19 15:16:34,842 INFO [STDOUT] (HDScanne... Note that INFO and timestamp were printed twice. Based on my configuration, I was expecting something like this: 2011-01-19 15:16:34,842 INFO [XmlWebApplicationC... i.e., the logger name should have been XmlWebApplicationContext , not STDOUT ! What was the problem? I found this error message in server.log : 2011-01-19 14:34:38,107 ERROR [STDERR] (main) lo... It turned out that org.apache.log4j.Appender was loaded by my web application class loader, whereas org.jboss.logging.appender.FileAppender was loaded by the JBoss bootstrap class loader. Removing the log4j jar from my web application archive fixed the problem (sine log4j is already available in JBoss). Why was the logger changed to STDOUT? JBoss detects that there's a problem with the log4j configuration and routes all...
Created by nogeek on December 31, 2010 13:02:23
Last update: December 31, 2010 13:03:27
The JBoss Microcontainer provides three StructureDeployer implementations out-of-the-box, with relativeOrder values defined for each:
DeclaredStructure: relativeOrder 0
JARStructure: relativeOrder 10000
FileStructure: relativeOrder Integer.MAX_VALUE
At deployment time, the StructureDeployer with lower relativeOrder will be consulted first to determine the structure of a deployment. This means that DeclaredStructure is always called first followed by JARStructure and finally FileStructure .
DeclaredStructure allows you to specify the structure of a deployment, including any nested deployments, using an XML file named jboss-structure.xml placed in the deployment's META-INF directory. For example, the following is jboss-structure.xml for jbossweb.sar , the JBoss Tomcat service:
<?xml version="1.0" encoding="UTF-8"?>
<structu...
Created by nogeek on December 31, 2010 12:41:05
Last update: December 31, 2010 12:41:05
The JBoss JARStructure class determines whether a deployment, in the form of a file or a directory, represents a packaged or unpackaged JAR archive. If the deployment is a single file then the filename suffix is checked against the following list. If the deployment is a directory then the same check is performed using the directory name. If a match is found in either case, then the deployment is considered a JAR archive. A top level directory is always considered an unpackaged JAR archive, even when the suffix does not match. .zip - a standard archive .jar - a java archive (defined by the Java SE specification) .ear - an enterprise archive (defined by the Java EE specification) .rar - a resource archive (defined by...
Created by nogeek on December 31, 2010 11:56:25
Last update: December 31, 2010 11:56:25
These are the steps to create a JBoss 5.1.0 configuration with Tomcat from the built-in minimal configuration. Change directory to $JBOSS_HOME/server . Make a copy of the minimal configuration.
cp -R minimal tomcatonly Copy bindingservice.beans from the default configuration. cp -R default/conf/bindingservice.beans tomcatonly... Copy login-config.xml from the default configuration. cp default/conf/login-config.xml tomcatonly/conf/ Edit tomcatonly/conf/jboss-service.xml : Add jars from the common/lib directory: <!-- Load all jars from the JBOSS_DIST/serv... Add the JAAS security manager section (copy from the default profile, and yes, JBoss tomcat can't live without the JBoss JAAS manager). <!-- JAAS security manager and realm mappin... Copy the Tomcat (JBoss web) deployer from the default configuration. cp -R default/deployers/jbossweb.deployer tomcaton... Copy metadata-deployer-jboss-beans.xml and security-deployer-jboss-beans.xml from the default profile. cp default/deployers/metadata-deployer-jboss-b... Copy...
Created by nogeek on November 11, 2010 22:48:50
Last update: December 27, 2010 08:28:42
I need to create a Tomcat only configuration for JBoss 3.2.7. These are the steps:
Copy the minimal configuration to new configuration:
cd $JBOSS_HOME/server
cp -R minimal tomcatonly
...
Copy tomcat service from the default configuration to the new configuration:
cp -R default/deploy/jbossweb-tomcat50.sar tomcato...
Edit jboss-tomcat50.sar/META-INF/jboss-service.xml , comment out SecurityManagerService :
<!-- A mapping to the server security manager serv...
and TransactionManager :
<!--
<depends>jboss:service=TransactionManager<...
Copy jbosssx.jar , jboss-j2ee.jar and jboss.jar from default/lib to tomcatonly/lib .
Edit tomcatonly/conf/jboss-service.xml , change port 1098, 1099 to 1100, 1101.
Edit tomcatonly/deploy/jbossweb-tomcat50.sar/server.xml , change port 8080 to 8081; change port 8009 to 8010.
Start new configuration with:
bin/run.sh -c tomcatonly
Created by nogeek on November 11, 2010 23:58:24
Last update: November 11, 2010 23:59:24
After all I needed basic authentication for my Tomcat service running in JBoss. These are the steps to add the JBoss authentication service.
Edit jboss-tomcat50.sar/WETA-INF/jboss-service.xml , make sure SecurityManagerService is not commented out:
<!-- A mapping to the server security manager ...
Copy jboss-jaas.jar from the default config:
cp server/default/lib/jboss-jaas.jar server/myserv...
Add this section to server/myserver/conf/jboss-service.xml
<!-- ======================================...
Created by nogeek on November 04, 2010 20:00:15
Last update: November 05, 2010 14:38:43
Following are some bugs in the Xalan jar shipped with JBoss 5.1.0 GA and JBoss 6.0. The Xalan jar file is located in jboss-5.1.0.GA/lib/endorsed ( %JBOSS_HOME%/common/lib for JBoss 6.0).
Test xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
...
Test xsl:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xs...
XSLT Java code:
import org.w3c.dom.*;
import javax.xml.parsers....
DateUtil.java
import java.util.Date;
public class DateUti...
XSLT output:
Transformer Factory class: class org.apache.xalan....
Apparently, the output is wrong. The string "A test event" should not have been displayed.