Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9084611
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T21:02:33+00:00 2026-06-16T21:02:33+00:00

I inherited a CXF based project, with the following (relevant) original dependencies (in pom.xml

  • 0

I inherited a CXF based project, with the following (relevant) original dependencies (in pom.xml):

<dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-frontend-jaxws</artifactId>
        <version>2.2.7</version>
</dependency>
<dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-transports-http</artifactId>
        <version>2.2.7</version>
</dependency>
<dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-ws-security</artifactId>
        <version>2.2.7</version>
</dependency>

And

<plugin>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-codegen-plugin</artifactId>
        <version>2.2.8-SNAPSHOT</version>

By “original” I mean that this is the source code snapshot I received that used to build fine years ago, has been dormant for all these years and now, that some modifications to the code are needed, it will no longer build as is.

The main problem with trying to build it “as is”, is that the 2.2.8-SNAPSHOT version of cxf-codegen-plugin is nowhere to be found… Maven can’t find it and fails the build.

So, I replaced the above with (note that the only differences is 2.2.8 vs. 2.2.8-SNAPSHOT)

<plugin>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-codegen-plugin</artifactId>
    <version>2.2.8</version>

The build succeeds now past this point but fails on 2 symbols not found:

  1. Password.set_value(String value) — from the package org.oasis_open.docs.wss._2004._01.oasis_200401_wss_wssecurity_secext_1_0.
  2. SQLService.setENDPOINT(String sei) from own package based on javax.xml.ws.Service.

Both source files for the classes Password and SQLService are generated on-the-fly by Apache CXF 2.2.8, as designed by the original author of this project.

So, I quickly examined the new generated versions of this files and discovered that:

  1. Password.set_value(String value) seems to have been substituted by Password.setValue(String value).
  2. SQLService.setENDPOINT(String sei) has been eliminated completely, and instead requiring that sei be passed in the constructor: SQLService(URL wsdlLocation, QName serviceName)

So I modified the source code that calls these methods to adapt to this 2 seemingly minor changes and the project now builds successfully!

But… it fails at runtime with the following exceptions:

WARNING: Interceptor for {http://rservice.rorg.net/sql}SQLService#{http://rservice.rorg.net/sql}Get has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not send Message.
    at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:487)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)
    at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
    at $Proxy38.get(Unknown Source)
        ...
Caused by: java.net.ConnectException: ConnectException invoking http://localhost:8080/rservice/services/SQLServiceSoap: Connection refused
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:522)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:2058)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2043)
    at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
    at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:639)
    at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
    ... 14 more
Caused by: java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:413)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:274)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:261)
    at java.net.Socket.connect(Socket.java:556)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:403)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:521)
    at sun.net.www.http.HttpClient.<init>(HttpClient.java:246)
    at sun.net.www.http.HttpClient.New(HttpClient.java:320)
    at sun.net.www.http.HttpClient.New(HttpClient.java:337)
    at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:996)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:948)
    at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:873)
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1040)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCaching(HTTPConduit.java:1955)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirstWrite(HTTPConduit.java:1907)
    at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:42)
    at org.apache.cxf.io.AbstractThresholdOutputStream.write(AbstractThresholdOutputStream.java:69)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1974)
    ... 17 more


04-Jan-2013 12:07:17 ERROR [SQLModule] Error running SQL module: Could not send Message.
javax.xml.ws.WebServiceException: Could not send Message.
    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
    at $Proxy38.get(Unknown Source)
    at net.rorg.rservice.client.base.sql.SQLClientBase.get(SQLClientBase.java:306)
    at net.rorg.rservice.client.module.sql.SQLModule.getBatch(SQLModule.java:149)
    at net.rorg.rservice.client.module.sql.SQLModule.getAndProcessSQL(SQLModule.java:110)
    at net.rorg.rservice.client.module.sql.SQLModule.run(SQLModule.java:280)
    at net.rorg.rservice.client.RClient.exec(RClient.java:398)
    at net.rorg.rservice.client.RClient.run(RClient.java:173)
    at net.rorg.rservice.client.RClient.main(RClient.java:166)
Caused by: 
java.net.ConnectException: ConnectException invoking http://localhost:8080/rservice/services/SQLServiceSoap: Connection refused
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:522)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:2058)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2043)
    at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
    at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:639)
    at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:487)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)
    at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
    ... 8 more
Caused by: 
java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:413)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:274)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:261)
    at java.net.Socket.connect(Socket.java:556)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:403)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:521)
    at sun.net.www.http.HttpClient.<init>(HttpClient.java:246)
    at sun.net.www.http.HttpClient.New(HttpClient.java:320)
    at sun.net.www.http.HttpClient.New(HttpClient.java:337)
    at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:996)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:948)
    at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:873)
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1040)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCaching(HTTPConduit.java:1955)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirstWrite(HTTPConduit.java:1907)
    at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:42)
    at org.apache.cxf.io.AbstractThresholdOutputStream.write(AbstractThresholdOutputStream.java:69)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1974)
    ... 17 more

Note: Even if I hardcode the actual (www) server URL in the WSDL (i.e. replacing http://localhost:8080 with https://test.rserver.com), I get the ConnectException error displaying http://localhost:8080 as the destination. Clearly, some CXF-substitution or resolution is not performed. Could that be a clue to where the problem is? Which component of CXF is responsible for that magical transformation from http://localhost:8080 to the real URL?

Is it right where the stack trace hints (i.e. JaxWsClientProxy or frontend.ClientProxy or…)?

at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:484)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:310)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:262)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)

If so, why is this happening and how do I fix this?

Now… if I were a CXF and/or JAX-WS expert, I would have probably figured out the root cause of that misleading “Connection refused” hint in the stack trace.

But at this point I am pretty much lost, since I know beyond certainty that the SEI is there, the authentication username/password are correct: The older binary (JAR with dependencies) runs just fine against this service.

I am therefore looking for a clue or an insight from an expert who may have seen this type of “Connection refused” stack trace and knows that it could be trigger by other than the typical reasons. For example, some type of mismatch that has been introduced once the cxf-codegen-plugin 2.2.8-SNAPSHOT was replaced by 2.2.8?

Or additional tips on how to troubleshoot this problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T21:02:34+00:00Added an answer on June 16, 2026 at 9:02 pm

    I think your change to SQLService might be the problem

    SQLService.setENDPOINT(String sei) has been eliminated completely, and
    instead requiring that sei be passed in the constructor:
    SQLService(URL wsdlLocation, QName serviceName)

    Did you put a new URL in the constructor call? What was sei before? If you’ve put in a URL, it’s probably that whose connection is failing. You should be able to use the no-arg constructor.

    If you want to set the URL at runtime (I guess that’s what the setENDPOINT call was doing) you need to manipulate the BindingProvider. See this thread http://cxf.547215.n5.nabble.com/How-to-change-the-service-URL-at-runtime-td3242927.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I inherited a CXF/Hibernate/JBoss based project that includes a filename named database.xsd . I
I inherited a project that includes the following crazy JavaScript. I assume this is
I inherited a project with the following reference in one class: using ImportFile I
Ive inherited some code which started out as an Android project but really is
I inherited a simple C# project without a App.config file. I need it now.
I inherited the following code (and data stored using it, i.e. serialized instances of
I inherited an application using a large number of text based files for configuration.
I inherited a project originally stored in CVS with all the revisions. I made
I have a web service created using Apache CXF, and two .NET clients using
I inherited a project that makes extensive use of JMS. It compiles, runs and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.