0

I have a jar file which starts fine on local machine (Windows 7). But when i run it on the another (test server with Win Server 2008) the application freezes on the "Creating Service" step:

C:\app_services>java -jar appservices-2.0.0.jar

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.3.2.RELEASE)

10.02.2016 18:25:38.492 INFO  Application:48 - Starting Application on TESTSERV1 with PID 2520 (C:\app_services\appservices-2.0.0.jar started by Administrator in C:\app_services)
10.02.2016 18:25:38.501 INFO  Application:666 - No active profile set, falling back to default profiles: default
10.02.2016 18:25:38.599 INFO  AnnotationConfigEmbeddedWebApplicationContext:578 - Refreshing org.springframework.boot.co
ntext.embedded.AnnotationConfigEmbeddedWebApplicationContext@5bd5c1ed: startup date [Wed Feb 10 18:25:38 MSK 2016]; root
 of context hierarchy
10.02.2016 18:25:39.003 INFO  Version:17 - HV000001: Hibernate Validator 5.2.2.Final
10.02.2016 18:25:40.484 INFO  DefaultListableBeanFactory:839 - Overriding bean definition for bean 'beanNameViewResolver
' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=
3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.web.
ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration; factoryMethodName=beanNameViewResolver; initMethodName=null;
 destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/ErrorMvcAutoCo
nfiguration$WhitelabelErrorViewConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=fal
se; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.a
utoconfigure.web.WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter; factoryMethodName=beanNameViewResolver; initMet
hodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/W
ebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter.class]]
10.02.2016 18:25:42.412 INFO  TomcatEmbeddedServletContainer:81 - Tomcat initialized with port(s): 23322 (http)
10.02.2016 18:25:42.453 INFO  StandardService:180 - Starting service Tomcat
10.02.2016 18:25:42.457 INFO  StandardEngine:180 - Starting Servlet Engine: Apache Tomcat/8.0.30
10.02.2016 18:25:42.760 INFO  [/]:180 - Initializing Spring embedded WebApplicationContext
10.02.2016 18:25:42.762 INFO  ContextLoader:272 - Root WebApplicationContext: initialization completed in 4177 ms
10.02.2016 18:25:44.208 INFO  ServletRegistrationBean:189 - Mapping servlet: 'CXFServlet' to [/appservices/*]
10.02.2016 18:25:44.223 INFO  FilterRegistrationBean:258 - Mapping filter: 'metricFilter' to: [/*]
10.02.2016 18:25:44.225 INFO  FilterRegistrationBean:258 - Mapping filter: 'characterEncodingFilter' to: [/*]
10.02.2016 18:25:44.226 INFO  FilterRegistrationBean:258 - Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
10.02.2016 18:25:44.227 INFO  FilterRegistrationBean:258 - Mapping filter: 'httpPutFormContentFilter' to: [/*]
10.02.2016 18:25:44.228 INFO  FilterRegistrationBean:258 - Mapping filter: 'requestContextFilter' to: [/*]
10.02.2016 18:25:44.231 INFO  FilterRegistrationBean:258 - Mapping filter: 'webRequestLoggingFilter' to: [/*]
10.02.2016 18:25:44.232 INFO  FilterRegistrationBean:258 - Mapping filter: 'applicationContextIdFilter' to: [/*]
10.02.2016 18:25:44.966 INFO  ReflectionServiceFactoryBean:388 - Creating Service {http://new.webservice.namespace}CompServiceForPCO from WSDL: classpath:CompService.wsdl

On this step app goes to sopor...

Do you know why? Could you recommend some workaround to "unfreeze" application?

What is done: 1. Changed Java version during packaging (mvn clean package)

<properties>
        <jdkName>JavaSE-1.8</jdkName>
        <jdk.version>1.8</jdk.version>
</properties>

to 1.7 (this is java version on the server)
2. Changed address location value in the wsdl to http://servername:8080

<wsdl:port name="CompServiceEndPoind" binding="tns:CompServiceSOAP">
            <soap:address location="http://localhost:8080/appservices/ws"/>
</wsdl:port>

UPDATE

Wow! it starts after 10 minutes of sleeping with next exception:

Caused by: java.net.ConnectException: Connection refused: connect
        at java.net.DualStackPlainSocketImpl.connect0(Native Method)
        at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
        at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
        at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
        at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
        at java.net.PlainSocketImpl.connect(Unknown Source)
        at java.net.SocksSocketImpl.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at sun.net.NetworkClient.doConnect(Unknown Source)
        at sun.net.www.http.HttpClient.openServer(Unknown Source)
        at sun.net.www.http.HttpClient.openServer(Unknown Source)
        at sun.net.www.http.HttpClient.<init>(Unknown Source)
        at sun.net.www.http.HttpClient.New(Unknown Source)
        at sun.net.www.http.HttpClient.New(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2188)
4

1 回答 1

1

问题出<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" schemaLocation="http://schemas.xmlsoap.org/soap/encoding/"/>在 wsdl 中。应用程序在 jar 或外部找不到此导入。所以我只是评论这个字符串,它现在可以工作了。

于 2016-02-11T06:38:32.203 回答