felix现在都有3.01的版本了,1.4实在太落后了,尤其是1.4不支持处理fragment bundle,这让我今天吃了个大鳖。但是我非常想用struts-osgi-plugin,以及一个struts-admin-bundle-2.1.8.1的官方示例bundle。但struts官网上这么说:

This plugin is only experimental and can change in the future.

刚开始我没看清,用得真起劲,遇到了一个bug:

类似下面这个小片段,实际上是好多好多。。。

Auto-properties start: org.osgi.framework.BundleException: Could not create bundle object.

ERROR: Error starting file:/F:/works2/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/wsnAdminWebapp/WEB-INF/classes/bundles/2/com.springsource.slf4j.api-1.5.6.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle 5: package; (&(package=org.slf4j.impl)(version>=1.5.6)(!(version>=2.0.0))))

org.osgi.framework.BundleException: Unresolved constraint in bundle 5: package; (&(package=org.slf4j.impl)(version>=1.5.6)(!(version>=2.0.0)))

at org.apache.felix.framework.Felix._resolveBundle(Felix.java:1792)

at org.apache.felix.framework.Felix._startBundle(Felix.java:1652)

at org.apache.felix.framework.Felix.startBundle(Felix.java:1588)

at org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:1180)

at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:265)

at java.lang.Thread.run(Thread.java:619)

这令我郁闷了一个下午(青春就是这么挥霍的)。我本以为是spring dm依赖的org.apache.commons.logging包没有,正如《OSGI中启动spring dm加载的commons-logging问题》中所述,但不管我我怎么调整lib下的jar包,都没找到原因。 Read the rest of this entry »

NND~找个bug都得翻墙找~~再次感谢国家~感谢万能的Google~


(Eclipse)How to resolve "Initializing Java Tooling"

Just met an initialization error on Eclipse, the error message is:

'Initializing Java Tooling' has encountered a problem. An internal error occurred during: "Initializing Java Tooling".

It's really annoying, after googling several sites, here is a working solution:

Delete the following directory: WORKSPACE_HOME/.metadata/.plugins/org.eclipse.core.resources/.project, and restart Eclipse and problem should be solved.


Eclipse Initializing Java Tooling hang住不動

今天開啟 Eclipse ,在 Initializing Java Tooling 時一直停在 1% 不動,點開 progress 看時,會顯示 Configuring org.eclipse.jst.j2ee.internal.module.container,造成 eclipse 無法正常運作(其他動作會一直等待而無法進行)

之前用的好好的,不知為何今天突然不能用了 @@

我目前Eclipse 版本是 Build id: 20090920-1017

上網查了一下,似乎還不少人有發生過,詳細原因我也還不清楚,解決方法倒是找到了兩個,但都是治標不治本,也就是若發生了,可以怎麼做,但不能避免再次發生

方法一:
新建一個 workspace,再用匯入舊專案的方式,將原 workspace 的專案載入到這個新 workspace

方法二:(我比較喜歡這個方法)
將這個 workspace 下 /Servers/.project 這個檔改個名字,即可正常開啟,但 Servers project 會變成 closed,web server 會無法啟動,處理方法也有二,一是 server 設定移掉重設,二是將剛剛的 .project 改回原名,由於 .project 沒有主檔名,用檔案總管會不允許使用這個名稱,所以可以寫一段 java code 來改名即可(我是用這個方式),改好名稱後,在 Servers 專案上點右鍵,選 Open Project 即可


关于Initializing java tooling(1%) this works!

打开eclipse,发现eclipse宕掉了,并且出现这样的提示:关于Initializing java tooling(1%)…

重启了几次之后发现问题仍然存在,因而狂搜了一把,终于找到了有效的解决办法,如下:

找到eclipse目录,编辑eclipse.ini文件,在-vmargs参数之前添加上如下参数(一定要像下面这样写成两行),然后重启就ok了

-vm

C:\Program Files\Java\jdk1.5.0_02\bin\(jdk目录)

如果依然有问题,查看你当前环境变量中所设置的jdk的版本是否与vm中设置的jdk相吻合,如果不是,请改成一致,然后再重启


另参考:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=241343

http://www.eclipse.org/forums/index.php?t=msg&goto=514340&

转自greatwebguy

Once a project is created in Eclipse Europa of a certain type, it’s not the most straight forward process of changing the project to a different type. For example you have a project that Eclipse considers to be a Java project, but it’s actually a Web Project, you don’t get to take advantage of all of the features available for Web Projects, such as deploying to a local tomcat server, unless Eclipse is aware that it’s a web project. This has to do with the project settings and what eclipse considers the “Nature” of the project.

For example to convert a Java Project to a Web Project switch to or open the Resource Perspective of the project, in the root of the project. Open the .project file and make sure the builders and natures are present that are needed for a web project. See the example below, the name should be the name of your project, the most important nodes are the nature children in the natures node: Read the rest of this entry »