Thursday, August 31, 2006

Tip: DSpace on Windows XP: A Batch File for Compilation (or Recompilation) of the MediaFilterManager Full-text Index

For DSpace Users in Windows Platform:

If you haven't already known, here's a workaround I discovered today after spending 1-2 hours trying to enable the full-text indexing feature of the DSpace Digital Library software in Windows XP Professional SP2 on my laptop:

In Unix or Linux the "filter-media" shell script in [DSpace]/bin needs to be manually scheduled (cron) for daily update of the full-text database.

The Windows counterpart of the "filter-media" shell script is not provided in the DSpace distribution. With the environmental variable DSPACE_HOME set to C:\DSpace, a "filter-media.bat" batch file is written.

"filter-media.bat" can be manually run periodically or scheduled to be run automatically by Windows (to further investigate how to schedule a task).


Essentially, "filter-media.bat" is simply a batch file that executes the class MediaFilterManager in the package org.dspace.app.mediafilter -- by using the batch-file command:

call %DSPACE_HOME%/bin/dsrun.bat org.dspace.app.mediafilter.MediaFilterManager

The class MediaFilterManager takes care of the full-text indexing process.

"filter-media.bat" can be manually run periodically or scheduled to be run automatically by Windows.

Note that

Tomcat needs to be *stopped* before this script is run,

otherwise the CFS index file in %DSPACE_HOME%\search cannot be updated (by replacing with the new index file generated by "filter-media") and
"java.io.IOException: Cannot delete _[something].cfs"
will be thrown by org.dspace.app.mediafilter.MediaFilterManager when it cannot replace the CFS index file.


Keywords: , , , , , ,

Wednesday, August 30, 2006

Tip: Configuring Blojsom for Tagging and a del.icio.us-like Tag Cloud

I am looking for a blog server for my present research in the application of blogs and digital libraries in knowledge management. Blojsom and Pebble, two Java blog servers for hosting under Tomcat 5, seem interesting to me.

Blojsom is a well-established product and is the technology that underlies Apple Mac OS X Server Collaboration Services. It comes with a wide variety of plug-ins (which imply its extensibility) and is also accompanied by a good-looking javadoc.

Pebble, on the other hand, impressed me with its fancy support for del.icio.us-like tagging–see the developer's own blog here for example. But after spending some time looking at its documentation and mailing list on SourceForge, despite the developer's enthusiasm to support the community of users, I found Pebble less friendly to 3rd-party developers than Blojsom and anticipated troubles–with me and the developer–adapting it to my research work.

Therefore...I think I would rather go with Blojsom.

I spent some time googling this afternoon and came across a series of webpages that refer to tags and tag cloud in Blojsom. Kelmon's "Weblog as an Enterprise Project Management Communication Tool" project for his master degree in Information Technology from University of Liverpool, was the most useful to me. In his Plojsom software, he proposed a customized version of Blojsom that would be useful for enterprise project management.

Blojsom's Tagging and Tag Cloud plug-in modules were part of the proposed work.

Following Kelmon and the Blojsom "Available Plugins" Wiki, here is a procedure to enable tagging and tag cloud in Blojsom:

References:

Blojsom Wiki: Technorati Tags Plugin
Blojsom Wiki: Tag Cloud Plugin



Background:

1. The Tag Cloud plug-in generates a cloud of Technorati tags from blog entries.

2. The Technorati Tags plug-in by default generates and embeds the

<a href="http://www.technorati.com/tag/some-tag" rel="tag">

link. However, the blojsom wiki suggested that this template may be overridden from the default

<a href="http://www.technorati.com/tag/{0}" rel="tag">{0}</a>

to an arbitrary one by placing a file "technorati-tag-link.vm" in the subdirectory

"org/blojsom/plugin/technorati/templates/"

of a user's blog templates directory.

3. For information, the template command "#TechnoratiTags($entry)" in the file "asual-entry.vm" is used to generate the set of Technorati tags for a blog entry.



Procedure:

1. Edit the file

{user_name}/templates/asual-column.vm

and add the template below to generate the tag cloud.

#if (!$BLOJSOM_PERMALINK && $BLOJSOM_PLUGIN_TAG_CLOUD_MAP)
<div>
<h5>Tags:</h5>
#foreach($tag in $BLOJSOM_PLUGIN_TAG_CLOUD_MAP.keySet())
<span class="tagcloud$BLOJSOM_PLUGIN_TAG_CLOUD_MAP.get($tag)">
<a href="#BlogURL()?tq=$tag">$tag</a>
</span>
#end
</div>
#end

2. Create a file

{user_name}/templates/org/blojsom/plugin/technorati/templates/
technorati-tag-link.vm

with the content

<a href="http://localhost:8080/blojsom/blog/default/?tq={0}" rel="tag">{0}</a>

There should be no spaces or line breaks in the file.

3. Reload a blog page to verify the changes.



Keywords: , , ,

Update: Aug 30, 2006:

I just learned about the "general (global) settings" concept of Blojsom. We can make most global changes in the "WEB-INF/bootstrap" directory in stead of the {user_name} folder. However, I guess global settings will be overridden by the specific ones in the {user_name} directory.

Friday, August 25, 2006

PHP WebDev: Resolving an 'Unable to Fork' Warning in Windows

Resolving an unable to fork PHP warning in Windows

I was trying to execute a PHP script which launches a batch file in Windows. Althought I verified that the path to my batch file is in the PATH environmental variable, I always get the following error:

Warning: system() [function.system]: Unable to fork


This problem happens now that I use Microsoft Internet Information Server (IIS) as the web server. It didn't happen when I was using Apache HTTP Server 2.0.

After 15 minutes on Google here's what I found out: PHP's Unable to Fork problem is related to Windows security setting.

By default, the system's "Internet Guest Account"–the IIS's anonymous web client account–is explicitly blocked from executing cmd.exe–the command line shell.


At the risk of system security being compromised, according to the instruction on Somacon.com, we can allow the Internet Guest Account to execute cmd.exe by:

  1. Open Windows Explorer and browse to the c:\windows\system32 or c:\winnt\system32 directory.

  2. Right-click on cmd.exe, and select Properties....

  3. Click the Security tab.

  4. If Internet Guest Account is not already listed, then click Add, then Advanced..., then Find Now.

  5. Scroll down to and select IUSR_MachineName, where MachineName is the name of your computer.

  6. Click OK twice to return to the Security tab.

  7. Select Internet Guest Account and then click the box under Allow for Read & Execute.

  8. Click OK.


Keywords: , , , , , , ,

Thursday, August 17, 2006

Windows Live Messenger: Error Code: 80048820 (80048439)

Fanatic Live - All about MSN Messenger & Windows Live technologies

If you're using a NetGear wireless router and you're experiencing Windows Live Messenger (or MSN Messenger)
Error Code: 80048820 / Extended Error Code: 80048439,

Windows Live Messenger: Error Code: 80048820 (80048439): Symptom
try reducing the size of the MTU (Maximum Transmission Unit) in the Router's WAN Setup page – from 1500 bytes to 1400 bytes. (However, see Updates below for optimal values.)
Windows Live Messenger: Error Code: 80048820 (80048439): Fixed
I have had this problem for several months. My office network is connected to the Internet via a set of transparent proxy servers. Windows Live Messenger's does not detect any connection problem. However, it just does not sign on!

Today I looked into this problem again, and fortunately after Googling for a while, I found a viable solution from Fanatic Live website:
Stretch suggested that NetGear users go to the WAN Setup page and change the MTU size to 1400 bytes.

I followed his suggestion and it worked like charm!


Thanks, Stretch. I appreciate it!

Keywords: , , , , , , ,

Update: August 17, 06:

A friend of mine suggested that the MTU value of 1400 maybe too low as it will increase too much overhead during large file transfers. The MTU size is like the maximum size of packet transmitted over the network. Small MTU size increases the number of transmitted packets. Here's an information on MTU from NetGear Router WAN Setup page:
The normal MTU (Maximum Transmit Unit) value for most Ethernet networks is 1500 Bytes, 1492 Bytes for PPPoE connections, or 1436 for PPTP connections. For some ISPs you may need to reduce the MTU. But this is rarely required, and should not be done unless you are sure it is necessary for your ISP connection.

I set the MTU to 1492 and error 80048820 (80048439) still occurred. I reduced the value one step further to 1436 and the problem disappeared. Therefore, my current MTU setting is at 1436 bytes.