You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Alessio Soldano (JIRA)" <ji...@apache.org> on 2011/04/21 01:09:05 UTC

[jira] [Created] (CXF-3466) HTTP client sends empty messages when FINE log level is enabled

HTTP client sends empty messages when FINE log level is enabled
---------------------------------------------------------------

                 Key: CXF-3466
                 URL: https://issues.apache.org/jira/browse/CXF-3466
             Project: CXF
          Issue Type: Bug
          Components: Transports
    Affects Versions: 2.4
            Reporter: Alessio Soldano


I'm testing JBossWS-CXF integration with Apache CXF 2.4.0 and I'm seeing a weird behaviour in HTTPConduit.
Basically, when the org.apache.cxf log category is set to DEBUG (I'm using log4j logging, that's FINE level) I see empty(*) messages being sent from client to server. Setting the log level to INFO, remove the problem. So I looked for "isLoggable(Level.FINE" strings in the CXF sources and tried commenting out them one by one to identify the culprit. Finally isolated it in the following code in HTTPConduit::onFirstWrite()

            if (LOG.isLoggable(Level.FINE)) {
                LOG.fine("Sending "
                    + connection.getRequestMethod() 
                    + " Message with Headers to " 
                    + connection.getURL()
                    + " Conduit :"
                    + conduitName
                    + "\nContent-Type: " + connection.getContentType() + "\n");
            }

My guess is one of the calls to the connection in there compromise its state.

(*) actually, capturing the network traffic reveals the http headers only are written, the body is completely missing

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CXF-3466) HTTP client sends empty messages when FINE log level is enabled

Posted by "Alessio Soldano (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alessio Soldano updated CXF-3466:
---------------------------------

    Description: 
I'm testing JBossWS-CXF integration with Apache CXF 2.4.0 and I'm seeing a weird behaviour in HTTPConduit.
Basically, when the org.apache.cxf log category is set to DEBUG (I'm using log4j logging, that's FINE level) I see empty(1) messages being sent from client to server. Setting the log level to INFO, remove the problem. So I looked for "isLoggable(Level.FINE" strings in the CXF sources and tried commenting out them one by one to identify the culprit. Finally isolated it in the following code in HTTPConduit::onFirstWrite()
{code:title=HTTPConduit.java|borderStyle=solid}
            if (LOG.isLoggable(Level.FINE)) {
                LOG.fine("Sending "
                    + connection.getRequestMethod() 
                    + " Message with Headers to " 
                    + connection.getURL()
                    + " Conduit :"
                    + conduitName
                    + "\nContent-Type: " + connection.getContentType() + "\n");
            }
{code}
My guess is one of the calls to the connection in there compromise its state.

(1) actually, capturing the network traffic reveals the http headers only are written, the body is completely missing

  was:
I'm testing JBossWS-CXF integration with Apache CXF 2.4.0 and I'm seeing a weird behaviour in HTTPConduit.
Basically, when the org.apache.cxf log category is set to DEBUG (I'm using log4j logging, that's FINE level) I see empty(*) messages being sent from client to server. Setting the log level to INFO, remove the problem. So I looked for "isLoggable(Level.FINE" strings in the CXF sources and tried commenting out them one by one to identify the culprit. Finally isolated it in the following code in HTTPConduit::onFirstWrite()

            if (LOG.isLoggable(Level.FINE)) {
                LOG.fine("Sending "
                    + connection.getRequestMethod() 
                    + " Message with Headers to " 
                    + connection.getURL()
                    + " Conduit :"
                    + conduitName
                    + "\nContent-Type: " + connection.getContentType() + "\n");
            }

My guess is one of the calls to the connection in there compromise its state.

(*) actually, capturing the network traffic reveals the http headers only are written, the body is completely missing


> HTTP client sends empty messages when FINE log level is enabled
> ---------------------------------------------------------------
>
>                 Key: CXF-3466
>                 URL: https://issues.apache.org/jira/browse/CXF-3466
>             Project: CXF
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: 2.4
>            Reporter: Alessio Soldano
>
> I'm testing JBossWS-CXF integration with Apache CXF 2.4.0 and I'm seeing a weird behaviour in HTTPConduit.
> Basically, when the org.apache.cxf log category is set to DEBUG (I'm using log4j logging, that's FINE level) I see empty(1) messages being sent from client to server. Setting the log level to INFO, remove the problem. So I looked for "isLoggable(Level.FINE" strings in the CXF sources and tried commenting out them one by one to identify the culprit. Finally isolated it in the following code in HTTPConduit::onFirstWrite()
> {code:title=HTTPConduit.java|borderStyle=solid}
>             if (LOG.isLoggable(Level.FINE)) {
>                 LOG.fine("Sending "
>                     + connection.getRequestMethod() 
>                     + " Message with Headers to " 
>                     + connection.getURL()
>                     + " Conduit :"
>                     + conduitName
>                     + "\nContent-Type: " + connection.getContentType() + "\n");
>             }
> {code}
> My guess is one of the calls to the connection in there compromise its state.
> (1) actually, capturing the network traffic reveals the http headers only are written, the body is completely missing

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-3466) HTTP client sends empty messages when FINE log level is enabled

Posted by "Christian Schneider (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3466?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13022695#comment-13022695 ] 

Christian Schneider commented on CXF-3466:
------------------------------------------

Hi Alessio,

I can confirm the bug and I already haave written a test that also shows it. I think the problem is in connection.getContentType. I will remove this from the log statement.


> HTTP client sends empty messages when FINE log level is enabled
> ---------------------------------------------------------------
>
>                 Key: CXF-3466
>                 URL: https://issues.apache.org/jira/browse/CXF-3466
>             Project: CXF
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: 2.4
>            Reporter: Alessio Soldano
>            Assignee: Christian Schneider
>
> I'm testing JBossWS-CXF integration with Apache CXF 2.4.0 and I'm seeing a weird behaviour in HTTPConduit.
> Basically, when the org.apache.cxf log category is set to DEBUG (I'm using log4j logging, that's FINE level) I see empty(1) messages being sent from client to server. Setting the log level to INFO, remove the problem. So I looked for "isLoggable(Level.FINE" strings in the CXF sources and tried commenting out them one by one to identify the culprit. Finally isolated it in the following code in HTTPConduit::onFirstWrite()
> {code:title=HTTPConduit.java|borderStyle=solid}
>             if (LOG.isLoggable(Level.FINE)) {
>                 LOG.fine("Sending "
>                     + connection.getRequestMethod() 
>                     + " Message with Headers to " 
>                     + connection.getURL()
>                     + " Conduit :"
>                     + conduitName
>                     + "\nContent-Type: " + connection.getContentType() + "\n");
>             }
> {code}
> My guess is one of the calls to the connection in there compromise its state.
> (1) actually, capturing the network traffic reveals the http headers only are written, the body is completely missing

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-3466) HTTP client sends empty messages when FINE log level is enabled

Posted by "Pierre Ingmansson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3466?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13059859#comment-13059859 ] 

Pierre Ingmansson commented on CXF-3466:
----------------------------------------

I just wanted you guys to know that I spent and entire day trying to find the problem for why my client sent an empty body to the server. This was the cause of the problem. Luckily it appears that you guys already fixed the problem. When is version 2.4.1 gonna be out?

> HTTP client sends empty messages when FINE log level is enabled
> ---------------------------------------------------------------
>
>                 Key: CXF-3466
>                 URL: https://issues.apache.org/jira/browse/CXF-3466
>             Project: CXF
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: 2.4
>            Reporter: Alessio Soldano
>            Assignee: Christian Schneider
>             Fix For: 2.4.1
>
>
> I'm testing JBossWS-CXF integration with Apache CXF 2.4.0 and I'm seeing a weird behaviour in HTTPConduit.
> Basically, when the org.apache.cxf log category is set to DEBUG (I'm using log4j logging, that's FINE level) I see empty(1) messages being sent from client to server. Setting the log level to INFO, remove the problem. So I looked for "isLoggable(Level.FINE" strings in the CXF sources and tried commenting out them one by one to identify the culprit. Finally isolated it in the following code in HTTPConduit::onFirstWrite()
> {code:title=HTTPConduit.java|borderStyle=solid}
>             if (LOG.isLoggable(Level.FINE)) {
>                 LOG.fine("Sending "
>                     + connection.getRequestMethod() 
>                     + " Message with Headers to " 
>                     + connection.getURL()
>                     + " Conduit :"
>                     + conduitName
>                     + "\nContent-Type: " + connection.getContentType() + "\n");
>             }
> {code}
> My guess is one of the calls to the connection in there compromise its state.
> (1) actually, capturing the network traffic reveals the http headers only are written, the body is completely missing

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (CXF-3466) HTTP client sends empty messages when FINE log level is enabled

Posted by "Christian Schneider (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Schneider reassigned CXF-3466:
----------------------------------------

    Assignee: Christian Schneider

> HTTP client sends empty messages when FINE log level is enabled
> ---------------------------------------------------------------
>
>                 Key: CXF-3466
>                 URL: https://issues.apache.org/jira/browse/CXF-3466
>             Project: CXF
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: 2.4
>            Reporter: Alessio Soldano
>            Assignee: Christian Schneider
>
> I'm testing JBossWS-CXF integration with Apache CXF 2.4.0 and I'm seeing a weird behaviour in HTTPConduit.
> Basically, when the org.apache.cxf log category is set to DEBUG (I'm using log4j logging, that's FINE level) I see empty(1) messages being sent from client to server. Setting the log level to INFO, remove the problem. So I looked for "isLoggable(Level.FINE" strings in the CXF sources and tried commenting out them one by one to identify the culprit. Finally isolated it in the following code in HTTPConduit::onFirstWrite()
> {code:title=HTTPConduit.java|borderStyle=solid}
>             if (LOG.isLoggable(Level.FINE)) {
>                 LOG.fine("Sending "
>                     + connection.getRequestMethod() 
>                     + " Message with Headers to " 
>                     + connection.getURL()
>                     + " Conduit :"
>                     + conduitName
>                     + "\nContent-Type: " + connection.getContentType() + "\n");
>             }
> {code}
> My guess is one of the calls to the connection in there compromise its state.
> (1) actually, capturing the network traffic reveals the http headers only are written, the body is completely missing

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (CXF-3466) HTTP client sends empty messages when FINE log level is enabled

Posted by "Christian Schneider (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Schneider resolved CXF-3466.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.4.1

I added a test and removed the problematic call on connection

> HTTP client sends empty messages when FINE log level is enabled
> ---------------------------------------------------------------
>
>                 Key: CXF-3466
>                 URL: https://issues.apache.org/jira/browse/CXF-3466
>             Project: CXF
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: 2.4
>            Reporter: Alessio Soldano
>            Assignee: Christian Schneider
>             Fix For: 2.4.1
>
>
> I'm testing JBossWS-CXF integration with Apache CXF 2.4.0 and I'm seeing a weird behaviour in HTTPConduit.
> Basically, when the org.apache.cxf log category is set to DEBUG (I'm using log4j logging, that's FINE level) I see empty(1) messages being sent from client to server. Setting the log level to INFO, remove the problem. So I looked for "isLoggable(Level.FINE" strings in the CXF sources and tried commenting out them one by one to identify the culprit. Finally isolated it in the following code in HTTPConduit::onFirstWrite()
> {code:title=HTTPConduit.java|borderStyle=solid}
>             if (LOG.isLoggable(Level.FINE)) {
>                 LOG.fine("Sending "
>                     + connection.getRequestMethod() 
>                     + " Message with Headers to " 
>                     + connection.getURL()
>                     + " Conduit :"
>                     + conduitName
>                     + "\nContent-Type: " + connection.getContentType() + "\n");
>             }
> {code}
> My guess is one of the calls to the connection in there compromise its state.
> (1) actually, capturing the network traffic reveals the http headers only are written, the body is completely missing

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-3466) HTTP client sends empty messages when FINE log level is enabled

Posted by "Christian Schneider (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3466?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13059860#comment-13059860 ] 

Christian Schneider commented on CXF-3466:
------------------------------------------

2.4.1 is already out


> HTTP client sends empty messages when FINE log level is enabled
> ---------------------------------------------------------------
>
>                 Key: CXF-3466
>                 URL: https://issues.apache.org/jira/browse/CXF-3466
>             Project: CXF
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: 2.4
>            Reporter: Alessio Soldano
>            Assignee: Christian Schneider
>             Fix For: 2.4.1
>
>
> I'm testing JBossWS-CXF integration with Apache CXF 2.4.0 and I'm seeing a weird behaviour in HTTPConduit.
> Basically, when the org.apache.cxf log category is set to DEBUG (I'm using log4j logging, that's FINE level) I see empty(1) messages being sent from client to server. Setting the log level to INFO, remove the problem. So I looked for "isLoggable(Level.FINE" strings in the CXF sources and tried commenting out them one by one to identify the culprit. Finally isolated it in the following code in HTTPConduit::onFirstWrite()
> {code:title=HTTPConduit.java|borderStyle=solid}
>             if (LOG.isLoggable(Level.FINE)) {
>                 LOG.fine("Sending "
>                     + connection.getRequestMethod() 
>                     + " Message with Headers to " 
>                     + connection.getURL()
>                     + " Conduit :"
>                     + conduitName
>                     + "\nContent-Type: " + connection.getContentType() + "\n");
>             }
> {code}
> My guess is one of the calls to the connection in there compromise its state.
> (1) actually, capturing the network traffic reveals the http headers only are written, the body is completely missing

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira