My hotel on Thurloe Square in South Kensington:
Saturday, September 27, 2008
My favorite neighgborhood in London
Having just returned from London, I want to mention how much I love South kensington. Though I have some personal reasons for liking the neighborhood, I also think it's a great area for tourists and business travelers. There is a perfect balance of being in the center of everything yet still possessing plenty of neighborhood charms.
My hotel on Thurloe Square in South Kensington:
My hotel on Thurloe Square in South Kensington:
Thursday, September 11, 2008
VirtualBox
Has anyone tried the Sun's VirtualBox Virtual Server? It's a fantastic product, dubbed one of the best VM solutions you've never heard of.
I downloaded the product tonight from http://www.virtualbox.org/ and found it very easy to install and use. Compared to VMware server, VirtualBox has some nice features, for example, the wizard walking you through the virtual machine creation process is very logically designed, and the product is free.
I downloaded the product tonight from http://www.virtualbox.org/ and found it very easy to install and use. Compared to VMware server, VirtualBox has some nice features, for example, the wizard walking you through the virtual machine creation process is very logically designed, and the product is free.
Monday, August 25, 2008
Somthing's fishy in Linux JVM
I just encountered another failed JVM setting. This time it was the Oracle SQL Developer.
Here's the error log under verbose option:
Unlike Netbeans' error message, this one is totally bogus. Anyway, because of what happened in Netbeans, I suspected it was the JVM stack size option again, so I added "AddVMOption -Xss4M" to the jdev/bin/ide.conf, just above where the -Xms option was set.
The problem instantly disappeared. Seems to me the default JVM stack size on Linux is too small for a number of graphic heavy Java applications. I wonder if this is a bug with the Hotspot JVM implementation on Linux.
Here's the error log under verbose option:
steven@family-room:/opt/sqldeveloper$ ./sqldeveloper.sh -verbose
Oracle SQL Developer
Copyright (c) 2006, 2007, Oracle. All rights reserved.
Reading configuration from: /opt/sqldeveloper/sqldeveloper/bin/sqldeveloper.conf
Working directory is /opt/sqldeveloper/sqldeveloper/bin
Running Command: /usr/lib/jvm/java-6-sun-1.6.0.06/bin/../jre/bin/java -Xmx512M -Xverify:none -XX:JavaPriority10_To_OSPriority=10 -XX:JavaPriority9_To_OSPriority=9 -Dapple.laf.useScreenMenuBar=true -Dcom.apple.mrj.application.apple.menu.about.name=SQL_Developer -Dcom.apple.mrj.application.growbox.intrudes=false -Dcom.apple.macos.smallTabs=true -Doracle.ide.util.AddinPolicyUtils.OVERRIDE_FLAG=true -Dsun.java2d.ddoffscreen=false -Dide.update.masterserver=http://www.oracle.com/technology/software/products/sql/master.xml -Dwindows.shell.font.languages= -Dide.AssertTracingDisabled=true -Doracle.ide.util.AddinPolicyUtils.OVERRIDE_FLAG=true -Djava.util.logging.config.file=logging.conf -Dide.conf="/opt/sqldeveloper/sqldeveloper/bin/sqldeveloper.conf" -Dide.startingcwd="/opt/sqldeveloper/sqldeveloper/bin" -Dide.home.dir.name=.sqldeveloper -classpath ../../ide/lib/ide-boot.jar:../../jdev/lib/xmleditor.jar:../../ide/lib/oicons.jar:../../jlib/jewt4.jar:../../jlib/share.jar:../../sqldeveloper/lib/jle2.jar:../../sqldeveloper/lib/oracle.dbtools.logging.jar oracle.ide.boot.Launcher
Using oracle.home=/opt/sqldeveloper
Using ide.user.dir=/home/steven/.sqldeveloper
/opt/sqldeveloper/sqldeveloper/bin/../../ide/bin/launcher.sh: line 478: 19573 Segmentation fault ${JAVA} ${APP_VM_OPTS} ${APP_SCRIPT_USER_HOME} ${APP_ENV_VARS} -classpath ${APP_CLASSPATH} ${APP_MAIN_CLASS} ${APP_APP_OPTS}
Error: SQL Developer can't recognize the JDK version
Unlike Netbeans' error message, this one is totally bogus. Anyway, because of what happened in Netbeans, I suspected it was the JVM stack size option again, so I added "AddVMOption -Xss4M" to the jdev/bin/ide.conf, just above where the -Xms option was set.
The problem instantly disappeared. Seems to me the default JVM stack size on Linux is too small for a number of graphic heavy Java applications. I wonder if this is a bug with the Hotspot JVM implementation on Linux.
Labels:
-Xss option,
JVM,
linux,
Stack size overflow
Sunday, August 24, 2008
Netbeans Crash in Linux / Kubuntu
When I launched the Java IDE Netbeans 6.1 today, I got this error:
As you can see, the error is caused by a stack overflow. Of course, a number of items can go wrong with that, for example, some code with bad recursive calls; however, my Netbeans had been working fine, so I thought the default thread size might be too small for Netbeans.
The stack size option in JVM (not to be confused with heap size options) is set by using the Xss flag. As you can see from the stack trace above (no pun intended), the default stack size was 2MB. A grep on the netbean folder revealed that this is being set in etc/netbeans.conf like this:
netbeans_default_options="-J-Dcom.sun.aas.installRoot=\"/home/steven/glassfish-v2ur2\" -J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m
I changed the -Xss from 2m to 4m and launched Netbeans again.
Voila. Problem solved.
PS -- each project in Netbeans has its own runtime settings. You may need to add the -Xss option to the project property (right click on the project name and select property, then select run --> vm options)
steven@family-room:~/netbeans-6.1/bin$ ./netbeans
An irrecoverable stack overflow has occurred.
#
# An unexpected error has been detected by Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0xb7e249bc, pid=25679, tid=3019492240
#
# Java VM: Java HotSpot(TM) Client VM (10.0-b22 mixed mode, sharing linux-x86)
# Problematic frame:
# C [libc.so.6+0x739bc] memcpy+0x1c
#
# An error report file with more information is saved as:
# /home/steven/netbeans-6.1/bin/hs_err_pid25679.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
./../platform8/lib/nbexec: line 466: 25679 Aborted "/usr/lib/jvm/java-6-sun/bin/java" -Djdk.home="/usr/lib/jvm/java-6-sun" -classpath "/home/steven/netbeans-6.1/platform8/lib/boot.jar:/home/steven/netbeans-6.1/platform8/lib/org-openide-modules.jar:/home/steven/netbeans-6.1/platform8/lib/org-openide-util.jar:/home/steven/netbeans-6.1/platform8/lib/locale/boot_ja.jar:/home/steven/netbeans-6.1/platform8/lib/locale/boot_pt_BR.jar:/home/steven/netbeans-6.1/platform8/lib/locale/boot_zh_CN.jar:/home/steven/netbeans-6.1/platform8/lib/locale/org-openide-modules_ja.jar:/home/steven/netbeans-6.1/platform8/lib/locale/org-openide-modules_pt_BR.jar:/home/steven/netbeans-6.1/platform8/lib/locale/org-openide-modules_zh_CN.jar:/home/steven/netbeans-6.1/platform8/lib/locale/org-openide-util_ja.jar:/home/steven/netbeans-6.1/platform8/lib/locale/org-openide-util_pt_BR.jar:/home/steven/netbeans-6.1/platform8/lib/locale/org-openide-util_zh_CN.jar:/usr/lib/jvm/java-6-sun/lib/dt.jar:/usr/lib/jvm/java-6-sun/lib/tools.jar" -Dnetbeans.dirs="/home/steven/netbeans-6.1/nb6.1:/home/steven/netbeans-6.1/ide9:/home/steven/netbeans-6.1/java2:/home/steven/netbeans-6.1/xml2:/home/steven/netbeans-6.1/apisupport1:/home/steven/netbeans-6.1/enterprise5:/home/steven/netbeans-6.1/mobility8:/home/steven/netbeans-6.1/profiler3:/home/steven/netbeans-6.1/gsf1:/home/steven/netbeans-6.1/ruby2:/home/steven/netbeans-6.1/visualweb2:/home/steven/netbeans-6.1/soa2:/home/steven/netbeans-6.1/identity2:/home/steven/netbeans-6.1/uml5:/home/steven/netbeans-6.1/harness:/home/steven/netbeans-6.1/cnd2:" -Dnetbeans.home="/home/steven/netbeans-6.1/platform8" '-Dnetbeans.importclass=org.netbeans.upgrade.AutoUpgrade' '-Dnetbeans.accept_license_class=org.netbeans.license.AcceptLicense' '-Xmx161m' '-Dcom.sun.aas.installRoot=/home/steven/glassfish-v2ur2' '-client' '-Xss2m' '-Xms32m' '-XX:PermSize=32m' '-XX:MaxPermSize=200m' '-Xverify:none' '-Dapple.laf.useScreenMenuBar=true' '-Dsun.java2d.noddraw=true' org.netbeans.Main --userdir "/home/steven/.netbeans/6.1" "--branding" "nb"
As you can see, the error is caused by a stack overflow. Of course, a number of items can go wrong with that, for example, some code with bad recursive calls; however, my Netbeans had been working fine, so I thought the default thread size might be too small for Netbeans.
The stack size option in JVM (not to be confused with heap size options) is set by using the Xss flag. As you can see from the stack trace above (no pun intended), the default stack size was 2MB. A grep on the netbean folder revealed that this is being set in etc/netbeans.conf like this:
netbeans_default_options="-J-Dcom.sun.aas.installRoot=\"/home/steven/glassfish-v2ur2\" -J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m
I changed the -Xss from 2m to 4m and launched Netbeans again.
Voila. Problem solved.
PS -- each project in Netbeans has its own runtime settings. You may need to add the -Xss option to the project property (right click on the project name and select property, then select run --> vm options)
Labels:
Java,
linux,
Netbeans,
Stack size overflow
Unix for Dummies --musings from a gcc install
Unix admins are a curious bunch.
Exhibit A. Someone posted this message on one of the Unix chat boards:
And the answers from those helpful Unix admins on the board? They ranged from "You are running out of space." to "run a df -k".
Well, duh. I think common sense is not a popular trait among the admins.
The space error message is a problem commonly encountered during the installation of a very large package, like the gcc. 95% of the time, the answer is: the /var partition is almost full. Specifically, it is the /var/sadmin directory which contains all the package install information. To solve the problem, move the directory to another partition, and create a sym link in its old place.
Exhibit A. Someone posted this message on one of the Unix chat boards:
Help! My gcc install failed. The error message I got is:
(sparc) 2.95.3
cpio: Cannot write "reloc/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/cc1", errno 28
, No space left on device
And the answers from those helpful Unix admins on the board? They ranged from "You are running out of space." to "run a df -k".
Well, duh. I think common sense is not a popular trait among the admins.
The space error message is a problem commonly encountered during the installation of a very large package, like the gcc. 95% of the time, the answer is: the /var partition is almost full. Specifically, it is the /var/sadmin directory which contains all the package install information. To solve the problem, move the directory to another partition, and create a sym link in its old place.
Labels:
gcc install,
No space left on device,
solaris 10
Saturday, August 23, 2008
Install Samsung ML-1740 Printer in Solaris 10
The Samsung ML-1740 is a non-postscript laser printer. To print in Solaris, I decided to install and run CUPS (common unix printing system) instead of using the standard lpcommand in Solaris
Why?
Because I know CUPS will work since that's what my Kubuntu runs.
The major steps to install and configure Samsung ML-1740 in Solaris 10 are:
1. Install CUPS. You could use a pre-compiled CUPS package (freely available from the Sun Solaris Optional Component DVD and the Solaris web site), or you could download the latest source code from www.cups.org and build the binary yourself. I've tried both and would HIGHLY recommend using the latest CUPS (version 1.3.8). It's less buggy, plays nicely with clients like Firefox and has some additional niceties, like letting you browse for a printer driver file, and telling you when a particular filter specified by your printer's driver is missing.
2. Start CUPS.
/etc/init.d/cups start
Point your browser to the CUPS management interface at localhost:631 Make sure CUPS is running and you can see the management interface before continue.
3. Get the printer driver. Because the foomatic gdi driver is platform independent, I simply use the same one I have on Kubuntu, which I downloaded from OpenPrinting.org
4. Install the foomatic-rip filter.
Because my printer is not a postscript printer, the gdi driver downloaded in step 2 uses the foomatic-rip filter to translate the postscript language for CUPS. The foomatic filter is not installed by default from either CUPS package, so I again got mine off the OpenPrinting.org web site. The foomatic tar file link is here.
5. Configure the printer in CUPS. Add the printer to your user preference.
In Kubuntu, it takes all of 2 minutes to get my Samsung ML-1740 laser printer set up. But things got a lot more interesting when I tried to follow all the steps above to install the printer in Solaris.
Stay tuned if you are interested in some troubleshooting tips with CUPS in Solaris and Foomatic printer drivers. I can tell you the story does have a happy ending...
Why?
Because I know CUPS will work since that's what my Kubuntu runs.
The major steps to install and configure Samsung ML-1740 in Solaris 10 are:
1. Install CUPS. You could use a pre-compiled CUPS package (freely available from the Sun Solaris Optional Component DVD and the Solaris web site), or you could download the latest source code from www.cups.org and build the binary yourself. I've tried both and would HIGHLY recommend using the latest CUPS (version 1.3.8). It's less buggy, plays nicely with clients like Firefox and has some additional niceties, like letting you browse for a printer driver file, and telling you when a particular filter specified by your printer's driver is missing.
2. Start CUPS.
/etc/init.d/cups start
Point your browser to the CUPS management interface at localhost:631 Make sure CUPS is running and you can see the management interface before continue.
3. Get the printer driver. Because the foomatic gdi driver is platform independent, I simply use the same one I have on Kubuntu, which I downloaded from OpenPrinting.org
4. Install the foomatic-rip filter.
Because my printer is not a postscript printer, the gdi driver downloaded in step 2 uses the foomatic-rip filter to translate the postscript language for CUPS. The foomatic filter is not installed by default from either CUPS package, so I again got mine off the OpenPrinting.org web site. The foomatic tar file link is here.
5. Configure the printer in CUPS. Add the printer to your user preference.
In Kubuntu, it takes all of 2 minutes to get my Samsung ML-1740 laser printer set up. But things got a lot more interesting when I tried to follow all the steps above to install the printer in Solaris.
Stay tuned if you are interested in some troubleshooting tips with CUPS in Solaris and Foomatic printer drivers. I can tell you the story does have a happy ending...
Labels:
CUPS,
foomatic gdi driver,
Samsung ML-1740,
Solaris printing
Thursday, August 21, 2008
Linux Filesystem Viewer for Windows
Linux has long been able to mount both Windows NTFS and FAT file systems, but the reverse is not true in Windows.
To view a ext2 or ext3 file system, I tried a tool called DiskInternals Linux Reader, downloaded from the company's web site: http://www.diskinternals.com/download.shtml. I installed it on my dual boot Windows XP/Kubuntu server.
I can now see my Linux file systems in Windows XP, but if you need to read the files, you'd have to use the recovery option in the DiskInternals tool and make a copy of the file.
I guess it works for those emergency situations that you need to get a file from the Linux partition, but it is not very convenient.
So I tried a second software, called Ext2 Installable File System For Windows, from http://www.fs-driver.org/download.html. Despite the name of the product, the software works for both Ext2 and Ext3 file systems, and you have the option of disabling the write access to the Linux partition. After the install, you can mount the Linux partitions to their own drive letters, and they show up just like any other NT drives. By the way, the configuration is done through a file, ifsdrives.cpl in Windows XP, which you access through the control panel.
There are some technical issues related to mounting of an Ext3 partition vs. an Ext2 one. The Ext3 file system is the Ext2 file system which has been extended by journaling. It is backward-compatible to Ext2 - an Ext3 volume can be mounted and used as an Ext2 volume. The Ext2 IFS software is smart enough to check the Ext3 file system and will refuse mounting an Ext3 file system which contains data in its journal, just like older Linux kernels which have no Ext3 support. This way, it avoids potentially corrupting the file system in case of a prior system crash in Linux.
All and all, the IFS software is a great tool. Kudos to the folks at fs-driver.org.
To view a ext2 or ext3 file system, I tried a tool called DiskInternals Linux Reader, downloaded from the company's web site: http://www.diskinternals.com/download.shtml. I installed it on my dual boot Windows XP/Kubuntu server.
I can now see my Linux file systems in Windows XP, but if you need to read the files, you'd have to use the recovery option in the DiskInternals tool and make a copy of the file.
I guess it works for those emergency situations that you need to get a file from the Linux partition, but it is not very convenient.
So I tried a second software, called Ext2 Installable File System For Windows, from http://www.fs-driver.org/download.html. Despite the name of the product, the software works for both Ext2 and Ext3 file systems, and you have the option of disabling the write access to the Linux partition. After the install, you can mount the Linux partitions to their own drive letters, and they show up just like any other NT drives. By the way, the configuration is done through a file, ifsdrives.cpl in Windows XP, which you access through the control panel.
There are some technical issues related to mounting of an Ext3 partition vs. an Ext2 one. The Ext3 file system is the Ext2 file system which has been extended by journaling. It is backward-compatible to Ext2 - an Ext3 volume can be mounted and used as an Ext2 volume. The Ext2 IFS software is smart enough to check the Ext3 file system and will refuse mounting an Ext3 file system which contains data in its journal, just like older Linux kernels which have no Ext3 support. This way, it avoids potentially corrupting the file system in case of a prior system crash in Linux.
All and all, the IFS software is a great tool. Kudos to the folks at fs-driver.org.
Labels:
accessing EXT3 in Windows,
DiskInternals,
fs-driver,
linux
Subscribe to:
Posts (Atom)