<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>sebthom.de</title>
	<atom:link href="http://sebthom.de/feed/" rel="self" type="application/rss+xml" />
	<link>http://sebthom.de</link>
	<description>IT Freelancer - Java, J2EE, IBM WebSphere Portal, Lotus Notes/Domino</description>
	<lastBuildDate>Sun, 14 Mar 2010 14:10:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Installing Tomcat 6 on Debian Squeeze</title>
		<link>http://sebthom.de/142-installing-tomcat-6-debian-squeeze/</link>
		<comments>http://sebthom.de/142-installing-tomcat-6-debian-squeeze/#comments</comments>
		<pubDate>Sat, 13 Mar 2010 16:07:35 +0000</pubDate>
		<dc:creator>Sebastian Thomschke</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[port 80]]></category>
		<category><![CDATA[port forwarding]]></category>
		<category><![CDATA[quercus]]></category>
		<category><![CDATA[tomcat]]></category>
		<category><![CDATA[vhost]]></category>
		<category><![CDATA[virtual servers]]></category>
		<category><![CDATA[VPS]]></category>
		<category><![CDATA[xinetd]]></category>

		<guid isPermaLink="false">http://sebthom.de/?p=142</guid>
		<description><![CDATA[     <link rel="alternate" type="application/atom+xml" title="sebthom.de Category: Java" href="http://sebthom.de/category/it/development/java-coding/feed/" />
     <link rel="alternate" type="application/atom+xml" title="sebthom.de Category: Linux" href="http://sebthom.de/category/it/linux/feed/" />
This post describes how to setup Tomcat 6 on Debian Squeeze. The configured Tomcat serves requests on port 80 without the need of an additional web server. This is especially good for virtual servers (VPS) providing limit memory. It also has multiple virtual hosts configured, each with it&#8217;s own webapp with context root / and [...]]]></description>
			<content:encoded><![CDATA[<p>This post describes how to setup Tomcat 6 on Debian Squeeze. The configured Tomcat serves requests on port 80 without the need of an additional web server. This is especially good for virtual servers (VPS) providing limit memory. It also has multiple virtual hosts configured, each with it&#8217;s own webapp with context root / and optional support for PHP via the Quercus PHP implementation.</p>
<h3>Installing Sun Java 6</h3>
<p>Ensure the non-free section is enabled for the APT repository configuration in /etc/apt/sources.list, e.g. &#8220;deb http://ftp.de.debian.org/debian testing main contrib non-free&#8221;</p>
<pre name="code" class="php">
apt-get update
apt-get install sun-java6-jdk
echo 'JAVA_HOME="/usr/lib/jvm/java-6-sun"' >> /etc/environment
echo 'JRE_HOME="/usr/lib/jvm/java-6-sun/jre"' >> /etc/environment
</pre>
<h3>Installing Tomcat 6</h3>
<pre  name="code" class="php">
apt-get install tomcat6 tomcat6-admin
/etc/init.d/tomcat6 stop
</pre>
<h3>Creating standard Tomcat directory layout</h3>
<pre name="code" class="php">
mkdir /opt/tomcat
cd /opt/tomcat
ln -s /etc/tomcat6/ conf
ln -s /usr/share/tomcat6/bin/ bin
ln -s /usr/share/tomcat6/lib/ lib
ln -s /var/lib/tomcat6/webapps webapps
ln -s /var/log/tomcat6/ logs
</pre>
<h3>Creating a Tomcat admin user</h3>
<p>In /opt/tomcat/conf/tomcat-users.xml add an entry like:</p>
<pre name="code" class="xml">
&lt;user name="ADMIN_USERNAME" password="ADMIN_PASSWORD" roles="admin,manager" /&gt;
</pre>
<h3>Setting up virtual hosts</h3>
<p>For each virtual host execute the following command. Replace &#8220;mydomain.com&#8221; with the desired virtual host name, but omit the &#8220;www.&#8221; part.</p>
<pre name="code" class="php">
mkdir -p /opt/tomcat/webapps.mydomain.com/ROOT
</pre>
<p>In the &lt;Engine&gt; tag of &#8220;/opt/tomcat/conf/server.xml&#8221; add one host entry for each virtual host.</p>
<pre name="code" class="xml">
&lt;Host name="mydomain.com" appBase="/opt/tomcat/webapps.mydomain.com"&gt;
    &lt;Alias&gt;www.mydomain.com&gt;/Alias&gt;
    &lt;Valve className="org.apache.catalina.valves.AccessLogValve" prefix="mydomain_access_log." suffix=".txt" pattern="common"/&gt;
&lt;/Host&gt;
</pre>
<p>The &lt;Alias&gt; tag tells Tomcat to redirect from www.mydomain.com to mydomain.com.<br />
The &lt;Valve&gt; tag enables access logging in the standard logging format.</p>
<h3>Using xinetd to configure port 80 for Tomcat</h3>
<p>Binding a service on port 80 requires root permissions. Thus we use port forwarding to &#8220;bind&#8221; Tomcat to port 80. My VPS does not support the use of &#8220;iptables -j REDIRECT&#8221; therefore I am using xinetd as a web proxy.<br />
Ensure that no other service is listening on port 80/443:</p>
<pre name="code" class="php">
netstat -pan | grep ":80\|:443"
</pre>
<p>Register the required xinetd services:</p>
<pre name="code" class="php">
echo echo "
service www
{
        socket_type     = stream
        protocol        = tcp
        user            = root
        wait            = no
        bind            = 88.80.198.181
        port            = 80
        redirect        = localhost 8080
        disable         = no
        flags           = REUSE
        log_type        = FILE /var/log/wwwaccess.log
        log_on_success  -= PID HOST DURATION EXIT

        per_source      = UNLIMITED
        instances       = UNLIMITED
}

service https
{
        socket_type     = stream
        protocol        = tcp
        user            = root
        wait            = no
        bind            = 88.80.198.181
        port            = 443
        redirect        = localhost 8443
        disable         = no
        flags           = REUSE
        log_type        = FILE /var/log/httpsaccess.log
        log_on_success  -= PID HOST DURATION EXIT

        per_source      = UNLIMITED
        instances       = UNLIMITED
}
" > /etc/init.d/tomcat
/etc/init.d/xinetd restart
</pre>
<p>If you want to use a different service name, e.g. &#8220;tomcat&#8221; instead of &#8220;www&#8221; you must add this service to /var/services, e.g. &#8220;tomcat 80/tcp&#8221;<br />
In /opt/tomcat/conf/server.xml modify the &lt;Connector&gt; as follows:</p>
<pre name="code" class="xml">
&lt;Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" proxyPort="80" address="127.0.0.1" /&gt;
</pre>
<p>This binds Tomcat to localhost. It also tells Tomcat that port 80 is the proxy port which is necessary for correct URL generation.<br />
From now on the Tomcat admin applications are only accessible via localhost. You can use SSH port forwarding to still access the applications from your workstation&#8217;s web browser. E.g. if you are using <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html">PuTTY</a> you can use this command line option &#8220;-L 8080:localhost:8080&#8243; to forward the server&#8217;s local 8080 port to your workstation&#8217;s local 8080 port. On your workstation&#8217;s browser you then simply enter <a href="http://localhost:8080/manager/html">http://localhost:8080/manager/html</a> and are connected to the server&#8217;s Tomcat admin application.</p>
<h3>Enabling PHP support (optional)</h3>
<p>Download <a href="http://quercus.caucho.com/">Quercus</a>.</p>
<pre name="code" class="php">
mkdir -p /opt/downloads
wget -o /opt/downloads/quercus-4.0.3.war http://caucho.com/download/quercus-4.0.3.war
</pre>
<p>Install Quercus as a shared library.</p>
<pre name="code" class="php">
unzip -j /opt/downloads/quercus-4.0.3.war \*.jar -d /opt/tomcat/lib
</pre>
<p>Enable PHP support for the virtual hosts by installing the quercus web.xml. For each virtual host execute:</p>
<pre name="code" class="php">
unzip /opt/downloads/quercus-4.0.3.war *web.xml -d /opt/tomcat/webapps.mydomain.com/ROOT
</pre>
<h3>Starting Tomcat</h3>
<pre name="code" class="php">
/etc/init.d/tomcat start
</pre>
<h3>References</h3>
<ul>
<li><a href="http://www.ibm.com/developerworks/java/library/l-secjav.html#h5">Securing Linux for Java services: The port dilemma</a>
<li><a href="http://ruleoftech.com/journal/redirecting-http-and-https-traffic-to-tomcats-ports">Redirect HTTP and HTTPS traffic to Tomcat&#8217;s ports</a>
<li><a href="http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html">Tomcat 6: Virtual Hosting How To</a>
<li><a href="http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html">Tomcat 6: Classloader How To</a>
<li><a href="http://www.ex-parrot.com/pete/tomcat-vhost.html">Virtual Hosting with Tomcat</a>
<li><a href="http://wiki.caucho.com/Quercus:_Tomcat">Quercus: Tomcat</a>
<li><a href="http://www.ubuntugeek.com/how-to-install-tomcat-6-on-ubuntu-9-04-jaunty.html">How to install Tomcat 6 on Ubuntu 9.04 (Jaunty)</a>
</ul>
 <img src="http://sebthom.de/wp-content/plugins/feed-statistics.php?view=1&post_id=142" width="1" height="1" style="display: none;" /><hr />
<p><small>&copy; sebthom for <a href="http://sebthom.de">sebthom.de</a>, 2010. |
<a href="http://sebthom.de/142-installing-tomcat-6-debian-squeeze/">Permalink</a> |
<a href="http://sebthom.de/142-installing-tomcat-6-debian-squeeze/#comments">No comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://sebthom.de/142-installing-tomcat-6-debian-squeeze/&amp;title=Installing Tomcat 6 on Debian Squeeze">del.icio.us</a>
<br/>
Post tags: <a href="http://sebthom.de/tag/java/" rel="nofollow tag">Java</a>, <a href="http://sebthom.de/tag/php/" rel="nofollow tag">PHP</a>, <a href="http://sebthom.de/tag/port-80/" rel="nofollow tag">port 80</a>, <a href="http://sebthom.de/tag/port-forwarding/" rel="nofollow tag">port forwarding</a>, <a href="http://sebthom.de/tag/quercus/" rel="nofollow tag">quercus</a>, <a href="http://sebthom.de/tag/tomcat/" rel="nofollow tag">tomcat</a>, <a href="http://sebthom.de/tag/vhost/" rel="nofollow tag">vhost</a>, <a href="http://sebthom.de/tag/virtual-servers/" rel="nofollow tag">virtual servers</a>, <a href="http://sebthom.de/tag/vps/" rel="nofollow tag">VPS</a>, <a href="http://sebthom.de/tag/xinetd/" rel="nofollow tag">xinetd</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://sebthom.de/142-installing-tomcat-6-debian-squeeze/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Leveraging PyDev&#8217;s auto completion for indirectly created objects</title>
		<link>http://sebthom.de/140-leveraging-pydevs-auto-completion-indirectly-created-objects/</link>
		<comments>http://sebthom.de/140-leveraging-pydevs-auto-completion-indirectly-created-objects/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 23:29:00 +0000</pubDate>
		<dc:creator>Sebastian Thomschke</dc:creator>
				<category><![CDATA[Jython]]></category>
		<category><![CDATA[pydev]]></category>
		<category><![CDATA[pydoc]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[rtype]]></category>

		<guid isPermaLink="false">http://sebthom.de/?p=140</guid>
		<description><![CDATA[This is just a quick tip how to enable auto completion in PyDev for indirectly created objects. 
By default, PyDev has no problems in presenting you the possible object attributes and methods on a variable if that variable gets a new object instance assigned directly in the code. 
For example, when you first type &#8230;
mybook [...]]]></description>
			<content:encoded><![CDATA[<p>This is just a quick tip how to enable auto completion in <a href="http://pydev.org">PyDev</a> for indirectly created objects. </p>
<p>By default, PyDev has no problems in presenting you the possible object attributes and methods on a variable if that variable gets a new object instance assigned directly in the code. </p>
<p>For example, when you first type &#8230;</p>
<pre name="code" class="python">mybook = Book()</pre>
<p>&#8230; and in the next line you enter &#8230;</p>
<pre name="code" class="python">mybook.</pre>
<p>&#8230; PyDev will dutifully present you the statically declared features for the Book class in a popup.</p>
<p>If you however get that Book instance as the result of another method, e.g. &#8230;</p>
<pre name="code" class="python">mybook = bookstore.findBook("foobar")</pre>
<p>&#8230; PyDev currently seems to be helpless. </p>
<p>Because of Python&#8217;s dynamic nature it is of course a bit harder for an IDE to figure out what kind of objects may a method. But PyDev could for example honor the @return / @rtype <a href="http://epydoc.sourceforge.net/manual-epytext.html">PyDoc</a> annotations (which you can add to the findBook&#8217;s method declaration) but currently it just does not.</p>
<p>To still have autocompletion you have two options:</p>
<ol>
<li> Temporarily instantiate a Book object in the code.
<pre name="code" class="python">
mybook = Book()
mybook = bookstore.findBook("foobar")
mybook. #--> now you have auto completion
</pre>
<p>This has the drawback, that if you forget to remove the first line before you finish coding an unneccessary Book instance will be created on every execution during runtime.</p>
<li> Use an assertion to ensure that the mybook variable contains an object of type Book
<pre name="code" class="python">
mybook = bookstore.findBook("foobar")
assert isinstance(mybook, Book)
mybook. #--> now you have auto completion
</pre>
</ol>
 <img src="http://sebthom.de/wp-content/plugins/feed-statistics.php?view=1&post_id=140" width="1" height="1" style="display: none;" /><hr />
<p><small>&copy; sebthom for <a href="http://sebthom.de">sebthom.de</a>, 2010. |
<a href="http://sebthom.de/140-leveraging-pydevs-auto-completion-indirectly-created-objects/">Permalink</a> |
<a href="http://sebthom.de/140-leveraging-pydevs-auto-completion-indirectly-created-objects/#comments">No comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://sebthom.de/140-leveraging-pydevs-auto-completion-indirectly-created-objects/&amp;title=Leveraging PyDev&#8217;s auto completion for indirectly created objects">del.icio.us</a>
<br/>
Post tags: <a href="http://sebthom.de/tag/jython/" rel="nofollow tag">Jython</a>, <a href="http://sebthom.de/tag/pydev/" rel="nofollow tag">pydev</a>, <a href="http://sebthom.de/tag/pydoc/" rel="nofollow tag">pydoc</a>, <a href="http://sebthom.de/tag/python/" rel="nofollow tag">python</a>, <a href="http://sebthom.de/tag/rtype/" rel="nofollow tag">rtype</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://sebthom.de/140-leveraging-pydevs-auto-completion-indirectly-created-objects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OVal 1.40 released</title>
		<link>http://sebthom.de/139-oval-140-released/</link>
		<comments>http://sebthom.de/139-oval-140-released/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 20:42:38 +0000</pubDate>
		<dc:creator>Sebastian Thomschke</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://sebthom.de/?p=139</guid>
		<description><![CDATA[I am happy to announce the immediate availability of Version 1.40 OVal the Object Validation Framework for Java. This release fixes some minor issues and provides the following two new features:
1. Enabling/disabling constraints based on the object state:
Using the newly introduced when attribute for constraints it is possible to specify under which circumstances the constraint [...]]]></description>
			<content:encoded><![CDATA[<p>I am happy to announce the immediate availability of Version 1.40 OVal the Object Validation Framework for Java. This release fixes some minor issues and provides the following two new features:</p>
<p><b>1. Enabling/disabling constraints based on the object state:</b><br />
Using the newly introduced <i>when</i> attribute for constraints it is possible to specify under which circumstances the constraint will be considered during object validation. The <i>when</i> attribute holds a formula in one of the supported scripting languages. If the formula returns true, the constraint will be activated for the current validation cycle otherwise it is ignored. In the following example the alias attribute must have a value only when the name attribute is not set.</p>
<pre name="code" class="java">
public class User {
   private String name;

   @NotNull(when = "groovy:_this.name == null")
   private String alias;

   // . . .
}
</pre>
<p><b>2. Fine grain control over how constraints are applied on arrays, maps, collections and their elements</b><br />
The newly introduced attribute <i>appliesTo</i> allows you to specify if and how a constraint declared for a map, a collection or an array is applied to their elements as well or exclusively. See the following example how this works:</p>
<pre name="code" class="java">
public class BusinessObject {

   // the ids field may be null, but if it is not null
   // none of it's items must be null
   @NotNull(appliesTo = { ConstraintTarget.VALUES })
   private String[] ids;

   // only the field itself must not be null,
   // the list can contain null values
   @NotNull(appliesTo = { ConstraintTarget.CONTAINER })
   private List items;

   // the field must not be null as well as all keys
   // and values of the map
   @NotNull(appliesTo = { ConstraintTarget.CONTAINER, ConstraintTarget.KEYS, ConstraintTarget.VALUES })
   private Map itemsByGroup;

   // . . .
}
</pre>
<p><b>Download</b><br />
You can get the lates binaries and source files of OVal from here: http://sourceforge.net/projects/oval/files/</p>
 <img src="http://sebthom.de/wp-content/plugins/feed-statistics.php?view=1&post_id=139" width="1" height="1" style="display: none;" /><hr />
<p><small>&copy; sebthom for <a href="http://sebthom.de">sebthom.de</a>, 2009. |
<a href="http://sebthom.de/139-oval-140-released/">Permalink</a> |
<a href="http://sebthom.de/139-oval-140-released/#comments">No comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://sebthom.de/139-oval-140-released/&amp;title=OVal 1.40 released">del.icio.us</a>
<br/>
Post tags: <br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://sebthom.de/139-oval-140-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing WebSphere Portal in a local network</title>
		<link>http://sebthom.de/138-installing-websphere-portal-local-network/</link>
		<comments>http://sebthom.de/138-installing-websphere-portal-local-network/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 21:32:05 +0000</pubDate>
		<dc:creator>Sebastian Thomschke</dc:creator>
				<category><![CDATA[WebSphere Portal]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[websphere portal]]></category>
		<category><![CDATA[workaround]]></category>

		<guid isPermaLink="false">http://sebthom.de/?p=138</guid>
		<description><![CDATA[Recently I had to setup some WebSphere Portal 6.1 installations in VMWares within a private network. Unfortunately the portal installer aborted with the following message &#8220;EJPIC0067E: Portal requires a fully qualified host name that is recoganized by the DNS Server.&#8221; Even when adding the fully qualified hostname to the hosts file the installer may still [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I had to setup some WebSphere Portal 6.1 installations in VMWares within a private network. Unfortunately the portal installer aborted with the following message &#8220;EJPIC0067E: Portal requires a fully qualified host name that is recoganized by the DNS Server.&#8221; Even when adding the fully qualified hostname to the hosts file the installer may still fail with the same message.<br />
The workaround is to disable the hostname check by invoking the portal installer with the following parameter specified: <strong>-W nodeHost.active=&#8221;False&#8221;</strong>. You should however only do this for test or development installations.</p>
 <img src="http://sebthom.de/wp-content/plugins/feed-statistics.php?view=1&post_id=138" width="1" height="1" style="display: none;" /><hr />
<p><small>&copy; sebthom for <a href="http://sebthom.de">sebthom.de</a>, 2009. |
<a href="http://sebthom.de/138-installing-websphere-portal-local-network/">Permalink</a> |
<a href="http://sebthom.de/138-installing-websphere-portal-local-network/#comments">3 comments</a> |
Add to
<a href="http://del.icio.us/post?url=http://sebthom.de/138-installing-websphere-portal-local-network/&amp;title=Installing WebSphere Portal in a local network">del.icio.us</a>
<br/>
Post tags: <a href="http://sebthom.de/tag/deployment/" rel="nofollow tag">deployment</a>, <a href="http://sebthom.de/tag/websphere-portal/" rel="nofollow tag">websphere portal</a>, <a href="http://sebthom.de/tag/workaround/" rel="nofollow tag">workaround</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://sebthom.de/138-installing-websphere-portal-local-network/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Comparing version numbers in Jython / Python</title>
		<link>http://sebthom.de/136-comparing-version-numbers-in-jython-pytho/</link>
		<comments>http://sebthom.de/136-comparing-version-numbers-in-jython-pytho/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 23:03:57 +0000</pubDate>
		<dc:creator>Sebastian Thomschke</dc:creator>
				<category><![CDATA[Jython]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://sebthom.de/?p=136</guid>
		<description><![CDATA[Here comes a function to compare version numbers of e.g. Maven artifacts in Jython / Python.

import re

def cmpver(vA, vB):
    """
    Compares two version number strings
    @param vA: first version string to compare
    @param vB: second version string to compare
    @author [...]]]></description>
			<content:encoded><![CDATA[<p>Here comes a function to compare version numbers of e.g. Maven artifacts in Jython / Python.</p>
<pre name="code" class="python">
import re

def cmpver(vA, vB):
    """
    Compares two version number strings
    @param vA: first version string to compare
    @param vB: second version string to compare
    @author <a href="http://sebthom.de/">Sebastian Thomschke</a>
    @return negative if vA < vB, zero if vA == vB, positive if vA > vB.

    Examples:
    >>> cmpver("0", "1")
    -1
    >>> cmpver("1", "0")
    1
    >>> cmpver("1", "1")
    0
    >>> cmpver("1.0", "1.0")
    0
    >>> cmpver("1.0", "1")
    0
    >>> cmpver("1", "1.0")
    0
    >>> cmpver("1.1.0", "1.0.1")
    1
    >>> cmpver("1.0.1", "1.1.1")
    -1
    >>> cmpver("0.3-SNAPSHOT", "0.3")
    -1
    >>> cmpver("0.3", "0.3-SNAPSHOT")
    1
    >>> cmpver("1.3b", "1.3c")
    -1
    >>> cmpver("1.14b", "1.3c")
    1
    """
    if vA == vB: return 0

    def num(s):
        if s.isdigit(): return int(s)
        return s

    seqA = map(num, re.findall('\d+|\w+', vA.replace('-SNAPSHOT', '')))
    seqB = map(num, re.findall('\d+|\w+', vB.replace('-SNAPSHOT', '')))

    # this is to ensure that 1.0 == 1.0.0 in cmp(..)
    lenA, lenB = len(seqA), len(seqB)
    for i in range(lenA, lenB): seqA += (0,)
    for i in range(lenB, lenA): seqB += (0,)

    rc = cmp(seqA, seqB)

    if rc == 0:
        if vA.endswith('-SNAPSHOT'): return -1
        if vB.endswith('-SNAPSHOT'): return 1
    return rc
</pre>
<p>Theoretically lines 43 &#8211; 49 could be written in a more compact way but using the short circuit evaluations (as below) lead to wrong results &#8211; at least in Jython 2.1:</p>
<pre name="code" class="python">
    seqa = map(lambda s: s.isdigit() and int(s) or s, re.findall('\d+|\w+', vA.replace('-SNAPSHOT', '')))
    seqb = map(lambda s: s.isdigit() and int(s) or s, re.findall('\d+|\w+', vB.replace('-SNAPSHOT', '')))
</pre>
 <img src="http://sebthom.de/wp-content/plugins/feed-statistics.php?view=1&post_id=136" width="1" height="1" style="display: none;" /><hr />
<p><small>&copy; sebthom for <a href="http://sebthom.de">sebthom.de</a>, 2009. |
<a href="http://sebthom.de/136-comparing-version-numbers-in-jython-pytho/">Permalink</a> |
<a href="http://sebthom.de/136-comparing-version-numbers-in-jython-pytho/#comments">No comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://sebthom.de/136-comparing-version-numbers-in-jython-pytho/&amp;title=Comparing version numbers in Jython / Python">del.icio.us</a>
<br/>
Post tags: <a href="http://sebthom.de/tag/jython/" rel="nofollow tag">Jython</a>, <a href="http://sebthom.de/tag/python/" rel="nofollow tag">python</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://sebthom.de/136-comparing-version-numbers-in-jython-pytho/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running TomCat 6 in Debug Mode under Windows</title>
		<link>http://sebthom.de/135-running-tomcat-6-debug-mode-windows/</link>
		<comments>http://sebthom.de/135-running-tomcat-6-debug-mode-windows/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 21:55:02 +0000</pubDate>
		<dc:creator>Sebastian Thomschke</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://sebthom.de/?p=135</guid>
		<description><![CDATA[While tracing some problems in one of my grails applications I had the need to do step debugging on a remote Tomcat server. Eventually I came up with the following lines to launch TomCat in debug mode:

@echo off
set JPDA_TRANSPORT="dt_socket"
set JPDA_ADDRESS="8000"
set JPDA_SUSPEND="y"
catalina.bat jpda start

Simply create a debug.bat file in TomCat&#8217;s bin directory and add these lines.
 [...]]]></description>
			<content:encoded><![CDATA[<p>While tracing some problems in one of my grails applications I had the need to do step debugging on a remote Tomcat server. Eventually I came up with the following lines to launch TomCat in debug mode:</p>
<pre>
@echo off
set JPDA_TRANSPORT="dt_socket"
set JPDA_ADDRESS="8000"
set JPDA_SUSPEND="y"
catalina.bat jpda start
</pre>
<p>Simply create a <b>debug.bat</b> file in TomCat&#8217;s <b>bin</b> directory and add these lines.</p>
 <img src="http://sebthom.de/wp-content/plugins/feed-statistics.php?view=1&post_id=135" width="1" height="1" style="display: none;" /><hr />
<p><small>&copy; sebthom for <a href="http://sebthom.de">sebthom.de</a>, 2009. |
<a href="http://sebthom.de/135-running-tomcat-6-debug-mode-windows/">Permalink</a> |
<a href="http://sebthom.de/135-running-tomcat-6-debug-mode-windows/#comments">No comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://sebthom.de/135-running-tomcat-6-debug-mode-windows/&amp;title=Running TomCat 6 in Debug Mode under Windows">del.icio.us</a>
<br/>
Post tags: <br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://sebthom.de/135-running-tomcat-6-debug-mode-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Determine the user who logged on via SSH</title>
		<link>http://sebthom.de/134-determine-the-user-who-logged-on-via-ssh/</link>
		<comments>http://sebthom.de/134-determine-the-user-who-logged-on-via-ssh/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 16:16:23 +0000</pubDate>
		<dc:creator>Sebastian Thomschke</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[username]]></category>

		<guid isPermaLink="false">http://sebthom.de/134-determine-the-user-who-logged-on-via-ssh/</guid>
		<description><![CDATA[Today we had the need to determine the initial id of a user who logged onto a Linux box via SSH and executed the su command. When the su command is issued the effective user is changed and whoami or id commands will report that new user id instead.
For anyone who is interested, that is [...]]]></description>
			<content:encoded><![CDATA[<p>Today we had the need to determine the initial id of a user who logged onto a Linux box via SSH and executed the <b>su</b> command. When the <b>su</b> command is issued the effective user is changed and <b>whoami</b> or <b>id</b> commands will report that new user id instead.</p>
<p>For anyone who is interested, that is what we came up to put the initial user id into a variable named ${LOGIN_USER}</p>
<pre>LOGIN_USER=`who -m`; LOGIN_USER=${LOGIN_USER%% *}</pre>
<p>or alternatively</p>
<pre>LOGIN_USER=`who -m | cut -d' ' -f1`</pre>
 <img src="http://sebthom.de/wp-content/plugins/feed-statistics.php?view=1&post_id=134" width="1" height="1" style="display: none;" /><hr />
<p><small>&copy; sebthom for <a href="http://sebthom.de">sebthom.de</a>, 2009. |
<a href="http://sebthom.de/134-determine-the-user-who-logged-on-via-ssh/">Permalink</a> |
<a href="http://sebthom.de/134-determine-the-user-who-logged-on-via-ssh/#comments">No comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://sebthom.de/134-determine-the-user-who-logged-on-via-ssh/&amp;title=Determine the user who logged on via SSH">del.icio.us</a>
<br/>
Post tags: <a href="http://sebthom.de/tag/bash/" rel="nofollow tag">bash</a>, <a href="http://sebthom.de/tag/linux/" rel="nofollow tag">Linux</a>, <a href="http://sebthom.de/tag/username/" rel="nofollow tag">username</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://sebthom.de/134-determine-the-user-who-logged-on-via-ssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lotus Notes&#8217; [Send only] and [Send and File] buttons for Outlook 2003</title>
		<link>http://sebthom.de/119-lotus-notes-send-only-send-and-file-buttons-for-outlook-2003/</link>
		<comments>http://sebthom.de/119-lotus-notes-send-only-send-and-file-buttons-for-outlook-2003/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 18:13:08 +0000</pubDate>
		<dc:creator>Sebastian Thomschke</dc:creator>
				<category><![CDATA[Visual Basic]]></category>
		<category><![CDATA[Outlook]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[VBA]]></category>

		<guid isPermaLink="false">http://sebthom.de/?p=119</guid>
		<description><![CDATA[You can say what you want about Lotus Notes, if you have used it for a while and switched e.g. to Outlook, you&#8217;ll find yourself missing one or the other nifty Notes function.
Already two of my customers &#8220;forced&#8221; me to use MS Outlook 2003 and since this isn&#8217;t likely to change in the near future, [...]]]></description>
			<content:encoded><![CDATA[<p>You can say what you want about Lotus Notes, if you have used it for a while and switched e.g. to Outlook, you&#8217;ll find yourself missing one or the other nifty Notes function.</p>
<p>Already two of my customers &#8220;forced&#8221; me to use MS Outlook 2003 and since this isn&#8217;t likely to change in the near future, I implemented two of these handy Notes functions for Outlook 2003:</p>
<ol>
<li>The button <b>[Send only]</b> sends e-mails without storing a copy of it in the local mailbox.</li>
<li>The button <b>[Send and File...]</b> prompts you for the folder where to store the e-mail being send.</li>
</ol>
<p>Installation:</p>
<ol>
<li>Download the Visual Basic module in the favored language.<br />
Note: There is a file embedded within this post, please visit this post to download the file.</p>
<p>Note: There is a file embedded within this post, please visit this post to download the file.<br />

</li>
<li>In Outlook open the Visual Basic editor.<br />
<a href="http://sebthom.de/wp-content/uploads/2009/02/01_outlook_open_vbe.png" rel="lightbox[119]"><img src="http://sebthom.de/wp-content/uploads/2009/02/01_outlook_open_vbe-150x150.png" alt="open VBE from within outlook" title="open VBE from within outlook" class="alignnone size-thumbnail wp-image-121" height="150" width="150" /></a></li>
<li>Import the Visual Basic module.<br />
<a href="http://sebthom.de/wp-content/uploads/2009/02/02_vbe_import.png" rel="lightbox[119]"><img src="http://sebthom.de/wp-content/uploads/2009/02/02_vbe_import-150x150.png" alt="Import the VBE module" title="Import the VBE module" class="alignnone size-thumbnail wp-image-122" height="150" width="150" /></a> <a href="http://sebthom.de/wp-content/uploads/2009/02/03_vbe_select_file.png" rel="lightbox[119]"><img src="http://sebthom.de/wp-content/uploads/2009/02/03_vbe_select_file-150x150.png" alt="Select the VBE module" title="Select the VBE module" class="alignnone size-thumbnail wp-image-123" height="150" width="150" /></a> <a href="http://sebthom.de/wp-content/uploads/2009/02/04_vbe_module_imported.png" rel="lightbox[119]"><img src="http://sebthom.de/wp-content/uploads/2009/02/04_vbe_module_imported-150x150.png" alt="The VBE module was imported." title="The VBE module was imported." class="alignnone size-thumbnail wp-image-124" height="150" width="150" /></a>
</li>
<li>Save the project.<br />
<a href="http://sebthom.de/wp-content/uploads/2009/02/05_vbe_save_module.png" rel="lightbox[119]"><img src="http://sebthom.de/wp-content/uploads/2009/02/05_vbe_save_module-150x150.png" alt="Save the VBE project" title="Save the VBE project" class="alignnone size-thumbnail wp-image-125" height="150" width="150" /></a>
</li>
<li>Install the buttons in the toolbar.<br />
<a href="http://sebthom.de/wp-content/uploads/2009/02/06_outlook_open_markos.png" rel="lightbox[119]"><img src="http://sebthom.de/wp-content/uploads/2009/02/06_outlook_open_markos-150x150.png" alt="Open the Macros dialog" title="Open the Macros dialog" class="alignnone size-thumbnail wp-image-126" height="150" width="150" /></a> <a href="http://sebthom.de/wp-content/uploads/2009/02/07_marco_select_install_sendandfile.png" rel="lightbox[119]"><img src="http://sebthom.de/wp-content/uploads/2009/02/07_marco_select_install_sendandfile-150x150.png" alt="Installing the button [Send and File...]" title="Installing the button [Send and File...]" class="alignnone size-thumbnail wp-image-127" height="150" width="150" /></a> <a href="http://sebthom.de/wp-content/uploads/2009/02/08_msg_sendandfile_installed.png" rel="lightbox[119]"><img src="http://sebthom.de/wp-content/uploads/2009/02/08_msg_sendandfile_installed-150x120.png" alt="Button [Send and File...] installed" title="Button [Send and File...] installed" class="alignnone size-thumbnail wp-image-128" height="120" width="150" /></a> <a href="http://sebthom.de/wp-content/uploads/2009/02/09_marco_select_install_sendonly.png" rel="lightbox[119]"><img src="http://sebthom.de/wp-content/uploads/2009/02/09_marco_select_install_sendonly-150x150.png" alt="Installing the button [Send only]" title="Installing the button [Send only]" class="alignnone size-thumbnail wp-image-129" height="150" width="150" /></a> <a href="http://sebthom.de/wp-content/uploads/2009/02/10_msg_sendonly_installed.png" rel="lightbox[119]"><img src="http://sebthom.de/wp-content/uploads/2009/02/10_msg_sendonly_installed-150x120.png" alt="Button [Send only] installed" title="Button [Send only] installed" class="alignnone size-thumbnail wp-image-130" height="120" width="150" /></a>
</li>
<li>When composing a new e-mail the additional buttons should appear in the toolbar.<br />
<a href="http://sebthom.de/wp-content/uploads/2009/02/11_new_buttons_in_toolbar.png" rel="lightbox[119]"><img src="http://sebthom.de/wp-content/uploads/2009/02/11_new_buttons_in_toolbar-150x150.png" alt="New buttons in the toolbar" title="New buttons in the toolbar" class="alignnone size-thumbnail wp-image-131" height="150" width="150" /></a>
</li>
<li>When clicking &#8220;Send and File&#8230;&#8221; the folder dialog is displayed before the e-mail is send.<br />
<a href="http://sebthom.de/wp-content/uploads/2009/02/12_sendandfile_select_folder.png" rel="lightbox[119]"><img src="http://sebthom.de/wp-content/uploads/2009/02/12_sendandfile_select_folder-150x150.png" alt="Selecting the target folder" title="Selecting the target folder" class="alignnone size-thumbnail wp-image-120" height="150" width="150" /></a></li>
</ol>
 <img src="http://sebthom.de/wp-content/plugins/feed-statistics.php?view=1&post_id=119" width="1" height="1" style="display: none;" /><hr />
<p><small>&copy; sebthom for <a href="http://sebthom.de">sebthom.de</a>, 2009. |
<a href="http://sebthom.de/119-lotus-notes-send-only-send-and-file-buttons-for-outlook-2003/">Permalink</a> |
<a href="http://sebthom.de/119-lotus-notes-send-only-send-and-file-buttons-for-outlook-2003/#comments">8 comments</a> |
Add to
<a href="http://del.icio.us/post?url=http://sebthom.de/119-lotus-notes-send-only-send-and-file-buttons-for-outlook-2003/&amp;title=Lotus Notes&#8217; [Send only] and [Send and File] buttons for Outlook 2003">del.icio.us</a>
<br/>
Post tags: <a href="http://sebthom.de/tag/outlook/" rel="nofollow tag">Outlook</a>, <a href="http://sebthom.de/tag/productivity/" rel="nofollow tag">Productivity</a>, <a href="http://sebthom.de/tag/vba/" rel="nofollow tag">VBA</a>, <a href="http://sebthom.de/tag/visual-basic/" rel="nofollow tag">Visual Basic</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://sebthom.de/119-lotus-notes-send-only-send-and-file-buttons-for-outlook-2003/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>getpass for Jython</title>
		<link>http://sebthom.de/70-getpass-jython/</link>
		<comments>http://sebthom.de/70-getpass-jython/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 00:02:15 +0000</pubDate>
		<dc:creator>Sebastian Thomschke</dc:creator>
				<category><![CDATA[Jython]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://sebthom.de/?p=70</guid>
		<description><![CDATA[In my current project I am developing some Jython based command line tools and had the need for masking passwords entered in the command shell. Python provides the getpass module for this purpose. Unfortunately this module has not been made available for Jython.
Here comes a module I wrote to provide this kind of functionality. It [...]]]></description>
			<content:encoded><![CDATA[<p>In my current project I am developing some Jython based command line tools and had the need for masking passwords entered in the command shell. Python provides the <a href="http://www.python.org/doc/lib/module-getpass.html">getpass </a>module for this purpose. Unfortunately this module has not been made available for Jython.</p>
<p>Here comes a module I wrote to provide this kind of functionality. It uses the mechanism described here <a href="http://java.sun.com/developer/technicalArticles/Security/pwordmask/">http://java.sun.com/developer/technicalArticles/Security/pwordmask/</a> to mask characters entered at the command prompt. Additionally if Java 6 or higher is running Jython the module will instead use the new <a href="http://java.sun.com/javase/6/docs/api/java/io/Console.html#readPassword%28%29">Console.readPassword()</a> method. In case the module is running in an environment where the getpass module is available it will delegate to the corresponding methods of this module instead of using its own implementations.</p>
<pre class="python" name="code"># ext_getpass.py
# @author Sebastian Thomschke, http://sebthom.de/
import thread, sys, time, os

# exposed methods:
__all__ = ["getpass","getuser"]

def __doMasking(stream):
    __doMasking.stop = 0
    while not __doMasking.stop:
        stream.write("b*")
        stream.flush()
        time.sleep(0.01)

def generic_getpass(prompt="Password: ", stream=None):
    if not stream:
        stream = sys.stderr
    prompt = str(prompt)
    if prompt:
        stream.write(prompt)
        stream.flush()
    thread.start_new_thread(__doMasking, (stream,))
    password = raw_input()
    __doMasking.stop = 1
    return password

def generic_getuser():
    for name in ('LOGNAME', 'USER', 'LNAME', 'USERNAME'):
        usr = os.environ.get(name)
        if usr: return usr

def java6_getpass(prompt="Password: ", stream=None):
    if not stream:
        stream = sys.stderr
    prompt = str(prompt)
    if prompt:
        stream.write(prompt)
        stream.flush()

    from java.lang import System
    console = System.console()
    if console == None:
	    return generic_getpass(prompt, stream)
    else:
        return "".join(console.readPassword())

try:
    # trying to use Python's getpass implementation
    import getpass
    getpass = getpass.getpass
    getuser = getpass.getuser
except ImportError, e:
    getuser = generic_getuser

    # trying to use Java 6's Console.readPassword() implementation
    try:
        from java.io import Console
        getpass = java6_getpass
    except ImportError, e:
        # use the generic getpass implementation
        getpass = generic_getpass
</pre>
<p>Here is an usage example:</p>
<pre class="python" name="code">
import ext_getpass as getpass

pw = getpass.getpass("Please enter your password:")
print "The entered password was: " + pw
</pre>
 <img src="http://sebthom.de/wp-content/plugins/feed-statistics.php?view=1&post_id=70" width="1" height="1" style="display: none;" /><hr />
<p><small>&copy; sebthom for <a href="http://sebthom.de">sebthom.de</a>, 2008. |
<a href="http://sebthom.de/70-getpass-jython/">Permalink</a> |
<a href="http://sebthom.de/70-getpass-jython/#comments">One comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://sebthom.de/70-getpass-jython/&amp;title=getpass for Jython">del.icio.us</a>
<br/>
Post tags: <a href="http://sebthom.de/tag/java/" rel="nofollow tag">Java</a>, <a href="http://sebthom.de/tag/jython/" rel="nofollow tag">Jython</a>, <a href="http://sebthom.de/tag/password/" rel="nofollow tag">password</a>, <a href="http://sebthom.de/tag/python/" rel="nofollow tag">python</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://sebthom.de/70-getpass-jython/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WebSphere Portal 6.1.0.0 does not support installation on a managed node</title>
		<link>http://sebthom.de/67-websphere-portal-6100-does-not-support-installation-on-a-managed-node/</link>
		<comments>http://sebthom.de/67-websphere-portal-6100-does-not-support-installation-on-a-managed-node/#comments</comments>
		<pubDate>Fri, 19 Sep 2008 19:42:41 +0000</pubDate>
		<dc:creator>Sebastian Thomschke</dc:creator>
				<category><![CDATA[WebSphere Portal]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[limitation]]></category>
		<category><![CDATA[websphere portal]]></category>

		<guid isPermaLink="false">http://sebthom.de/67-websphere-portal-6100-does-not-support-installation-on-a-managed-node/</guid>
		<description><![CDATA[With WebSphere Portal 5.1 a new deployment option was introduced that allowed the installation of WP onto an existing node managed by a deployment manager. AFAIK the main reason for this new option was to simplify the cluster setup procedure.
Both options, installing WP standalone and federating it into a cell afterwards as well as installing [...]]]></description>
			<content:encoded><![CDATA[<p>With WebSphere Portal 5.1 a new deployment option was introduced that allowed the installation of WP onto an existing node managed by a deployment manager. AFAIK the main reason for this new option was to simplify the cluster setup procedure.</p>
<p>Both options, installing WP standalone and federating it into a cell afterwards as well as installing it on an already managed node have different pros and cons each. In WP 6.0 the installation onto a managed node was even mandatory to enable WebSphere Process Server integration.</p>
<p>Surprisingly WP6.1.0.0 does not support the installation on a managed node anymore. All nodes of a cluster need to be installed as standalone systems first and then be federated into a WebSphere cell.</p>
<p>For WP 6.0 the installation procedure is described <a href="http://publib.boulder.ibm.com/infocenter/wpdoc/v6r0/topic/com.ibm.wp.ent.doc/wpf/clus_install_primary_fed.html" target="_blank">here</a>. The 6.1 info center does not mention this procedure anymore and it no, it was not dropped accidentally.</p>
 <img src="http://sebthom.de/wp-content/plugins/feed-statistics.php?view=1&post_id=67" width="1" height="1" style="display: none;" /><hr />
<p><small>&copy; sebthom for <a href="http://sebthom.de">sebthom.de</a>, 2008. |
<a href="http://sebthom.de/67-websphere-portal-6100-does-not-support-installation-on-a-managed-node/">Permalink</a> |
<a href="http://sebthom.de/67-websphere-portal-6100-does-not-support-installation-on-a-managed-node/#comments">No comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://sebthom.de/67-websphere-portal-6100-does-not-support-installation-on-a-managed-node/&amp;title=WebSphere Portal 6.1.0.0 does not support installation on a managed node">del.icio.us</a>
<br/>
Post tags: <a href="http://sebthom.de/tag/deployment/" rel="nofollow tag">deployment</a>, <a href="http://sebthom.de/tag/limitation/" rel="nofollow tag">limitation</a>, <a href="http://sebthom.de/tag/websphere-portal/" rel="nofollow tag">websphere portal</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://sebthom.de/67-websphere-portal-6100-does-not-support-installation-on-a-managed-node/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Solved] Blank Pages with Wordpress 2.6.x</title>
		<link>http://sebthom.de/63-solved-blank-pages-with-wordpress-26x/</link>
		<comments>http://sebthom.de/63-solved-blank-pages-with-wordpress-26x/#comments</comments>
		<pubDate>Sat, 13 Sep 2008 18:57:59 +0000</pubDate>
		<dc:creator>Sebastian Thomschke</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[workaround]]></category>

		<guid isPermaLink="false">http://sebthom.de/?p=63&amp;langswitch_lang=de</guid>
		<description><![CDATA[After upgrading to Wordpress 2.6 it occasionally happend that an empty page was displayed in the browser when navigating through the blog or working in the admin area. Refreshing the browser using CTRL+F5 usually helped in that case. Today I upgraded to Wordpress 2.6.2 and I was not able to access the plug-ins page of [...]]]></description>
			<content:encoded><![CDATA[<p>After upgrading to Wordpress 2.6 it occasionally happend that an empty page was displayed in the browser when navigating through the blog or working in the admin area. Refreshing the browser using CTRL+F5 usually helped in that case. Today I upgraded to Wordpress 2.6.2 and I was not able to access the plug-ins page of the admin area anymore. No matter how often I refreshed the page in the browser it stayed blank.<br />
First I searched the web for possible solutions. I found quite a number of discussions giving tips about this widely known problem but unfortunately none of these solutions helped in my case.<br />
So I again started debugging the Wordpress code and finally found the lines of code causing the trouble. The problem are <b>(object)</b> casts in the <strong>wp-includes/taxonomy.php</strong> file that transform an array into an object:</p>
<pre class="php" name="code">$wp_taxonomies['category'] = (object) array('name' => 'category', 'object_type' => 'post', 'hierarchical' => true, 'update_count_callback' => '_update_post_term_count');
$wp_taxonomies['post_tag'] = (object) array('name' => 'post_tag', 'object_type' => 'post', 'hierarchical' => false, 'update_count_callback' => '_update_post_term_count');
$wp_taxonomies['link_category'] = (object) array('name' => 'link_category', 'object_type' => 'link', 'hierarchical' => false);
</pre>
<p>Since I don&#8217;t get any error messages neither on the screen nor in the log files I have no idea why these casts fail. The PHP version used to serve the site is the latest stable 5.x release from php.net.<br />
As a workaround I introduced a function that does also transforms an array into an object but does not rely on the casting mechanism.</p>
<pre class="php" name="code">function arr2obj($arr) {
	foreach ($arr as $k => $v) $obj -> {$k} = $v;
	return $obj;
}

$wp_taxonomies['category'] = arr2obj(array('name' => 'category', 'object_type' => 'post', 'hierarchical' => true, 'update_count_callback' => '_update_post_term_count'));
$wp_taxonomies['post_tag'] = arr2obj(array('name' => 'post_tag', 'object_type' => 'post', 'hierarchical' => false, 'update_count_callback' => '_update_post_term_count'));
$wp_taxonomies['link_category'] = arr2obj(array('name' => 'link_category', 'object_type' => 'link', 'hierarchical' => false));
</pre>
 <img src="http://sebthom.de/wp-content/plugins/feed-statistics.php?view=1&post_id=63" width="1" height="1" style="display: none;" /><hr />
<p><small>&copy; sebthom for <a href="http://sebthom.de">sebthom.de</a>, 2008. |
<a href="http://sebthom.de/63-solved-blank-pages-with-wordpress-26x/">Permalink</a> |
<a href="http://sebthom.de/63-solved-blank-pages-with-wordpress-26x/#comments">One comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://sebthom.de/63-solved-blank-pages-with-wordpress-26x/&amp;title=[Solved] Blank Pages with Wordpress 2.6.x">del.icio.us</a>
<br/>
Post tags: <a href="http://sebthom.de/tag/bug/" rel="nofollow tag">bug</a>, <a href="http://sebthom.de/tag/php/" rel="nofollow tag">PHP</a>, <a href="http://sebthom.de/tag/wordpress/" rel="nofollow tag">Wordpress</a>, <a href="http://sebthom.de/tag/workaround/" rel="nofollow tag">workaround</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://sebthom.de/63-solved-blank-pages-with-wordpress-26x/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Peter Nalitch &#8211; Guitar</title>
		<link>http://sebthom.de/62-peter_nalitch_guitar/</link>
		<comments>http://sebthom.de/62-peter_nalitch_guitar/#comments</comments>
		<pubDate>Sat, 12 Jul 2008 20:00:06 +0000</pubDate>
		<dc:creator>Sebastian Thomschke</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[My Music]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://sebthom.de/62-peter_nalitch_guitar/</guid>
		<description><![CDATA[Some weeks ago we had two IT consultants from Russia on-site. Unfortunately one of them introduced me to a &#8211; to me so far &#8211; hidden part Russian culture: the song Guitar from Peter Nalitch. The consultant said that the song eats his brain &#8230; Well, I could not have said it better. I too [...]]]></description>
			<content:encoded><![CDATA[<p>Some weeks ago we had two IT consultants from Russia on-site. Unfortunately one of them introduced me to a &#8211; to me so far &#8211; hidden part Russian culture: the song Guitar from Peter Nalitch. The consultant said that the song eats his brain &#8230; Well, I could not have said it better. I too can&#8217;t get it out of my mind anymore.</p>
<p>If you have not heard it before, you can enjoy it now:</p>
<p>
<div class="wlWriterSmartContent" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:73255b9b-4d92-4cc9-b5b2-be45fb896763" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">
<div id="276f4771-80ed-4d4c-8b48-4e005e310b22" style="margin: 0px; padding: 0px; display: inline;">
<div><a href="http://www.youtube.com/watch?v=AOzkN8dHnjk&amp;hl=en&amp;fs=1" target="_new"><img src="http://sebthom.de/wp-content/uploads/2008/07/video4d83482a46db.jpg" galleryimg="no" onload="var downlevelDiv = document.getElementById('276f4771-80ed-4d4c-8b48-4e005e310b22'); downlevelDiv.innerHTML = &quot;&lt;div&gt;&lt;object width=&quot;425&quot; height=&quot;355&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/AOzkN8dHnjk&amp;hl=en&amp;fs=1&quot;&gt;&lt;/param&gt;&lt;param name=&quot;wmode&quot; value=&quot;transparent&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/AOzkN8dHnjk&amp;hl=en&amp;fs=1&quot; type=&quot;application/x-shockwave-flash&quot; wmode=&quot;transparent&quot; width=&quot;425&quot; height=&quot;355&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&quot;;" alt=""></a></div>
</div>
</div>
<p>The original version</p>
<p> (...)<br/>Read the rest of <a href="http://sebthom.de/62-peter_nalitch_guitar/">Peter Nalitch &#8211; Guitar</a> (34 words)</p>
<hr />
<p><small>&copy; sebthom for <a href="http://sebthom.de">sebthom.de</a>, 2008. |
<a href="http://sebthom.de/62-peter_nalitch_guitar/">Permalink</a> |
<a href="http://sebthom.de/62-peter_nalitch_guitar/#comments">No comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://sebthom.de/62-peter_nalitch_guitar/&amp;title=Peter Nalitch &#8211; Guitar">del.icio.us</a>
<br/>
Post tags: <a href="http://sebthom.de/tag/fun/" rel="nofollow tag">fun</a>, <a href="http://sebthom.de/tag/music/" rel="nofollow tag">My Music</a>, <a href="http://sebthom.de/tag/video/" rel="nofollow tag">video</a>, <a href="http://sebthom.de/tag/youtube/" rel="nofollow tag">youtube</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://sebthom.de/62-peter_nalitch_guitar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sun JDK5/6 compilers broken when linking overloaded methods with variable arguments</title>
		<link>http://sebthom.de/56-sun_jdk5_6_compilers_broken_when_linking_overloaded_methods_with_variable_arguments/</link>
		<comments>http://sebthom.de/56-sun_jdk5_6_compilers_broken_when_linking_overloaded_methods_with_variable_arguments/#comments</comments>
		<pubDate>Thu, 15 May 2008 23:23:44 +0000</pubDate>
		<dc:creator>Sebastian Thomschke</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[compiler]]></category>
		<category><![CDATA[jdk]]></category>

		<guid isPermaLink="false">http://sebthom.de/56-sun_jdk5_6_compilers_broken_when_linking_overloaded_methods_with_variable_arguments/</guid>
		<description><![CDATA[We are currently switching the build system of OVal from custom Ant scripts to Maven 2. During that process we accidentally compiled the project using the Java compiler of the Sun JDK 5 instead of the AspectJ compiler. Surprisingly javac did not complain about the missing aspect class files. Instead it already aborted while compiling [...]]]></description>
			<content:encoded><![CDATA[<p>We are currently switching the build system of <a title="OVal - the object validation framework for Java 5 or later" href="http://oval.sourceforge.net/" target="_blank">OVal</a> from custom Ant scripts to Maven 2. During that process we accidentally compiled the project using the Java compiler of the Sun JDK 5 instead of the AspectJ compiler. Surprisingly javac did not complain about the missing aspect class files. Instead it already aborted while compiling an ordinary Java class which only referenced other non-AspectJ related classes. This is the original error message:</p>
<pre>[INFO] [compiler:compile]
[INFO] Compiling 180 source files to C:\projects\oval\src\trunk\target\classes
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
C:\projects\oval\src\trunk\src\main\java\net\sf\oval\Validator.java:[373,58]
addMethodParameterChecks(java.lang.reflect.Method,int,java.lang.Object)
has private access in net.sf.oval.internal.ClassChecks </pre>
<p>There exist multiple methods named <strong>addMethodParameterChecks</strong> in the class <strong>ClassChecks</strong> with different signatures. The problem is that javac tries to link against the wrong method when compiling the class calling one of the methods. </p>
<p>(...)<br/>Read the rest of <a href="http://sebthom.de/56-sun_jdk5_6_compilers_broken_when_linking_overloaded_methods_with_variable_arguments/">Sun JDK5/6 compilers broken when linking overloaded methods with variable arguments</a> (284 words)</p>
<hr />
<p><small>&copy; sebthom for <a href="http://sebthom.de">sebthom.de</a>, 2008. |
<a href="http://sebthom.de/56-sun_jdk5_6_compilers_broken_when_linking_overloaded_methods_with_variable_arguments/">Permalink</a> |
<a href="http://sebthom.de/56-sun_jdk5_6_compilers_broken_when_linking_overloaded_methods_with_variable_arguments/#comments">One comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://sebthom.de/56-sun_jdk5_6_compilers_broken_when_linking_overloaded_methods_with_variable_arguments/&amp;title=Sun JDK5/6 compilers broken when linking overloaded methods with variable arguments">del.icio.us</a>
<br/>
Post tags: <a href="http://sebthom.de/tag/bug/" rel="nofollow tag">bug</a>, <a href="http://sebthom.de/tag/compiler/" rel="nofollow tag">compiler</a>, <a href="http://sebthom.de/tag/java/" rel="nofollow tag">Java</a>, <a href="http://sebthom.de/tag/jdk/" rel="nofollow tag">jdk</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://sebthom.de/56-sun_jdk5_6_compilers_broken_when_linking_overloaded_methods_with_variable_arguments/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Making the DD Sitemap Generator Plug-in work with multilingual blogs</title>
		<link>http://sebthom.de/55-making_dd_sitemap_generator_plugin_work_with_multilingual_blogs/</link>
		<comments>http://sebthom.de/55-making_dd_sitemap_generator_plugin_work_with_multilingual_blogs/#comments</comments>
		<pubDate>Thu, 01 May 2008 21:47:38 +0000</pubDate>
		<dc:creator>Sebastian Thomschke</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[workaround]]></category>

		<guid isPermaLink="false">http://sebthom.de/55-making_dd_sitemap_generator_plugin_work_with_multilingual_blogs/</guid>
		<description><![CDATA[To create a bilingual blog with WordPress I am using the Language Switcher Plug-in. This plug-in allows you to put content in more than one language into the post title and content fields by surrounding the localized texts with special tags indicating their language (e.g. &#8220;[ lang_en]Hello World[ /lang_en][ lang_de]Hallo Welt[ /lang_de]&#8220;). When the posts [...]]]></description>
			<content:encoded><![CDATA[<p>To create a bilingual blog with <a href="http://wordpress.org/" target="_blank">WordPress</a> I am using the <a href="http://www.poplarware.com/languageplugin.html" target="_blank">Language Switcher Plug-in</a>. This plug-in allows you to put content in more than one language into the post title and content fields by surrounding the localized texts with special tags indicating their language (e.g. <strong>&#8220;[ lang_en]Hello World[ /lang_en][ lang_de]Hallo Welt[ /lang_de]&#8220;</strong>). When the posts are viewed in the browser the plug-in will determine the active language and strip off the texts specified in all other languages on the fly.</p>
<p>I am using the great <a href="http://www.dagondesign.com/articles/sitemap-generator-plugin-for-wordpress/" target="_blank">DD Sitemap Generator Plug-in for WordPress</a>&nbsp; to automatically render a site map based on the posts, pages and categories created in my blog. The problem however is that the generated site map is not language aware and displays the page/post titles and category names including the tags and the texts of all languages at once. </p>
<p>To solve this I started digging a bit into the code of WordPress and the Language Switcher Plug-in. The Language Switcher Plug-in achieves the on-the-fly processing of multilingual texts by hooking itself into the so called <a href="http://codex.wordpress.org/Plugin_API/Filter_Reference" target="_blank">Filters API</a> which is something like an event-based callback mechanism. Plug-ins can signal their interest in a certain text filter event by calling the <a href="http://codex.wordpress.org/Function_Reference/add_filter" target="_blank">add_filter(the_event_id, the_name_of_a_function_to_callback)</a> function provided by the WordPress API to register one if it&#8217;s functions that will be invoked by WordPress when the filter event occurs. Besides registering for filter events, plug-ins can also fire such events by calling the <a href="http://codex.wordpress.org/Function_Reference/apply_filters" target="_blank">apply_filters(the_event_id, the_text_to_be_filtered)</a>. WordPress will then apply all registered filters to the text passed over and the apply_filters will return a &#8220;filtered&#8221; version of the passed text. When rendering the title of a post or page WordPress fires the filter event &#8220;the_title&#8221; allowing plug-ins to process/modify the title before it is actually displayed. Therefore the Language Switcher Plug-in registers itself to this event and a lot of others to be able to strip off the language tags and the texts in languages other than the currently active one.</p>
<p>Unfortunately the DD Sitemap Generator Plug-in is currently not applying the respective filters when rendering the site map. Therefore the Language Switcher Plug-in is not aware of it and as a result the site map shows all translations of a category name or page/post title at the same time no matter which language is currently active.</p>
<p>To solve this problem I analyzed the source code of the DD Sitemap Generator Plug-in and added the missing <strong>apply_filters</strong> calls where appropriate. You can follow these steps in case you are having the same issue:</p>
<ol>
<li>Open the file <strong>&lt;wordpress_root&gt;/wp-content/plugins/sitemap-generator/sitemap-generator.php</strong> (or <strong>&lt;wordpress_root&gt;/wp-content/plugins/dd-sitemap-gen/dd-sitemap-gen.php</strong>) in an editor
<li>Locate the text<br />&nbsp;&nbsp; <font face="Courier New">$tmp_array['title'] = $pages[$k]-&gt;post_title;</font><br />and replace it with<br />&nbsp;&nbsp; <font face="Courier New">$tmp_array['title'] = <strong>apply_filters(&#8216;the_title&#8217;, </strong>$pages[$k]-&gt;post_title<strong>)</strong>;</font>
<li>Locate the text<br />&nbsp;&nbsp; <font face="Courier New">$tmp_array['title'] = $cat_data[$c]['cat_name'];</font><br />and replace it with<br />&nbsp;&nbsp; <font face="Courier New">$tmp_array['title'] = <strong>apply_filters(&#8216;the_category&#8217;, </strong>$cat_data[$c]['cat_name']<strong>)</strong>;</font>
<li>Locate the text<br />&nbsp;&nbsp; <font face="Courier New">$tmp_array['title'] = $posts[$k]-&gt;post_title;</font><br />and replace it with<br />&nbsp;&nbsp; <font face="Courier New">$tmp_array['title'] = <strong>apply_filters(&#8216;the_title&#8217;, </strong>$posts[$k]-&gt;post_title<strong>)</strong>;</font>
<li>Save the file and you are done.</li>
</ol>
<p>If you are encountering similar problems with other plug-in you can use the same approach to make them play nicely with the Language Switcher Plug-in.</p></p>
 <img src="http://sebthom.de/wp-content/plugins/feed-statistics.php?view=1&post_id=55" width="1" height="1" style="display: none;" /><hr />
<p><small>&copy; sebthom for <a href="http://sebthom.de">sebthom.de</a>, 2008. |
<a href="http://sebthom.de/55-making_dd_sitemap_generator_plugin_work_with_multilingual_blogs/">Permalink</a> |
<a href="http://sebthom.de/55-making_dd_sitemap_generator_plugin_work_with_multilingual_blogs/#comments">3 comments</a> |
Add to
<a href="http://del.icio.us/post?url=http://sebthom.de/55-making_dd_sitemap_generator_plugin_work_with_multilingual_blogs/&amp;title=Making the DD Sitemap Generator Plug-in work with multilingual blogs">del.icio.us</a>
<br/>
Post tags: <a href="http://sebthom.de/tag/php/" rel="nofollow tag">PHP</a>, <a href="http://sebthom.de/tag/wordpress/" rel="nofollow tag">Wordpress</a>, <a href="http://sebthom.de/tag/workaround/" rel="nofollow tag">workaround</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://sebthom.de/55-making_dd_sitemap_generator_plugin_work_with_multilingual_blogs/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>[Solved] WordPress 2.5 One-Click Plug-in Upgrades &#8211; Could not create directory</title>
		<link>http://sebthom.de/54-solved-wordpress-25-one-click-plugin-update-problem-could-not-create-directory/</link>
		<comments>http://sebthom.de/54-solved-wordpress-25-one-click-plugin-update-problem-could-not-create-directory/#comments</comments>
		<pubDate>Thu, 24 Apr 2008 23:44:06 +0000</pubDate>
		<dc:creator>Sebastian Thomschke</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[workaround]]></category>

		<guid isPermaLink="false">http://sebthom.de/54-solved-wordpress-25-one-click-plugin-update-problem-could-not-create-directory/</guid>
		<description><![CDATA[Some days ago I upgraded my WordPress installation to the new 2.5 release. Being a lazy guy I of course wanted to use the new on-click plug-in upgrades feature to update several plug-ins. Trying to one-click update some of the out-dated plug-ins only resulted in the rather meaningless error message &#8220;Could not create directory&#8221;. So [...]]]></description>
			<content:encoded><![CDATA[<p>Some days ago I upgraded my WordPress installation to the new <a href="http://wordpress.org/development/2008/03/wordpress-25-brecker/" target="_blank">2.5 release</a>. Being a lazy guy I of course wanted to use the new <a href="http://wordpress.org/development/2008/03/wordpress-25-brecker/" target="_blank">on-click plug-in upgrades</a> feature to update several plug-ins. Trying to one-click update some of the out-dated plug-ins only resulted in the rather meaningless error message &#8220;Could not create directory&#8221;. So I started searching the web for possible solutions. I quickly found <a href="http://wordpress.org/support/topic/164174" target="_blank">some</a> <a href="http://blog.fabrice-pascal.de/item/1132/2008/04/06/" target="_blank">posts</a> explaining this issue to be a directory permission problem. Manually creating the /wp-content/upgrade directory and chmoding it as well as the plug-in directories to 777 should solve the problem. Unfortunately not for me. Therefore I rolled up my sleeves and started to debug WordPress&#8230;</p>
<p>To cut a long story short, eventually I came across this PHP bug report <a href="http://bugs.php.net/bug.php?id=42739" target="_blank">#42739 mkdir doesn&#8217;t like a trailing slash when safe_mode is enabled</a> and it turned out that this was the issue I was facing with on my hosting account too. The safe_mode option is enabled and WordPress tries to create directories that end with a slash (e.g. /htdocs/wp-content/upgrade/the-plugin<strong>/</strong>).</p>
<p>After knowing the reason I could develop a workaround and finally got the one-click updater running. If you are facing the same issue you can try to use my patch too.</p>
<ol>
<li>Locate and open the file <strong>&lt;wp_root&gt;/wp_admin/includes/class-wp-filesystem-direct.php</strong> in an editor <br /> 
<li>Search for &#8220;<strong>function mkdir</strong>&#8221; <br /> 
<li>Add the following statements to this method
<pre class="php" name="code">function mkdir($path,$chmod=false,$chown=false,$chgrp=false){
	if( ! $chmod)
		$chmod = $this-&gt;permission;

	// workaround for http://bugs.php.net/bug.php?id=42739 starts here
	if(ini_get('safe_mode') &amp;&amp; substr($path, -1) == '/')
	{
		$path = substr($path, 0, -1);
	}
	// workaround for http://bugs.php.net/bug.php?id=42739 ends here

	if( !@mkdir($path,$chmod) )
		return false;
	if( $chown )
		$this-&gt;chown($path,$chown);
	if( $chgrp )
		$this-&gt;chgrp($path,$chgrp);
	return true;
}</pre>
<li>Start one-click updating! </li>
</ol>
<p><b>Addendum:</b>
<ol>
<li>The patch also works for WordPress 2.5.1</li>
<li>If applying this patch does not lead to success the problem may have a second cause. Therefore also check the permissions on the /wp-content/upgrade/ folder and it&#8217;s sub folders, e.g. chmod them to 777. If the upgrade directory does not exist at all it may be sufficient to create it manually.</li>
</ol>
<p>
 <img src="http://sebthom.de/wp-content/plugins/feed-statistics.php?view=1&post_id=54" width="1" height="1" style="display: none;" /><hr />
<p><small>&copy; sebthom for <a href="http://sebthom.de">sebthom.de</a>, 2008. |
<a href="http://sebthom.de/54-solved-wordpress-25-one-click-plugin-update-problem-could-not-create-directory/">Permalink</a> |
<a href="http://sebthom.de/54-solved-wordpress-25-one-click-plugin-update-problem-could-not-create-directory/#comments">26 comments</a> |
Add to
<a href="http://del.icio.us/post?url=http://sebthom.de/54-solved-wordpress-25-one-click-plugin-update-problem-could-not-create-directory/&amp;title=[Solved] WordPress 2.5 One-Click Plug-in Upgrades &#8211; Could not create directory">del.icio.us</a>
<br/>
Post tags: <a href="http://sebthom.de/tag/bug/" rel="nofollow tag">bug</a>, <a href="http://sebthom.de/tag/php/" rel="nofollow tag">PHP</a>, <a href="http://sebthom.de/tag/wordpress/" rel="nofollow tag">Wordpress</a>, <a href="http://sebthom.de/tag/workaround/" rel="nofollow tag">workaround</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://sebthom.de/54-solved-wordpress-25-one-click-plugin-update-problem-could-not-create-directory/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>Which Superhero am I?</title>
		<link>http://sebthom.de/52-which_superhero_am_i/</link>
		<comments>http://sebthom.de/52-which_superhero_am_i/#comments</comments>
		<pubDate>Thu, 24 Apr 2008 18:39:35 +0000</pubDate>
		<dc:creator>Sebastian Thomschke</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[fun]]></category>

		<guid isPermaLink="false">http://sebthom.de/52-which_superhero_am_i/</guid>
		<description><![CDATA[Recently, I came across the Superhero Quiz at http://www.thesuperheroquiz.com/. Doing the quiz revealed my true personality:
You are Superman







Superman


70%


Robin


60%


Green Lantern


50%


Spider-Man


50%


Supergirl


50%


Iron Man


35%


The Flash


30%


Wonder Woman


20%


Catwoman


20%


Hulk


20%


Batman


20%




You are mild-mannered, good,            strong and you love to help others.             [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I came across the Superhero Quiz at <a href="http://www.thesuperheroquiz.com/">http://www.thesuperheroquiz.com/</a>. Doing the quiz revealed my true personality:
<p><b>You are <font size="6">Superman</font></b><br />
<table>
<tbody>
<tr>
<td>
<table>
<tbody>
<tr>
<td>Superman</td>
<td>
<hr align="left" width="70" noshade="noshade" size="4" /></td>
<td>70%</td>
</tr>
<tr>
<td>Robin</td>
<td>
<hr align="left" width="60" noshade="noshade" size="4" /></td>
<td>60%</td>
</tr>
<tr>
<td>Green Lantern</td>
<td>
<hr align="left" width="50" noshade="noshade" size="4" /></td>
<td>50%</td>
</tr>
<tr>
<td>Spider-Man</td>
<td>
<hr align="left" width="50" noshade="noshade" size="4" /></td>
<td>50%</td>
</tr>
<tr>
<td>Supergirl</td>
<td>
<hr align="left" width="50" noshade="noshade" size="4" /></td>
<td>50%</td>
</tr>
<tr>
<td>Iron Man</td>
<td>
<hr align="left" width="35" noshade="noshade" size="4" /></td>
<td>35%</td>
</tr>
<tr>
<td>The Flash</td>
<td>
<hr align="left" width="30" noshade="noshade" size="4" /></td>
<td>30%</td>
</tr>
<tr>
<td>Wonder Woman</td>
<td>
<hr align="left" width="20" noshade="noshade" size="4" /></td>
<td>20%</td>
</tr>
<tr>
<td>Catwoman</td>
<td>
<hr align="left" width="20" noshade="noshade" size="4" /></td>
<td>20%</td>
</tr>
<tr>
<td>Hulk</td>
<td>
<hr align="left" width="20" noshade="noshade" size="4" /></td>
<td>20%</td>
</tr>
<tr>
<td>Batman</td>
<td>
<hr align="left" width="20" noshade="noshade" size="4" /></td>
<td>20%</td>
</tr>
</tbody>
</table>
</td>
<td>You are mild-mannered, good,            <br />strong and you love to help others.             <br /><img src="http://www.thesuperheroquiz.com/pics/superman.jpg" /></td>
</tr>
</tbody>
</table>
<p>   <a href="http://www.thesuperheroquiz.com/">Click here to take the Superhero Personality Test</a>     </p>
<p>Which Superhero are you? </p>
 <img src="http://sebthom.de/wp-content/plugins/feed-statistics.php?view=1&post_id=52" width="1" height="1" style="display: none;" /><hr />
<p><small>&copy; sebthom for <a href="http://sebthom.de">sebthom.de</a>, 2008. |
<a href="http://sebthom.de/52-which_superhero_am_i/">Permalink</a> |
<a href="http://sebthom.de/52-which_superhero_am_i/#comments">No comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://sebthom.de/52-which_superhero_am_i/&amp;title=Which Superhero am I?">del.icio.us</a>
<br/>
Post tags: <a href="http://sebthom.de/tag/fun/" rel="nofollow tag">fun</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://sebthom.de/52-which_superhero_am_i/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Balls of Steel &#8211; Neg&#8217;s Urban Sports</title>
		<link>http://sebthom.de/51-balls_of_steel_negs_urban_sports/</link>
		<comments>http://sebthom.de/51-balls_of_steel_negs_urban_sports/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 16:42:54 +0000</pubDate>
		<dc:creator>Sebastian Thomschke</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://sebthom.de/51-balls_of_steel_negs_urban_sports/</guid>
		<description><![CDATA[I just came across a British reality comedy TV series called Balls of Steel I&#8217;d like to share with you. I am probably three years behind but I still think it is worth mentioning. Especially the series segment &#34;Neg&#8217;s Urban Sports&#34; caught my attention. Here is one of my favorite videos where Neg is performing [...]]]></description>
			<content:encoded><![CDATA[<p>I just came across a British reality comedy TV series called Balls of Steel I&#8217;d like to share with you. I am probably three years behind but I still think it is worth mentioning. Especially the series segment &quot;Neg&#8217;s Urban Sports&quot; caught my attention. Here is one of my favorite videos where Neg is performing a &quot;sport game&quot; he calls &quot;Knock and Don&#8217;t Run&quot; which is a rather dangerous version of doorbell pranks.</p>
<p> <embed src="http://www.youtube.com/v/uoxcZiWK79c&amp;hl=en&amp;rel=0" width="425" height="355" type="application/x-shockwave-flash" wmode="transparent" />
<p>You can watch more urban sports videos <a href="http://www.youtube.com/results?search_query=%22Neg%27s+urban" target="_blank">here</a> at YouTube.</p>
 <img src="http://sebthom.de/wp-content/plugins/feed-statistics.php?view=1&post_id=51" width="1" height="1" style="display: none;" /><hr />
<p><small>&copy; sebthom for <a href="http://sebthom.de">sebthom.de</a>, 2008. |
<a href="http://sebthom.de/51-balls_of_steel_negs_urban_sports/">Permalink</a> |
<a href="http://sebthom.de/51-balls_of_steel_negs_urban_sports/#comments">One comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://sebthom.de/51-balls_of_steel_negs_urban_sports/&amp;title=Balls of Steel &#8211; Neg&#8217;s Urban Sports">del.icio.us</a>
<br/>
Post tags: <a href="http://sebthom.de/tag/fun/" rel="nofollow tag">fun</a>, <a href="http://sebthom.de/tag/video/" rel="nofollow tag">video</a>, <a href="http://sebthom.de/tag/youtube/" rel="nofollow tag">youtube</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://sebthom.de/51-balls_of_steel_negs_urban_sports/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>myPodder &#8211; a mobile podcatcher</title>
		<link>http://sebthom.de/49-mypodder-mobile-podcatcher/</link>
		<comments>http://sebthom.de/49-mypodder-mobile-podcatcher/#comments</comments>
		<pubDate>Sun, 20 Apr 2008 19:59:25 +0000</pubDate>
		<dc:creator>Sebastian Thomschke</dc:creator>
				<category><![CDATA[Freeware Tips]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[podcasts]]></category>

		<guid isPermaLink="false">http://sebthom.de/?p=49&amp;langswitch_lang=de</guid>
		<description><![CDATA[Two weeks ago I started trying out podcasts seriously for the first time. So far I mainly tried the ones from a German news radio station (http://www.dradio.de/podcast/). I downloaded the audio files about topics I found interesting and listened to them while travelling to and from work. I really enjoyed it &#8211; especially because of [...]]]></description>
			<content:encoded><![CDATA[<p>Two weeks ago I started trying out podcasts seriously for the first time. So far I mainly tried the ones from a German news radio station (<a target="_blank" href="http://www.dradio.de/podcast/">http://www.dradio.de/podcast/</a>). I downloaded the audio files about topics I found interesting and listened to them while travelling to and from work. I really enjoyed it &#8211; especially because of the facts that I could now listen to talks and reports I am really interested in and I didn&#8217;t had to pay attention to when they are broadcasted. However I found it quite cumbersome to navigate through the radio station&#8217;s web page, to select each podcast separately, to download them and finally to transfer them to my neat <a target="_blank" href="http://www.amazon.com/dp/B000S6Q2A8/?tag=sten-post-20">Samsung T9</a>.
<p>So I started looking for some tools that could simplify this process. I finally came across a handy software called <a href="http://www.podcastready.com/download.php">myPodder</a> provided for free by <a href="http://www.podcastready.com/">Podcast Ready</a>. Podcast Ready provides an online catalog of available podcasts from different sources and to my surprise they also have that German radio station listed. The interesting thing about their software is the fact that you can directly install it onto your mobile audio player and have it launched automatically the moment it is connected to a computer. This means you can easily charge your player with new podcasts from any computer having an internet connection. Simply connect the player, wait for the program to launch, select some new podcasts and download them.<br />(...)<br/>Read the rest of <a href="http://sebthom.de/49-mypodder-mobile-podcatcher/">myPodder &#8211; a mobile podcatcher</a> (0 words)</p>
<hr />
<p><small>&copy; sebthom for <a href="http://sebthom.de">sebthom.de</a>, 2008. |
<a href="http://sebthom.de/49-mypodder-mobile-podcatcher/">Permalink</a> |
<a href="http://sebthom.de/49-mypodder-mobile-podcatcher/#comments">No comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://sebthom.de/49-mypodder-mobile-podcatcher/&amp;title=myPodder &#8211; a mobile podcatcher">del.icio.us</a>
<br/>
Post tags: <a href="http://sebthom.de/tag/audio/" rel="nofollow tag">audio</a>, <a href="http://sebthom.de/tag/php/" rel="nofollow tag">PHP</a>, <a href="http://sebthom.de/tag/podcasts/" rel="nofollow tag">podcasts</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://sebthom.de/49-mypodder-mobile-podcatcher/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My favorite WordPress Plug-ins &amp; Resources</title>
		<link>http://sebthom.de/46-favorite-wordpress-resources/</link>
		<comments>http://sebthom.de/46-favorite-wordpress-resources/#comments</comments>
		<pubDate>Sun, 30 Sep 2007 09:04:13 +0000</pubDate>
		<dc:creator>Sebastian Thomschke</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[MP3]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://sebthom.de/46-lang_enmy-favorite-wordpress-resourceslang_enlang_demeine-favorisierten-wordpress-ressourcenlang_de/lang/de</guid>
		<description><![CDATA[Now that I gained some experiences with WordPress, here comes a list of my favorite WordPress Plug-ins:
(...)Read the rest of My favorite WordPress Plug-ins &#38; Resources (717 words)

&#169; sebthom for sebthom.de, 2007. &#124;
Permalink &#124;
3 comments &#124;
Add to
del.icio.us

Post tags: audio, MP3, PHP, Wordpress

Feed enhanced by Better Feed from  Ozh
]]></description>
			<content:encoded><![CDATA[<p>Now that I gained some experiences with WordPress, here comes a list of my favorite WordPress Plug-ins:</p>
<p>(...)<br/>Read the rest of <a href="http://sebthom.de/46-favorite-wordpress-resources/">My favorite WordPress Plug-ins &amp; Resources</a> (717 words)</p>
<hr />
<p><small>&copy; sebthom for <a href="http://sebthom.de">sebthom.de</a>, 2007. |
<a href="http://sebthom.de/46-favorite-wordpress-resources/">Permalink</a> |
<a href="http://sebthom.de/46-favorite-wordpress-resources/#comments">3 comments</a> |
Add to
<a href="http://del.icio.us/post?url=http://sebthom.de/46-favorite-wordpress-resources/&amp;title=My favorite WordPress Plug-ins &amp; Resources">del.icio.us</a>
<br/>
Post tags: <a href="http://sebthom.de/tag/audio/" rel="nofollow tag">audio</a>, <a href="http://sebthom.de/tag/mp3/" rel="nofollow tag">MP3</a>, <a href="http://sebthom.de/tag/php/" rel="nofollow tag">PHP</a>, <a href="http://sebthom.de/tag/wordpress/" rel="nofollow tag">Wordpress</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://sebthom.de/46-favorite-wordpress-resources/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Hello World again!</title>
		<link>http://sebthom.de/44-hello-world-again/</link>
		<comments>http://sebthom.de/44-hello-world-again/#comments</comments>
		<pubDate>Fri, 28 Sep 2007 09:34:33 +0000</pubDate>
		<dc:creator>Sebastian Thomschke</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://sebthom.de/44-lang_enhello-world-againlang_enlang_dehallo-welt-klappe-die-zweitelang_de/</guid>
		<description><![CDATA[Finally, after years of static HTML pages, self-built PHP scripts, and the evaluation of dozens of open source content management systems and blogging tools I finally decided to give WordPress a try. Now the hard migration work is done and my site is up and running with a fresh new design providing all the neat [...]]]></description>
			<content:encoded><![CDATA[<p>Finally, after years of static HTML pages, self-built PHP scripts, and the evaluation of dozens of open source content management systems and blogging tools I finally decided to give WordPress a try. Now the hard migration work is done and my site is up and running with a fresh new design providing all the neat features expected from a bleading-edge Web 2.0-ish site.</p>
 <img src="http://sebthom.de/wp-content/plugins/feed-statistics.php?view=1&post_id=44" width="1" height="1" style="display: none;" /><hr />
<p><small>&copy; sebthom for <a href="http://sebthom.de">sebthom.de</a>, 2007. |
<a href="http://sebthom.de/44-hello-world-again/">Permalink</a> |
<a href="http://sebthom.de/44-hello-world-again/#comments">No comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://sebthom.de/44-hello-world-again/&amp;title=Hello World again!">del.icio.us</a>
<br/>
Post tags: <a href="http://sebthom.de/tag/php/" rel="nofollow tag">PHP</a>, <a href="http://sebthom.de/tag/wordpress/" rel="nofollow tag">Wordpress</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://sebthom.de/44-hello-world-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
