Glassfish管理控制台的java.lang.RuntimeException

时间:2015-04-29 07:51:26

标签: jdbc connection-pooling jdbc-odbc ojdbc glassfish-4.1

我尝试使用以下属性在我的glassfish上创建jdbc连接池(如下图所示)。它成功连接让我觉得它运作正常。然而,在我重新启动glassfish并尝试ping池之后,我的屏幕上的白色屏幕上出现RuntimeException。不仅在我ping它时,而且当我单击任何选项卡甚至是保存和取消按钮时,它最终都会运行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

4 个答案:

答案 0 :(得分:9)

我遇到了这个问题。我采取了两种措施来解决它,不确定哪一个可以解决问题:

  • 将JDBC驱动程序还原为我在另一个glassfish安装中使用的版本;
  • 清理浏览器缓存

在此之后,我能够编辑连接池属性并在没有RuntimeException的情况下ping连接。

希望它有所帮助。

答案 1 :(得分:2)

清除浏览器缓存为我解决了这个问题。 (花了好几个小时试图找出这个愚蠢的事情)。

答案 2 :(得分:1)

我知道这是一个老问题,但我有相同的行为 - 即使添加了lates Jar文件。 我(主要是)绝对琐碎的解决方案:

以管理员身份运行Eclipse / Glasfish。 : - (

答案 3 :(得分:0)

将Glassfish从4.1.1升级到4.1.2。

当我下载Java EE 7 SDK 7u2时,它包含4.1.1。同时,Glassfish 4.1.2可在Glassfish download中找到。