Return-Path: Delivered-To: apmail-incubator-cxf-issues-archive@locus.apache.org Received: (qmail 4954 invoked from network); 6 Apr 2008 05:44:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Apr 2008 05:44:02 -0000 Received: (qmail 20421 invoked by uid 500); 6 Apr 2008 05:44:02 -0000 Delivered-To: apmail-incubator-cxf-issues-archive@incubator.apache.org Received: (qmail 20407 invoked by uid 500); 6 Apr 2008 05:44: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 20398 invoked by uid 99); 6 Apr 2008 05:44:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Apr 2008 22:44:01 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Apr 2008 05:43:28 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 48EA0234C0BB for ; Sat, 5 Apr 2008 22:41:24 -0700 (PDT) Message-ID: <253826308.1207460484297.JavaMail.jira@brutus> Date: Sat, 5 Apr 2008 22:41:24 -0700 (PDT) From: "Wim Verreycken (JIRA)" To: cxf-issues@incubator.apache.org Subject: [jira] Commented: (CXF-1502) String ambigeous after import org.apache.cxf.jaxws.javaee.String In-Reply-To: <1821522842.1207460371050.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-1502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586101#action_12586101 ] Wim Verreycken commented on CXF-1502: ------------------------------------- uses a org.apache.cxf.service.factory.ReflectionServiceFactoryBean. (but where is that ns declared? there's no cfx.apache.org and couldn't find it in any of the classpath xml files either) This calls a org.apache.cxf.jaxws.JaxWsSererFactoryBean. This imports a lot of things, which in turn import a lot of other things. In the end, org.apache.cxf.jaxws.javaee.PortComponentType is imported. This is where things go wrong, imho. line 91 PortComponentType.java : @XmlElement(name = "port-component-name", required = true) protected org.apache.cxf.jaxws.javaee.String portComponentName; org.apache.cxf.jaxws.javaee.String get imported when this gets constructed (actually, i think more because this is constructed, but were dealing with reflection here so forgive me if i'm not clear on this) After the call returns, of maybe straight away (...), this results in String being ambigous so it always has to be specified using the package name. But Spring ioc/di uses reflection and mostly uses Class.forName(String forName) to obtain a refference to the class. And that is Class.forName(String forName) and not Class.forName(java.lang.String forName). (java6) To make thing worse, but unavoidable, org.apache.cxf.jaxws.javaee.String also extends java.lang.Object which defines public String toString() { return getClass().getName() + "@" + Integer.toHexString(hashCode()); } Again. String and not java.lang.String. So whenver org.apache.cxf.jaxws.javaee.String get's loaded String becomes ambigious and reflection (and half the jdk) become useless unless every String is updated to java.lang.String in the code. I'd suggest renaming org.apache.cxf.jaxws.javaee.String to org.apache.cxf.jaxws.javaee.CString (Complex String, what it is). Otherwise imho, you can expect more problelms. > String ambigeous after import org.apache.cxf.jaxws.javaee.String > ---------------------------------------------------------------- > > Key: CXF-1502 > URL: https://issues.apache.org/jira/browse/CXF-1502 > Project: CXF > Issue Type: Bug > Components: Core, Integration, JAX-WS Runtime, JAXB Databinding, Service Model > Affects Versions: 2.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.1, 2.0.6, 2.1.1 > Environment: all os, all platform, cxf 2.0.0 or higher > Reporter: Wim Verreycken > Priority: Critical > Original Estimate: 4h > Remaining Estimate: 4h > > Spring and CFX can't work together. Everything ends with a : > Unsatisfied dependency expressed through constructor argument with > dex 2 of type [java.lang.String]: Ambiguous constructor argument types - did you specify the correct bean references as constructor arguments? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.