|
This is just to drop a line, letting others know
what I needed to do to get Jetspeed to work properly.
Hopefully it might help others. Some stuff is
common sense. Others are source changes to avoid uneccessary
errors.
--- START ---
This is a brief explanation of how I got Jetspeed and Turbine to work with JDK 1.2.2 (Blackdown Distribution, also Sun JDK) and Tomcat 3.1M1. It is VERY important that the user which tomcat is
configured to run as has full permissions to the JAR files which are being
used, and that all jar files are in the classpath.
Be sure that java is configured to use NATIVE
THREADS.
When GREEN THREADS
where used the following error
occured:
Exception: java.lang.NullPointerException Stack Trace follows: java.lang.NullPointerException at org.apache.jetspeed.cache.memory.PortletCache.getCacheable(PortletCache.java, Compiled Code) at org.apache.jetspeed.portal.factory.PortletFactory.getPortlet(PortletFactory.java, Compiled Code) at org.apache.jetspeed.portal.factory.PortletFactory.getPortlet(PortletFactory.java:566) at org.apache.jetspeed.portal.factory.PortletFactory.getPortlets(PortletFactory.java:460) at org.apache.jetspeed.portal.factory.PortletFactory.getPortlets(PortletFactory.java:295) at org.apache.jetspeed.turbine.screens.Home.build(Home.java:120) Also, be sure that the most recent versions of the
helper libraries are installed. I have had several problems that where related
to changes in the libraries between builds. Without CHANGES files included with
the distributions, it's very hard to know which is the better version. If you
insist on getting the BLEEDING edge of code, be sure that ALL code used is based
on the same build.
One of the major problems was with castor libraries. Updating to the latest fixed several problems related to fetching the feeds. First.. configuring Turbine:
If you get the following exception, You'll need the source to re-compile: java.lang.NoSuchMethodError:
org.apache.turbine.util.Log: method error(Ljava/lang/Exception;)Z not
found
in org.apache.turbine.util.Log.java copy the log
method which accepts Throwable as an argument as well as the method that accepts
a String and Throwable. Change the copied methodsw to accept an Exception
instead of the Throwable argument. There's no good reason why it shouldn't work
out of the box, but this seems to fix this problem.
This is optional, but it removes the annoying
nullpointerexceptions when starting turbine without a log file, and stops
isValid from being true if the TurbineResources was either not specified, or not
found..
Next, in the static init section, there is some logic that, I think, should be switched around to avoid anoying and uneccessary exceptions. (Any dev guys wanna
implement?)
Change the method to the following: private
static void init()
{ isValid = false; // Safe to always assume false. // Don't even bother trying if no logfile specified. if (TurbineResources.getString("logfile")!=null) { try { logfile = new FileWriter( TurbineResources.getString("logfile"), true ); isValid = true; // true if everything succeeded and returned normally. } catch (Exception e) { e.printStackTrace();
}
} } Copy the content folder from the jetspeed src
dorectory to the html root directory.
Next, configure jetspeed config files to reflect
the locations of the other config files, as well as the location of the content
folder.
With tomcat, I elected to create a seperate context
for the content folder so that I was sure that there would not be any problems
if I added Cocoon to the root context for other purposes.
Configure the cocoon config files.
Now, if all above have benn completed, and all of
the jar files that are needed are in Tomcat's lib directory, everything should
work.
goto Tomcat's bin directory and start it up:
tomcat.sh start
--- END ---
|
