使用MobileFirst 7.1(7.1.0.00.20151130-1648) - Studio和服務器都使用相同的版本。MobileFirst 7.1 Authentication.IsSessionIndependent拋出NullPointerException訪問應用程序和適配器
部署MobileFirst 7.1應用到WebSphere全異型材生產樣測試服務器,並從內部MobileFirst拋出獲得空指針。
我曾幾次試圖修改worklight.properties和authenticationConfig.xml和相同的結果,包括設置mfp.session.independent =假。
我目前已將所有設置恢復爲開箱即用生成的默認設置和相同的問題。適配器目前是wl_unprotected,並且沒有對應用程序進行安全測試。
WAR,應用程序和適配器部署所有罰款和日誌看起來乾淨,直到你嘗試調用從瀏覽器轉接器或應用程序URL。
[1/21/16 9:52:08:420 EST] 000000a4 webapp E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[GadgetAPIServlet]: java.lang.NullPointerException
at com.worklight.core.auth.impl.AuthenticationContext.isSessionIndependent(AuthenticationContext.java:1219)
at com.worklight.core.util.HttpSessionUtil.setLockOnSession(HttpSessionUtil.java:108)
at com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:136)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:967)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1107)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3923)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1006)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:463)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:530)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:316)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:287)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1881)
翻閱MobileFirst源代碼,我發現由於Project Local沒有設置,因此無法獲取Worklight Configuration實例。
這一切與在本地使用MobileFirst Studio和自由簡介各種配置工作得很好。
任何幫助確定什麼在我的應用程序設置可能會導致這種行爲,不勝感激。
如果你已經設置sessionindependent爲false並且這仍然發生,那麼這個問題不是關於你的標題暗示的會話不獨立,導致錯誤的思考。請相應地更新您的問題,僅討論您的實際問題。 –
你需要更加重視實際情況。你提到你從瀏覽器調用一個適配器。這在會話獨立模式下將不被支持(默認爲7.1)。哪個環境?你怎麼打電話給適配器?從控制檯預覽?在生產中沒有預覽。 –
此問題已解決!他們的構建過程是用先前版本的MobileFirst的舊版本覆蓋生成的web.xml,因此預期的servlet未正確配置。 – burchfr