January 20, 2005

失敗: Resin on Kaffe

今天的進度是作 Kaffe 的 J2EE 支援,我選定的 JSP/Servlet Container 是 Resin,Resin 3.0 雖然以 GPL 釋出,但是 Kaffe 目前尚未實作出 JDK 1.5 的特徵,所以還不能考慮,不過如果成功的話,GPL'd J2EE container on GPL'd JavaVM on LGPL'd C library on GPL'd Kernel 真的是很吸引人。

好,回到 Resin 2.1.x 系列,在去年我曾經在 Kaffe mailling-list 提到 [Resin 2.1.12 runs on Kaffe smoothly],然而,剛剛用 Resin-2.1 的 cvs snapshot-2005-01-03 時,發現以下問題:
 
$ ./httpd.sh
Resin 2.1.s050103 (built Mon Jan  3 11:16:04 PST 2005)
Copyright(c) 1998-2003 Caucho Technology.  All rights reserved.

Starting Resin on Thu, 20 Jan 2005 23:34:37 +0800 (CDT)
java.lang.reflect.InvocationTargetException
   at java.lang.reflect.Method.invoke0 (Method.java)
   at java.lang.reflect.Method.invoke (Method.java:255)
   at com.caucho.util.BeanUtil.setBeanProperty (BeanUtil.java:537)
   at com.caucho.util.BeanUtil.configure (BeanUtil.java:370)
   at com.caucho.util.BeanUtil.createBean (BeanUtil.java:153)
   at com.caucho.server.http.JndiFactory.initContext (JndiFactory.java:294)
   at com.caucho.server.http.ClassLoaderContext.init (ClassLoaderContext.java:696)
   at com.caucho.server.http.ServletServer.initInternal (ServletServer.java:694)
   at com.caucho.server.http.ServletServer.init (ServletServer.java:538)
   at com.caucho.server.http.ResinServer.init (ResinServer.java:415)
   at com.caucho.server.http.ResinServer.main (ResinServer.java:1176)
   at com.caucho.server.http.HttpServer.main (HttpServer.java:103)
Caused by: java.lang.StackOverflowError
   at com.caucho.sql.DBPool.setMaxIdleTime (DBPool.java)
   at java.lang.reflect.Method.invoke0 (Method.java)
   ...11 more
看來有得 hacking 了。
由 jserv 發表於 January 20, 2005 11:46 PM
迴響

我記得kaffe 可以 run tomcat 和 jboss? is it?
BTW, kaffe 所含的 lib 目前 有support 到 sun sdk 多少?? 我看到classpath announcment; classpath的lib好像有道 1.4的某些特徵.

elwe 發表於 February 4, 2005 04:47 PM

Kaffe 可配合 Tomcat 5.5 運作,也可以配合版本較低的 JBoss,GNU Classpath 已經幾乎實現 J2SDK 1.4 的規格,但是 Kaffe 的 threading model 本身並非完全 Bug-free (事實上 Sun J2SDK 也存在此問題),所以不見得規格實作出來就代表可以完全無誤的運作。

為何要跑 Resin 呢?Resin 在 standalone 運作的效能非常好,而且採 GPL license (Resin 3.0.x)。

jserv 發表於 February 4, 2005 05:22 PM