【问题标题】:Glassfish 3.1.2 build 5 WAR deploy issueGlassfish 3.1.2 build 5 WAR 部署问题
【发布时间】:2012-08-14 10:17:50
【问题描述】:

我在将 Java WAR 部署到 Glassfish 3.1.2 build 5 时遇到问题。我想排除这是否与配置错误或遗漏有关。

我在 Glassfish 上部署了一个 Web 应用程序,它运行良好,直到我更改了其中一个 http 侦听器。在此之前,除了更改 http-listener-2 的 SSL 设置下的证书昵称之外,我没有更改任何一个默认侦听器(http-listener-1 表示非安全,http-listener-2 表示安全)。

当我将 http-listener-1 更改为也使用安全性时,问题就开始了。我想在那个监听器上使用不同的证书。但是,一旦我为所有活动的侦听器启用 SSL,我发现我无法再将我的 WAR 部署到 Glassfish。我会在 server.log 中收到以下错误:

[#|2012-08-17T13:42:24.686-0700|SEVERE|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=2257;_ThreadName=Thread-2;|java.lang.RuntimeException
at org.glassfish.webservices.WebServicesDeployer.prepare(WebServicesDeployer.java:193)
at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:871)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
...
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:722)

Caused by: java.lang.NullPointerException
at com.sun.enterprise.deployment.WebServiceEndpoint.composeEndpointAddress(WebServiceEndpoint.java:698)
at com.sun.enterprise.deployment.WebServiceEndpoint.composeEndpointAddress(WebServiceEndpoint.java:690)
at com.sun.enterprise.deployment.WebServiceEndpoint.composeFinalWsdlUrl(WebServiceEndpoint.java:753)
at org.glassfish.webservices.WebServicesDeployer.doWebServicesDeployment(WebServicesDeployer.java:634)
at org.glassfish.webservices.WebServicesDeployer.prepare(WebServicesDeployer.java:184)
... 53 more

我已经从官网安装了最新版本的 Glassfish。

一些研究让我想知道是否需要在 glassfish-web.xml 或 web.xml 文件中添加一些配置,以指定传输保证必须是机密的。我尝试了这里列出的配置:

http://www.java-tips.org/java-ee-tips/java-api-for-xml-web-services/using-jax-ws-based-web-services-wit.html

但我仍然无法部署我的 WAR。唯一能解决这个问题的是创建第三个不支持 SSL 的 http-listener。这是预期的行为还是我做错了什么?

提前致谢!

【问题讨论】:

    标签: java wsdl glassfish war httplistener


    【解决方案1】:

    在将 WAR(在 web.xml 中具有机密 SSLConstraint)部署到 GlassFish Server Open Source Edition 3.1.2.2(内部版本 5)时遇到了同样的问题。我必须创建一个非 https 侦听器来解决这个问题。

    我认为这不是预期的行为,尤其是由于 nullpointer 异常。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-06-23
      • 1970-01-01
      • 1970-01-01
      • 2016-04-29
      • 2023-04-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多