2014-10-28 75 views
2

1)Java版本 「1.7.0_71」 我已經安裝了IBM工作燈6.2 SRVE0777E:通過應用程序類拋出的異常 'com.worklight.core.auth.impl.AuthenticationFilter.verifyServletInitialized:422'

2)我下載eclipse版本:Kepler Service Release 1 Build ID:20130919-0819並提取。

3)我試圖安裝worklight6.2 as said in this安裝時我遇到了this issue,因此根據該帖子中的建議,我從該站點下載了worklight6.2並進行了配置。

4)然後用我的日食配置ADT插件。

5)現在我創建了一個Hello world app as per the instructions

6)右鍵單擊Worklight開發服務器並啓動,啓動服務器。

7)現在右鍵單擊HelloWorld Run As - >在worklight開發服務器上運行。

然後我打開了我的應用程序在瀏覽器點擊預覽作爲公共資源,但它給瀏覽器以下異常:

enter image description here

我已經通過一些links,但那些確實不見了沒有幫助。

錯誤日誌如下..

Listening for transport dt_socket at address: 10777 
Launching worklight (WebSphere Application Server 8.5.5.1/wlp-1.0.4.cl50120131011-1639) on Java HotSpot(TM) Client VM, version 1.7.0_71-b14 (en_US) 
[AUDIT ] CWWKE0001I: The server worklight has been launched. 
[AUDIT ] CWWKZ0058I: Monitoring dropins for applications. 
[WARNING ] CWNEN0070W: The javax.ws.rs.QueryParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader. 
[WARNING ] CWNEN0070W: The javax.ws.rs.PathParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader. 
[WARNING ] CWNEN0070W: The javax.ws.rs.HeaderParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader. 
[WARNING ] CWNEN0070W: The javax.ws.rs.core.Context annotation class will not be recognized because it was loaded from the null location rather than from a product class loader. 
[WARNING ] CWNEN0070W: The javax.ws.rs.CookieParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader. 
[WARNING ] CWNEN0070W: The javax.ws.rs.MatrixParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader. 
[WARNING ] CWNEN0070W: The javax.ws.rs.QueryParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader. 
[WARNING ] CWNEN0070W: The javax.ws.rs.PathParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader. 
[WARNING ] CWNEN0070W: The javax.ws.rs.HeaderParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader. 
[WARNING ] CWNEN0070W: The javax.ws.rs.core.Context annotation class will not be recognized because it was loaded from the null location rather than from a product class loader. 
[WARNING ] CWNEN0070W: The javax.ws.rs.CookieParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader. 
[WARNING ] CWNEN0070W: The javax.ws.rs.MatrixParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader. 
[AUDIT ] CWWKZ0022W: Application WorklightConsole has not started in 30.012 seconds. 
[AUDIT ] CWWKF0011I: The server worklight is ready to run a smarter planet. 
[AUDIT ] CWWKZ0022W: Application HelloWorld has not started in 30.027 seconds. 
[AUDIT ] CWWKZ0022W: Application _MobileBrowserSimulator has not started in 30.016 seconds. 
[AUDIT ] CWWKZ0022W: Application WorklightServices has not started in 30.017 seconds. 
[AUDIT ] CWWKZ0022W: Application _analytics has not started in 30.013 seconds. 
[AUDIT ] CWWKT0016I: Web application available (default_host): http://Harish:10080/IBMJMXConnectorREST/ 
[AUDIT ] CWWKT0016I: Web application available (default_host): http://Harish:10080/worklightadmin/ 
[AUDIT ] CWWKZ0001I: Application WorklightServices started in 84.379 seconds. 
[AUDIT ] CWWKT0016I: Web application available (default_host): http://Harish:10080/_analytics/ 
[AUDIT ] CWWKZ0001I: Application _analytics started in 77.031 seconds. 
[AUDIT ] CWWKT0016I: Web application available (default_host): http://Harish:10080/HelloWorld/ 
[AUDIT ] CWWKZ0001I: Application HelloWorld started in 86.932 seconds. 
[AUDIT ] CWWKT0016I: Web application available (default_host): http://Harish:10080/_MobileBrowserSimulator/ 
[AUDIT ] CWWKZ0001I: Application _MobileBrowserSimulator started in 84.441 seconds. 
[AUDIT ] CWWKT0016I: Web application available (default_host): http://Harish:10080/worklightconsole/ 
[AUDIT ] CWWKZ0001I: Application WorklightConsole started in 87.959 seconds. 
[ERROR ] FWLST0003E: ========= Failed starting project /HelloWorld [project HelloWorld] 
java.lang.reflect.InvocationTargetException 
[ERROR ] FWLST0003E: ========= Failed starting project /HelloWorld [project HelloWorld] 
java.lang.reflect.InvocationTargetException 
[ERROR ] SRVE0315E: An execption occurred: com.ibm.ws.webcontainer.webapp.WebAppErrorReport: javax.servlet.ServletException: Worklight Console initialization failed.Logged Exception: java.net.SocketTimeoutException: Read timed out 
    at com.worklight.core.auth.impl.AuthenticationFilter.verifyServletInitialized(AuthenticationFilter.java:435) 
    at com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:128) 
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:194) 
    at [internal classes] 
Caused by: javax.servlet.ServletException: Worklight Console initialization failed.Logged Exception: java.net.SocketTimeoutException: Read timed out 
    ... 5 more 
+0

在服務器日誌中存在一個更長的堆棧跟蹤時,必須存在「讀取超時」異常。你可以請張貼堆棧跟蹤。謝謝。用錯誤日誌更新了 – 2014-10-28 10:15:52

+0

。 – Harish 2014-10-29 04:50:28

+1

這不是我期待的。 verifyServletInitialized方法在發現由較早的異常導致的情況時引發異常,很可能在ProjectJeeActivator.contextInitialized內。因此,我期待在堆棧跟蹤中包含ProjectJeeActivator.contextInitialized的日誌中發現異常。 – 2014-10-30 14:41:16

回答

0

哈里什,

我都面臨着類似的問題,我知道這是令人沮喪。這主要是因爲配置,沒有別的。

關鍵要素是確保你有正確的eclipse版本並且已經安裝了來自市場的插件。我總是喜歡從Android開發人員站點下載ADT,然後安裝Marketplace,然後安裝Worklight插件。在完成Android配置的方式中,我們仍然需要它。 =>這種安裝方式幫助我對工作場所的同事進行配置,沒有任何問題。

我不記得了針對此問題的具體修復,但我建議你嘗試以下步驟:

  1. 確保Java編譯器版本爲1.7(Eclipse的>首選項>編譯器> 1.7)以及相應的JRE版本。
  2. 如果較低,請將Worklight服務器超時增加到180秒。 (首先通過Eclipse> Window> Show View> Server> Servers啓用服務器視圖),然後雙擊(Worklight Development Server),它將爲其配置打開一個GUI。在其中,您會發現超時,將啓動超時時間增加到180秒。
  3. 通過在工作燈開發服務器 配置jvm.options這樣增加分配給JVM內存 - > -Xmx1024m

如果這些上述步驟沒有幫助,如果你有足夠的時間,那麼你就可以開始安裝和配置我之前提到的方式。

希望這會有所幫助。

+0

我已經重新安裝了worklight6.2 studio,如上所述,但它仍然給出了相同的錯誤 – Harish 2014-10-30 08:56:20

+0

您是否檢查了諸如timeout,jvm等步驟? – 2014-10-30 10:17:39

+0

是啊所有那些我檢查他們是正確的這裏是[jvm.options](http://pastie.org/9685186) – Harish 2014-10-30 10:22:08