cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wim Verreycken (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CXF-1501) String ambigeous after import org.apache.cfx.jaxws.j2ee.String
Date Sun, 06 Apr 2008 05:29:24 GMT

    [ https://issues.apache.org/jira/browse/CXF-1501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586099#action_12586099
] 

Wim Verreycken commented on CXF-1501:
-------------------------------------

What's in a name... 

<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.

I'd suggest renaming org.apache.cxf.jaxws.javaee.String to
org.apache.cxf.jaxws.javaee.CString  (Complex String, what it is). 
and see if this solves the problem with Spring 2.5

> String ambigeous after import org.apache.cfx.jaxws.j2ee.String
> --------------------------------------------------------------
>
>                 Key: CXF-1501
>                 URL: https://issues.apache.org/jira/browse/CXF-1501
>             Project: CXF
>          Issue Type: Bug
>          Components: Core, JAX-WS Runtime, JAXB Databinding
>    Affects Versions: 2.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5
>         Environment: all OS, all java versions, all platforms, all hardware
>            Reporter: Wim Verreycken
>            Priority: Critical
>   Original Estimate: 8h
>  Remaining Estimate: 8h
>
> 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.


Mime
View raw message