Sunday, December 30, 2007

3 Solutions to GNOME/VNC keyboard mapping issue

I am trying to connect to my workstation in the office via vncviewer and I got scrambled keys in GNOME before I applied one of the fixes below. This has bugged me for more than a week and Google couldn't really give me a good answer until I searched for:

asdf abfh vnc

Try.

It is a bug reported at #108928 and duplicated at #112955. Appears more like a GNOME issue than a VNC issue.

Solution #1: Use vnc4server -extension XFIXES

No, I did not try this because I simply do not want to change my client. The workaround basically requires you to remove tightvncserver and use vnc4server instead. Refer to this and this for more information.

Solution #2: Avoid executing gnome-session

Instead of running gnome-session, run the following commands in your xstartup script or manually in xterm:

gnome-wm &
gnome-panel &
gnome-cups-icon &
gnome-volume-manager &

Suggested by Randy at this link.

Solution #3: Reset the keyboard layout via gconf-editor

This solution works the best in my opinion, suggested by Will at this link. Open up gconf-editor in your X then navigate to:

desktop > gnome > peripherals > keyboard > kbd

You will probably be seeing empty value [] or [us] for the layouts. Enter anything say foo, close the application and your problem should now be fixed.

- yc, one problem in life down

Sunday, December 23, 2007

Quick Dive into CXF

REST
REST is no longer a new term, you are probably falling too far behind if you haven't yet heard of it. Daniel Diephouse, the creator of XFire (who is also now a Software Architect of MuleSource) wrote an interesting article about REST and SOA not too long ago, he sees REST as the next big trend in SOA.

If you are into this and if you are a Java guy, you may also be aware of the JSR 311 - The JavaTM API for RESTful Web Services and the Jersey (implementation). You would have also been told that Apache Axis 2.0 and Apache CXF (Celtic XFire) supports REST.

The rest of the blog entry, I will be sharing about how I toyed around with CXF, after taking a quick glance at it and learned how easy using it to write a Web-/REST- service.

Get a POM
<?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>sandbox</groupId>
<artifactId>apache-cxf</artifactId>
<version>2007.12.18</version>

<properties>
<cxf.version>2.1-incubator-SNAPSHOT</cxf.version>
<spring.version>2.0.6</spring.version>
</properties>

<repositories>
<repository>
<id>apache.incubating.releases</id>
<name>Apache Incubating Release Distribution Repository</name>
<url>http://people.apache.org/repo/m2-incubating-repository</url>
</repository>
<repository>
<id>apache.snapshot.releases</id>
<name>Apache Snapshot Release Distribution Repository</name>
<url>http://people.apache.org/repo/m2-snapshot-repository</url>
</repository>
</repositories>

<dependencies>

<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.1</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
</dependency>

<!-- Depending on your requirements you may need more or less modules from cxf -->
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-core</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-simple</artifactId>
<version>${cxf.version}</version>
</dependency>
<!-- REST!! -->
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-databinding-aegis</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-local</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http-jetty</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-jms</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-management</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-common-utilities</artifactId>
<version>${cxf.version}</version>
</dependency>
<!--dependency>
<groupId>jersey</groupId>
<artifactId>jersey</artifactId>
<version>0.4-ea</version>
</dependency-->
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>0.4</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.2</version>
<scope>test</scope>
</dependency>

</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>

</project>


Write the Code
Once you have built the project into your favourite IDE, start writing the code:
  1. A service interface

  2. A service implementation

  3. A Java main class


package sandbox.cxf.api;
import javax.jws.WebParam;
import javax.jws.WebService;

import sandbox.cxf.resources.Author;
import sandbox.cxf.resources.Message;

@WebService(name = "sampleService")
public interface SampleService {

public Message getEcho(@WebParam(name="input") String string);
...
}

package sandbox.cxf.services;
import javax.jws.WebService;
import javax.ws.rs.HttpMethod;
import javax.ws.rs.UriParam;
import javax.ws.rs.UriTemplate;

import sandbox.cxf.api.SampleService;
import sandbox.cxf.resources.Message;

@UriTemplate("/sampleService")
@WebService(endpointInterface="sandbox.cxf.api.SampleService", serviceName="defaultSampleService")
public class DefaultSampleService implements SampleService{

@HttpMethod("GET")
@UriTemplate("/echo/{input}")
public Message getEcho(@UriParam("input") String string){

System.out.println("Echoing message of " + string);

Message message = new Message();
message.setBody(string);

return message;
}
...
}


No *.properties or *.xml crap, this is how quickly you can configure and boot a SOAP and REST service:

SampleService sampleService = new DefaultSampleService();

JaxWsServerFactoryBean wsServerfactoryBean = new JaxWsServerFactoryBean();
wsServerfactoryBean.setServiceClass(SampleService.class);
wsServerfactoryBean.setAddress("http://localhost:8081/sampleService");
wsServerfactoryBean.setServiceBean(sampleService);
wsServerfactoryBean.create();

JAXRSServerFactoryBean restServerFactoryBean = new JAXRSServerFactoryBean();
restServerFactoryBean.setResourceClasses(Message.class);
restServerFactoryBean.setBindingId(JAXRSBindingFactory.JAXRS_BINDING_ID);
restServerFactoryBean.setServiceBeans(sampleService);
restServerFactoryBean.setAddress("http://localhost:8082/");
restServerFactoryBean.create();


Add logging interceptors if you want some logging and debugging:

wsServerfactoryBean.getInInterceptors().add(new LoggingInInterceptor());
wsServerfactoryBean.getOutInterceptors().add(new LoggingOutInterceptor());


Try Now
Once you have done the above, try to access the services via browser, e.g.

REST: http://localhost:8082/sampleService/echo/foobar
<message>  <body>foobar</body>
</message>


SOAP: http://localhost:8081/sampleService/getEcho?input=foobar
<soap:envelope soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:body>
<ns1:getechoresponse ns1="http://api.cxf.sandbox/">
<ns2:message ns2="http://api.cxf.sandbox/">
<body>foobar</body>
</ns2:Message>
</ns1:getEchoResponse>
</soap:Body>
</soap:Envelope>


Isn't that quick? ;-)

- yc

Monday, December 17, 2007

Malaysia is not much open-source penetrated

Wandering around in Google, I found this list which I actually took a look a few months back:


MAMPU, the Malaysian Administration Modernisation and Management Planning Unit, is appointed to implement the OSS initiative in the Malaysia public sector.

Of course, I am happy to see such move taken by our government, but I feel like there are still a lot of works to do.

I give my support to the folks at Open Malaysia too.

- yc

Friday, December 14, 2007

I thought I was Recharged

For a moment, I thought I was recharged after a cool holiday with some church kids in the past 4 days.. but now, being back to the real world, I feel so tired again.

One exciting news to share about is that I won a place (not the top-3 though, I heard) in the eGenting programming competition. And I'm on my way to attend the presentation night in an hour time.

Updated: I got a merit, not too bad. I believe it's the rich use of Java APIs (Pattern, Comparable, Collections) on the merge-sort question that made me one of the winners.

But there are more bullshit than good news, all thanks to GPRS (little Jen doesn't support 3G). See:
We have just set up a series of polls in our company (internal wiki) for the "Best of 2007". Now I wonder, what're the "Best of 2007" in Malaysia and how're you going to end yours.

- yc

Sunday, December 9, 2007

Human Rights Day

"When lawyers and the rakyat fail to march just because the police prefer to arrest people rather than protect them - the nation loses big time...

This is our right to march peacefully on the street. We can’t let them take it away from us."


10th of December is the Human Rights Day, the Malaysian government, however, hasn't been respecting it much and arresting the people happened to peacefully walk today.

The quote above is taken from Li Tsin's recent entry, do check it out. More stories in Jeff Ooi's blog.

- yc

Wednesday, December 5, 2007

A little bit of 'target jsr14'

I was taking a look at the Mule's CXF transport which requires Java 5.0. While doing that, I ranted about the annotations feature to one of my colleagues (I simply do not like the idea that having "@Override" in my code stops my 1.4 compiler, why not "// @Override").

I then read about this article -- Using Java 5 language features in earlier JDKs which mentions about the jsr14 (oh, I haven't tried it before, really). Specifying "jsr14" as your target VM version is a workaround of having 1.5 source to run on earlier JVM, however, it is not recommended by Sun, not supported, and not documented. Refer to this document for supported target values.

For that case, I wasn't too surprised that I can't read much about its details with a few Google search attempts.

These are what I have tried:

import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import java.util.Vector;

public class Source{

private List foo = null;

public List getFoo(){
return this.foo;
}

public void setFoo(List foo){
this.foo = new ArrayList(foo);
}

@Deprecated
public String toString(){
return "Foobar always!";
}

public static void main(String[] args)
throws Exception{

Method method = Source.class.getMethod("toString", new Class[]{});
if(method.isAnnotationPresent(Deprecated.class)){
System.out.println("toString is deprecated! :-|");
}

List foo = new Vector();
foo.add("Foo");
foo.add("Bar");

Source src = new Source();
src.setFoo(foo);

for(String fooElement: src.getFoo()){
System.out.println(fooElement);
}
}
}


Deprecated has a @Retention(RetentionPolicy.RUNTIME) (see An Overview of Java 5's Annotations). Then, compiled with 1.5:

/opt/java1.5/bin/javac -verbose Source.java -source 1.5 -target 1.5
[parsing started Source.java]
[parsing completed 39ms]
[search path for source files: [.]]
[search path for class files: [/usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar, /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/jsse.jar, /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/jce.jar, /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/charsets.jar, /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/ext/sunjce_provider.jar, /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/ext/localedata.jar, /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/ext/sunpkcs11.jar, /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/ext/dnsns.jar, .]]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/reflect/Method.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/util/ArrayList.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/util/List.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/util/Vector.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/Object.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/String.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/Exception.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/Deprecated.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/annotation/Annotation.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/annotation/Retention.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/annotation/RetentionPolicy.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/annotation/Target.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/annotation/ElementType.class)]
[checking Source]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/util/Collection.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/util/AbstractList.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/util/AbstractCollection.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/Iterable.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/Throwable.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/Class.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/NoSuchMethodException.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/SecurityException.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/reflect/AccessibleObject.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/System.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/io/PrintStream.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/io/FilterOutputStream.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/io/OutputStream.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/Error.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/RuntimeException.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/util/Iterator.class)]
[wrote Source.class]
[total 335ms]


Running using 1.4:

/opt/j2sdk1.4/bin/java Source
Exception in thread "main" java.lang.UnsupportedClassVersionError: Source (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)


Recompile with jsr14:

/opt/java1.5/bin/javac -verbose Source.java -source 1.5 -target jsr14
[parsing started Source.java]
[parsing completed 47ms]
[search path for source files: [.]]
[search path for class files: [/usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar, /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/jsse.jar, /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/jce.jar, /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/charsets.jar, /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/ext/sunjce_provider.jar, /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/ext/localedata.jar, /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/ext/sunpkcs11.jar, /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/ext/dnsns.jar, .]]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/reflect/Method.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/util/ArrayList.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/util/List.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/util/Vector.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/Object.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/String.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/Exception.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/Deprecated.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/annotation/Annotation.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/annotation/Retention.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/annotation/RetentionPolicy.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/annotation/Target.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/annotation/ElementType.class)]
[checking Source]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/util/Collection.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/util/AbstractList.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/util/AbstractCollection.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/Iterable.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/Throwable.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/Class.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/NoSuchMethodException.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/SecurityException.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/reflect/AccessibleObject.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/System.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/io/PrintStream.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/io/FilterOutputStream.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/io/OutputStream.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/Error.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/RuntimeException.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/NoClassDefFoundError.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/LinkageError.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/lang/ClassNotFoundException.class)]
[loading /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/rt.jar(java/util/Iterator.class)]
[wrote Source.class]
[total 366ms]


Re-run with 1.4:

/opt/j2sdk1.4/bin/java Source Exception in thread "main" java.lang.NoClassDefFoundError
at Source.class$(Source.java:26)
at Source.main(Source.java:27)
Caused by: java.lang.ClassNotFoundException: java.lang.Deprecated
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
... 2 more


Ouchhh :(

Get rid of Deprecated.class from code, recompile and run:

/opt/j2sdk1.4/bin/java Source
Foo
Bar


Pfffft? ;)

- yc

Monday, December 3, 2007

JIRA Transport 1.0 Released

I have released my MuleForge project -- JIRA Transport yesterday. The transport enables easy integration of Mule (the leading open source ESB) with JIRA, and at this version, it has yet to support message receiving.

Click here to find out more about it.

- yc