Return-Path: Delivered-To: apmail-incubator-cxf-issues-archive@locus.apache.org Received: (qmail 80642 invoked from network); 27 Nov 2007 18:10:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Nov 2007 18:10:15 -0000 Received: (qmail 61915 invoked by uid 500); 27 Nov 2007 18:10:02 -0000 Delivered-To: apmail-incubator-cxf-issues-archive@incubator.apache.org Received: (qmail 61902 invoked by uid 500); 27 Nov 2007 18:10:02 -0000 Mailing-List: contact cxf-issues-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cxf-dev@incubator.apache.org Delivered-To: mailing list cxf-issues@incubator.apache.org Received: (qmail 61893 invoked by uid 99); 27 Nov 2007 18:10:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Nov 2007 10:10:02 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Nov 2007 18:09:41 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id BA68A714236 for ; Tue, 27 Nov 2007 10:09:44 -0800 (PST) Message-ID: <18063460.1196186984760.JavaMail.jira@brutus> Date: Tue, 27 Nov 2007 10:09:44 -0800 (PST) From: "Benson Margulies (JIRA)" To: cxf-issues@incubator.apache.org Subject: [jira] Commented: (CXF-1227) NPE in HttpHeaderHelper.mapCharset In-Reply-To: <31167891.1195683763392.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CXF-1227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12545944 ] Benson Margulies commented on CXF-1227: --------------------------------------- How did you manage to provoke this? Did you send a request with no charset at all? > NPE in HttpHeaderHelper.mapCharset > ---------------------------------- > > Key: CXF-1227 > URL: https://issues.apache.org/jira/browse/CXF-1227 > Project: CXF > Issue Type: Bug > Affects Versions: 2.0.3 > Reporter: Cameron Taggart > Fix For: 2.0.4 > > Attachments: cxf-npe.png > > > ConcurrentHashMap doesn't allow null values: > public V put(K key, V value) { > if (value == null) > throw new NullPointerException(); > So this part of HttpHeaderHelper.mapCharset doesn't make much sense to me: > if (newenc == null) { > try { > newenc = Charset.forName(enc).name(); > } catch (Exception ex) { > //ignore > } > encodings.put(enc, newenc); > } > I don't use Netbeans very much, but when I hover over the enc variable, it appears that utf-8 might have been passed in with some quotes, not sure. > Nov 21, 2007 2:05:17 PM org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromWSDL > INFO: Creating Service {http://soap.metbase.fluke.com/}EventSoapService from WSDL: http://localhost:8080/EventSoapService/EventSoapImpl?wsdl > Nov 21, 2007 2:09:37 PM org.apache.cxf.phase.PhaseInterceptorChain doIntercept > INFO: Interceptor has thrown exception, unwinding now > java.lang.NullPointerException > at java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:878) > at org.apache.cxf.helpers.HttpHeaderHelper.mapCharset(HttpHeaderHelper.java:82) > at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1930) > at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1791) > at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66) > at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575) > at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) > at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207) > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254) > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205) > at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) > at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135) > at $Proxy21.getUncertaintyDataParameter(Unknown Source) > at com.fluke.metbase.soap.client.TryEventService.main(TryEventService.java:30) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.