Glassfish 3.1.2 build 5 WAR部署问题

时间:2012-08-18 00:20:41

标签: java wsdl glassfish war httplistener

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

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

当我将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文件中添加一些配置,以指定transport-guarantee必须是CONFIDENTIAL。我尝试了这里概述的配置:

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监听器。这是预期的行为,还是我做错了什么?

提前致谢!

1 个答案:

答案 0 :(得分:1)

面对在GlassFish Server Open Source Edition 3.1.2.2(版本5)中部署WAR(在web.xml中具有机密SSLConstraint)的相同问题。我必须创建一个非https监听器来解决这个问题。

我认为这不是预期的行为,特别是因为nullpointer异常。