[
https://issues.apache.org/jira/browse/CXF-1390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586095#action_12586095
]
Wim Verreycken commented on CXF-1390:
-------------------------------------
Ok.
What's in a name...
>From what I can see (but without the schema, no cxf.apache.org?)
<jaxws:endpoint/> uses a
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.
(but where is that ns declared? couldn't find it in any of the classpath xml
files ether)
This calls a org.apache.cxf.jaxws.JaxWsSererFactoryBean.
If you look at the code, 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 :
@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)
After the call returns, of maybe straight away (but were dealing with
reflection so
forgive me if i'm not clear on this), this results in String being ambigous
so it always has to be specified using the package name.
But Spring ioc/di uses reflection and reflection
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).
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 everyone updates String
to
java.lang.Sring in there code.
Good luck with that.
Maybe now would be a good time to get rid of org.apache.cxf.jaxws.javaee.String
(which i know is an inheritance from Celtix' com.sun.java.xml.ns.j2ee.String)
before it causes any more damage...
> Upgrade to Spring 2.5
> ---------------------
>
> Key: CXF-1390
> URL: https://issues.apache.org/jira/browse/CXF-1390
> Project: CXF
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.0.3
> Reporter: Dan Diephouse
> Attachments: cxf-spring-demo.war, cxf-spring-error.war,
> cxf-spring-error_stacktrace.rtf
>
>
> CXF doesn't work correctly on Spring 2.5. For instance, you get this:
> org.springframework.beans.factory.UnsatisfiedDependencyException: Error
> creating bean with name 'jrulesService': Unsatisfied dependency expressed
> through constructor argument with index 2 of type
> [org.apache.cxf.jaxws.JaxWsServerFactoryBean]: Ambiguous constructor argument
> types - did you specify the correct bean references as constructor arguments?
> (What ever happened to the famed backward compatability!? :-) *sigh*)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.