You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Wim Verreycken (JIRA)" <ji...@apache.org> on 2008/04/06 07:39:31 UTC

[jira] Created: (CXF-1502) String ambigeous after import org.apache.cxf.jaxws.javaee.String

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.4, 2.0.3, 2.0.2, 2.0.1, 2.0, 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


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.


[jira] Commented: (CXF-1502) String ambigeous after import org.apache.cxf.jaxws.javaee.String

Posted by "Wim Verreycken (JIRA)" <ji...@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:
-------------------------------------

<jaxws:endpoint/> 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.


[jira] Assigned: (CXF-1502) String ambigeous after import org.apache.cxf.jaxws.javaee.String

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

Sean O'Callaghan reassigned CXF-1502:
-------------------------------------

    Assignee: Sean O'Callaghan

> 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
>            Assignee: Sean O'Callaghan
>            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.


[jira] Resolved: (CXF-1502) String ambigeous after import org.apache.cxf.jaxws.javaee.String

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

Sean O'Callaghan resolved CXF-1502.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1

Replaced org.apache.cxf.jaxws.javaee.String with org.apache.cxf.jaxws.javaee.CString

> 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
>            Assignee: Sean O'Callaghan
>            Priority: Critical
>             Fix For: 2.1
>
>   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.