為了一個用jbuilder2006+weblogic部署webservices,老師弄不出來,而且運行jbuilder再加上weblogic機器慢的要死,一次一次的重試,時間啊。就是不動,哈哈。
最后在網上搜到下面的問題。說是因為jbuilder和weblogic的lib文件版本兼容問題,還有就是weblogic8.1sp3以前的版本不支持sourcerootforupload,所幸重裝了weblogic,原來是8.1.3的,現在裝了個9.2的,結果在經過漫長的等待后,終于成功部署了,但是還是由于機器太慢,沒看效果,明天再試一試吧。
Why am I getting the error Unrecognized option or flag, -sourcerootforupload ?
In order to maintain compatibility between the 8.1 and 9.0 version of the plugin I used a new flag on the deployment engine.
The flag was added with service pack 4 on 8.1. If you are not on service pack 4 or later you will see this error. If you send a note
to the mojo mailing list I can create a special version for service pack 3 and earlier.
還有就是如果出現
Build Failed: The failure is due to a known compatibility issue with WebLogic and Ant 1.6 as WebLogic includes an older version of Ant.
的錯誤就刪除WebLogic安裝目錄下的weblogic81/server/lib/ant下的ant.jar和optional.jar就行了,而我重裝成了weblogic9.2以后也沒報這樣的錯誤。暈,真讓人暈頭轉向。
昨天看effective java第二條,建立單立模式,有兩種方式,兩者都需要構造函數是私有的,一種是,聲明一個public static final的屬性初始化為這個類的實例,然后直接用類名.屬性名返回這個對象,另一種是聲明一個private static final的屬性,在靜態方法中返回這個static final 的對象,這么做的好處就是有回旋的余地,比如不想永遠只返回一個相同的對象了,容易修改。在效率上,兩種方式應該是不相上下的,因為好的編譯器能夠監測到內聯。
時間在一天一天的過,快過年了,這個年不好過啊。