2015-04-29 114 views
3

我試圖在我的glassfish上使用以下屬性創建jdbc連接池(如下圖所示)。它連接成功使我認爲它的工作原理正確。然而,在我重新啓動glassfish並嘗試ping該池後,屏幕上出現一個RuntimeException,屏幕上出現一個白色屏幕。不僅當我ping它,而且當我點擊任何選項卡,甚至保存並取消按鈕時,它最終將RuntimeException。我已經嘗試過所有可能的原因,並一遍又一遍地搜索網絡,但結束了這個例外。請幫忙。 :(Glassfish管理控制檯的java.lang.RuntimeException

RuntimeException的步驟,遇到

Connection Pool Properties

RuntimeException

2015-04-29T15:19:29.144+0800|SEVERE: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException while attempting to process a 'beforeCreate' event for 'event132'. 
    at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:422) 
    at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:394) 
    at com.sun.jsftemplating.layout.descriptors.LayoutComponent.beforeCreate(LayoutComponent.java:348) 
    at com.sun.jsftemplating.layout.descriptors.LayoutComponent.getChild(LayoutComponent.java:288) 
    at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:556) 
    at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:551) 
    at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:507) 
    at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:507) 
    at com.sun.jsftemplating.layout.LayoutViewHandler.createView(LayoutViewHandler.java:255) 
    at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:205) 
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) 
    at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:121) 
    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198) 
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646) 
    at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682) 
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344) 
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) 
    at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:233) 
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256) 
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) 
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316) 
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160) 
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734) 
    at org.apache.catalina.core.StandardPipeline.doChainInvoke(StandardPipeline.java:678) 
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97) 
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174) 
    at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:415) 
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282) 
    at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459) 
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167) 
    at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201) 
    at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175) 
    at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235) 
    at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) 
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) 
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) 
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) 
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) 
    at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) 
    at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561) 
    at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) 
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117) 
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56) 
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137) 
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565) 
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545) 
    at java.lang.Thread.run(Thread.java:745) 
Caused by: java.lang.reflect.InvocationTargetException 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:483) 
    at com.sun.jsftemplating.layout.descriptors.handler.Handler.invoke(Handler.java:442) 
    at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:420) 
    ... 46 more 
Caused by: java.lang.IllegalArgumentException: "segments" parameter is null. 
    at org.glassfish.jersey.uri.internal.JerseyUriBuilder.appendPath(JerseyUriBuilder.java:711) 
    at org.glassfish.jersey.uri.internal.JerseyUriBuilder.segment(JerseyUriBuilder.java:422) 
    at org.glassfish.jersey.uri.internal.JerseyUriBuilder.segment(JerseyUriBuilder.java:71) 
    at org.glassfish.admingui.common.util.RestUtil.appendEncodedSegment(RestUtil.java:531) 
    at org.glassfish.admingui.common.handlers.RestApiHandlers.encodeUrl(RestApiHandlers.java:435) 
    ... 52 more 

回答

1

我知道這是一個老問題,但我有相同的行爲 - 即使添加了拉泰什JAR-後 我的(絕大多數情況下)絕對無價值的解決方案:

只需運行Eclipse/Glasfish as Ad ministrator。 :-(

+0

是你的錯誤還有「段參數null」? –

7

我面對這個問題,我花了兩個措施來解決這個問題,不知道哪一個是卓有成效的。

  • 還原JDBC驅動程序我是用另一種GlassFish安裝一個版本;
  • 清理瀏覽器緩存

這我能夠編輯連接池屬性,然後ping沒有RuntimeException的連接後。

合它有幫助。

+0

這是第二個選項。謝謝:) – Xalapa

+0

是的,第二個爲我解決了它 –

0

將Glassfish從4.1.1升級到4.1.2。

當我下載Java EE 7 SDK 7u2時,它包含4.1.1。在同一時間Glassfish 4.1.2可在Glassfish download

1

清除瀏覽器緩存解決了我的問題。 (花了幾個小時試圖找出這個愚蠢的東西)。