[ http://issues.apache.org/jira/browse/CXF-253?page=all ]
maomaode resolved CXF-253.
--------------------------
Resolution: Fixed
> Server can not start when the port number is missing
> -----------------------------------------------------
>
> Key: CXF-253
> URL: http://issues.apache.org/jira/browse/CXF-253
> Project: CXF
> Issue Type: Bug
> Components: JAX-WS Runtime
> Affects Versions: 2.0-M1
> Reporter: maomaode
> Fix For: 2.0-RC
>
>
> If the port number is missing then the server will give us the following
> stack trace.
> I think by defaut the RT should be able to start server at 80, instead of the
> fail
> WARNING: Failed to start: [EMAIL PROTECTED]:-1
> org.mortbay.util.MultiException[java.lang.IllegalArgumentException: Port
> value out of range: -1]
> at org.mortbay.http.HttpServer.doStart(HttpServer.java:686)
> at org.mortbay.util.Container.start(Container.java:72)
> at
> org.apache.cxf.transport.http.JettyHTTPServerEngine.addServant(JettyHTTPServerEngine.java:137)
> at
> org.apache.cxf.transport.http.JettyHTTPDestination.setMessageObserver(JettyHTTPDestination.java:121)
> at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:62)
> at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:236)
> at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:156)
> at
> org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:67)
> at javax.xml.ws.Endpoint.publish(Endpoint.java:156)
> at com.cxf.Hello12Server.<init>(Hello12Server.java:37)
> at com.cxf.Hello12Server.main(Hello12Server.java:41)
> java.lang.IllegalArgumentException: Port value out of range: -1
> at java.net.ServerSocket.<init>(ServerSocket.java:180)
> at
> org.mortbay.util.ThreadedServer.newServerSocket(ThreadedServer.java:391)
> at org.mortbay.util.ThreadedServer.open(ThreadedServer.java:477)
> at org.mortbay.util.ThreadedServer.start(ThreadedServer.java:503)
> at org.mortbay.http.SocketListener.start(SocketListener.java:204)
> at org.mortbay.http.HttpServer.doStart(HttpServer.java:716)
> at org.mortbay.util.Container.start(Container.java:72)
> at
> org.apache.cxf.transport.http.JettyHTTPServerEngine.addServant(JettyHTTPServerEngine.java:137)
> at
> org.apache.cxf.transport.http.JettyHTTPDestination.setMessageObserver(JettyHTTPDestination.java:121)
> at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:62)
> at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:236)
> at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:156)
> at
> org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:67)
> at javax.xml.ws.Endpoint.publish(Endpoint.java:156)
> at com.cxf.Hello12Server.<init>(Hello12Server.java:37)
> at com.cxf.Hello12Server.main(Hello12Server.java:41)
> java.lang.IllegalArgumentException: Port value out of range: -1
> at java.net.ServerSocket.<init>(ServerSocket.java:180)
> at
> org.mortbay.util.ThreadedServer.newServerSocket(ThreadedServer.java:391)
> at org.mortbay.util.ThreadedServer.open(ThreadedServer.java:477)
> at org.mortbay.util.ThreadedServer.start(ThreadedServer.java:503)
> at org.mortbay.http.SocketListener.start(SocketListener.java:204)
> at org.mortbay.http.HttpServer.doStart(HttpServer.java:716)
> at org.mortbay.util.Container.start(Container.java:72)
> at
> org.apache.cxf.transport.http.JettyHTTPServerEngine.addServant(JettyHTTPServerEngine.java:137)
> at
> org.apache.cxf.transport.http.JettyHTTPDestination.setMessageObserver(JettyHTTPDestination.java:121)
> at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:62)
> at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:236)
> at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:156)
> at
> org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:67)
> at javax.xml.ws.Endpoint.publish(Endpoint.java:156)
> at com.cxf.Hello12Server.<init>(Hello12Server.java:37)
> at com.cxf.Hello12Server.main(Hello12Server.java:41)
> Nov 20, 2006 3:09:37 PM org.apache.cxf.transport.http.JettyHTTPDestination
> setMessageObserver
> WARNING: URL creation failed:
> java.lang.NullPointerException
> at org.mortbay.http.HttpServer.getContext(HttpServer.java:463)
> at org.mortbay.http.HttpServer.getContext(HttpServer.java:486)
> at
> org.apache.cxf.transport.http.JettyHTTPServerEngine.addServant(JettyHTTPServerEngine.java:153)
> at
> org.apache.cxf.transport.http.JettyHTTPDestination.setMessageObserver(JettyHTTPDestination.java:121)
> at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:62)
> at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:236)
> at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:156)
> at
> org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:67)
> at javax.xml.ws.Endpoint.publish(Endpoint.java:156)
> at com.cxf.Hello12Server.<init>(Hello12Server.java:37)
> at com.cxf.Hello12Server.main(Hello12Server.java:41)
> Server ready...
> Server exitting
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira