13 December 2007

Technical Error with Rhapsody on Linux

I use Rhapsody's streaming service from within Firefox 2.0 on Linux. It works as a Firefox plugin.

Recently (maybe when upgrading to Ubuntu 7.10?) it refused to play any music. I found a couple of issues:
  1. It wouldn't authenticate me properly. I found that by deleting all my Rhapsody cookies and restarting Firefox that problem went away.
  2. It simply refused to play music, each time reporting a "Technical Error". Selecting "Try again" never worked and it eventually crashed Firefox.
The cause of the technical error appears to be due to the "esd" process running under Gnome. ESD apparently is a mixer that lets multiple apps play sound at the same time (it probably does a lot more too).

A number of people suggest killing it and that worked for me.
The steps are:
  1. Open a terminal window
  2. killall esd
  3. Restart Firefox
  4. Use Rhapsody again
This works every time for me.

I'm speculating that Rhapsody refuses to work when that is running to try and prevent people from capturing the streaming audio?

I currently have an issue open with Real Networks. I documented the above workaround but outlined that it would be great if it either gave a much more obvious error message, or worked without requiring termination of esd. Here was their last reply. I don't hold out much hope.

Hello,

My name is ******. I am a Real Networks Tier 2 Technical Support Representative. Your case has been escalated to our department due to severity. Thank you for your continued patience, and I would like to apologize for any inconvenience you may have experienced so far.

I have followed this thread since the day you initiated it. As I understand it you wish for a better work-around to technical errors playing Rhapsody Online content. I can help you with this.

I have forwarded the information regarding this work-around to the Rhapsody team for further investigation. However since there is limited support for Linux and Rhapsody Online I do not know if/when another solution will be available.

Please reply to this email with any further questions or concerns.

Thank you,

RealNetworks Technical Support
Tier 2 Escalation Department

27 January 2007

Hibernate identity column insert ignores update count on Sybase

Ran into a problem whereby an insert into a Sybase database failed but Hibernate reported no error. Instead a PK value of zero was assigned.

Posted a question on the forums
Sybase numeric overflow on insert does not fail as expected

but then decided to file a JIRA issue HHH-2388: Insert w/ identity column fails on Sybase but no exception occurs

23 January 2007

Maven 2 Surefire plugin works with Junit 4

The latest snapshot of the Surefire plugin for Maven2 now works with JUnit4. Read about it on the JIRA issue.

To use it right now you'll need to add a pluginRepository and declare a specific version of the plugin.

Here is a complete pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>test-junit4</groupId>
<artifactId>test</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.1</version>
</dependency>
</dependencies>
<build>
<defaultGoal>test</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.3-SNAPSHOT</version>
</plugin>
</plugins>
</build>
<pluginRepositories>
<pluginRepository>
<id>maven-snapshot-repository</id>
<url>http://people.apache.org/maven-snapshot-repository</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>

22 November 2006

VMware guest clock runs fast

I'm running VMWare Server on a dual core laptop with Ubuntu. I was finding the guest clock on my Windows XP guest was running fast. Since I use the Windows guest for running Outlook, I found my meeting reminders were appearing hours early.

The problem appears to be due to cpu frequency scaling. The article Host Power Management Causes Problems with Guest Timekeeping on Linux Hosts has details on solving the problem.

You have to edit a config file to specify your max cpu frequency. You can find it out in a couple of ways:

$ cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq
1833000

or

$ cpufreq-info
cpufrequtils 002: cpufreq-info (C) Dominik Brodowski 2004-2006
Report errors and bugs to linux@brodo.de, please.
analyzing CPU 0:
driver: centrino
CPUs which need to switch frequency at the same time: 0
hardware limits: 1000 MHz - 1.83 GHz
available frequency steps: 1.83 GHz, 1.33 GHz, 1000 MHz
available cpufreq governors: userspace, powersave, ondemand, conservative, performance
current policy: frequency should be within 1000 MHz and 1.83 GHz.
The governor "ondemand" may decide which speed to use
within this range.
current CPU frequency is 1000 MHz.
analyzing CPU 1:
driver: centrino
CPUs which need to switch frequency at the same time: 1
hardware limits: 1000 MHz - 1.83 GHz
available frequency steps: 1.83 GHz, 1.33 GHz, 1000 MHz
available cpufreq governors: userspace, powersave, ondemand, conservative, performance
current policy: frequency should be within 1000 MHz and 1.83 GHz.
The governor "ondemand" may decide which speed to use
within this range.
current CPU frequency is 1000 MHz.

or (verified on Mac)

$ sysctl -a | grep cpufreq
hw.cpufrequency = 2400000000
hw.cpufrequency_max: 2400000000
hw.cpufrequency_min: 2400000000
hw.cpufrequency: 2400000000


Since my max CPU is 1.83 GHz, I added these lines to /etc/vmware/config:

host.cpukHz = 1830000
host.noTSC = TRUE
ptsc.noTSC = TRUE



I restarted VMware. So far, it seems to be keeping time. I think it simply stops the clock getting ahead of itself, then the VMWare Tools time synchronization ensures if it runs slow, it periodically catches up to the correct time.

03 October 2006

Vmware won't start on Edgy Eft

After upgrading to Ubuntu 6.10 Edgy Eft (beta), vmware fails to start.

Problem outlined here: libhal1 0.5.7.1-0ubuntu8 with new dbus breaks vmware.

Comment #4 solves it.

Juniper Networks network connect on Ubuntu

Was trying to get the Java-applet / browser based network connect to work on Ubuntu.

This site Kubuntu Dapper, Juniper SSL VPN got most of the way.

My only issue were the names of the openssl and crypto libraries. Mine were 0.9.8 instead. Aside from that, everything worked.

26 September 2006

Up arrow in Java console input on Linux

[edit] Whaddaya know, this is documented here: http://wiki.python.org/jython/ReadlineSetup

So I was running Jython on Linux which has a console application for entering Jython commands. Unfortunately pressing the up-arrow did not recall the last command in the history. Instead, it printed the escape code for up-arrow (^[[A).

I've seen this problem before on Linux. Not sure if it is limited to Java console applications. I'm not even sure why it occurs. Perhaps something to do with buffered input?

Anyway, I did find a solution: JLine. You don't even have to modify a program to get it to work. You can wrap the invocation of the Java main class as follows:


java -cp jline-0.9.9.jar jline.ConsoleRunner MyMainClass


So my command line for Jython became:

java -classpath "jline-0.9.9.jar:jython.jar:$CLASSPATH" jline.ConsoleRunner org.python.util.jython


You can simply edit the Jython startup script to add the JLine jar and insert the jline.ConsoleRunner before the jython main class.

Up-arrow now recalls the last command. Left, right and down arrow work too.

18 September 2006

Enabling Oracle Managed Files

It turns out I was wrong about Oracle XE not supporting Oracle Managed Files. It is just turned off by default. Here is how to turn it on:


sqlplus system@XE
...
SQL> alter system set db_create_file_dest='/usr/lib/oracle/xe/oradata/';

System altered.


You can confirm it works with:

SQL> create tablespace my_test_tablespace datafile size 1M;

Tablespace created.

SQL> select file_name from dba_data_files;

FILE_NAME
--------------------------------------------------------------------------------
/usr/lib/oracle/xe/oradata/XE/users.dbf
/usr/lib/oracle/xe/oradata/XE/sysaux.dbf
/usr/lib/oracle/xe/oradata/XE/undo.dbf
/usr/lib/oracle/xe/oradata/XE/system.dbf
/usr/lib/oracle/xe/oradata/XE/datafile/o1_mf_my_test__2jxoyjpr_.dbf

SQL> drop tablespace my_test_tablespace;

Tablespace dropped.

SQL> exit

Oracle 10g Standard Edition on Ubuntu

I've been using Oracle XE on Ubuntu 6.06 (installed from http://oss.oracle.com/debian). It works fine. However, I was trying to create a database from scripts provided to me that assumed Oracle Managed Files were supported.

That is, the scripts attempted to create a tablespace without explicitly naming the datafile.

This failed on XE. I figured I could install Oracle 10g Standard Edition. However, the installer wouldn't even run. It fails after performing a distribution check.

You can workaround this issue with the following command to run the installer:

./runInstaller -ignoreSysPrereqs

The only other issue I encountered is documented here:
http://forums.oracle.com/forums/thread.jspa?threadID=413032&tstart=0

Make sure that you either remove Oracle XE or override $ORACLE_HOME to point to your new Oracle home before executing those commands.

This also seems to be a good reference http://www.dizwell.com/prod/node/52