You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by firasarabo <fi...@yahoo.com> on 2010/11/05 18:59:49 UTC

Re: org.apache.cxf.BusException: No DestinationFactory was found

not sure why my post didn't show the xml files so I am posting them again
here

1- cxf-extension-interact.xml 

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:foo="http://cxf.apache.org/configuration/foo"
       xsi:schemaLocation="
       http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">

  
    <!-- ===================================================================
-->
    <!-- CXF Linkage                                                        
-->
    <!-- ===================================================================
-->

    <bean
id="com.space.something.mybinding.cxf.transport.interact.InteractTransportFactory"
         
class="com.space.something.mybinding.cxf.transport.interact.InteractTransportFactory"
          lazy-init="true">
        
        <property name="bus" ref="cxf"/>
        <property name="transportIds">
            <list>
               
<value>http://space.com/something/transports/iinteract</value>
            </list>
        </property>
    </bean>

  </beans>


2- service-spring-context.xml 

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns="http://www.springframework.org/schema/beans"
       xmlns:aop="http://www.springframework.org/schema/aop"
       xmlns:tx="http://www.springframework.org/schema/tx"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:cxf="http://cxf.apache.org/core"
       xmlns:jaxws="http://cxf.apache.org/jaxws"
       xmlns:jaxrs="http://cxf.apache.org/jaxrs"
       xmlns:simple="http://cxf.apache.org/simple"
       xmlns:soap="http://cxf.apache.org/bindings/soap"

       xsi:schemaLocation="http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
       http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd
       http://cxf.apache.org/transports/http/configuration
http://cxf.apache.org/schemas/configuration/http-conf.xsd
       http://cxf.apache.org/bindings/soap
http://cxf.apache.org/schemas/configuration/soap.xsd
       http://cxf.apache.org/simple http://cxf.apache.org/schemas/simple.xsd
       http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"
       default-autowire="byName">

    <import resource="classpath:META-INF/cxf/cxf.xml" />
    <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
    <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />

    <import resource="classpath:META-INF/cxf/cxf-extension-interact.xml" />

   
    <jaxws:endpoint
        id="myServiceInteract"
       
implementor="com.space.myservice.calculator.servicesimpl.CalculatorServiceImpl"
        address="interact://something/myService"
        transportId="http://space.com/something/transports/interact">
    </jaxws:endpoint>

</beans>


-- 
View this message in context: http://cxf.547215.n5.nabble.com/org-apache-cxf-BusException-No-DestinationFactory-was-found-tp3252224p3252233.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: ASM 2.2.3 vs 3.3

Posted by Daniel Kulp <dk...@apache.org>.
On Monday 08 November 2010 3:46:03 am Jason Pell wrote:
> Hi,
> I am using a project which relies on 2.2.3 and I noticed jax ws frontend
> 2.3.1 relies on 3.3. I excluded 3.3 and set a dependency on 2.2.3 and all
> seemed to keep functioning.
> 
> What are potential repurcussions of excluding 3.3

Pretty much none.    We atually were building and testing with  2.2.3 right up 
until a week or so before release.  Thus, I'm pretty confident it works fine. 



-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Re: org.apache.cxf.BusException: No DestinationFactory was found

Posted by firasarabo <fi...@yahoo.com>.
Hi Daniel,

I already tried to put all cxf jars besides my interact.jar in the external
folder, doing so intruduced more issues like I am getting:

java.lang.ClassNotFoundException: javax.servlet.http.HttpServlet
	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

not sure why, this might be really related to JBOSS and not cxf, but it
puzzeles me why this error appears when I moved all cxf jars into the
external dir. I probably should do more research on JBOSS side to solve this
issue.

Thanks,
Firas


-- 
View this message in context: http://cxf.547215.n5.nabble.com/org-apache-cxf-BusException-No-DestinationFactory-was-found-tp3252224p3257176.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: org.apache.cxf.BusException: No DestinationFactory was found

Posted by Daniel Kulp <dk...@apache.org>.
On Monday 08 November 2010 6:54:45 pm firasarabo wrote:
> HI Daniel,
> 
> all cxf jars are still in the WEB-INF/lib/ direcotry of the war file, I
> also tried to have them in the external direcotry however doing that
> caused more issues than I needed. so I put them in both places, the
> external dirctory and WEB-INF/lib directory, may be having them in two
> paceses made it more confusing. by the way I am using JBOSS

That's definitly likely to be part of the issue.   If it's in both places, 
it's likely to have classloader issues as it loads the same class from 
multiple locations.   I'd expect strange ClassCastExceptions or similar, but 
spring sometimes tries wierd things.  Basically, I'd put your jar and the CXF 
jars together in the same location, and only one location.


-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Re: org.apache.cxf.BusException: No DestinationFactory was found

Posted by firasarabo <fi...@yahoo.com>.
HI Daniel,

all cxf jars are still in the WEB-INF/lib/ direcotry of the war file, I also
tried to have them in the external direcotry however doing that caused more
issues than I needed. so I put them in both places, the external dirctory
and WEB-INF/lib directory, may be having them in two paceses made it more
confusing. by the way I am using JBOSS

Thanks,

Firas
-- 
View this message in context: http://cxf.547215.n5.nabble.com/org-apache-cxf-BusException-No-DestinationFactory-was-found-tp3252224p3256016.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: org.apache.cxf.BusException: No DestinationFactory was found

Posted by Daniel Kulp <dk...@apache.org>.
On Monday 08 November 2010 11:56:50 am firasarabo wrote:
> Hi,
> 
> all the necessary files are in the META-INF/cxf folder, that is why the
> project works fine if I put the interact jar file in WEB-INF/lib directory
> of the war file. the project gives the error I have posted only if I put
> the jar file in an external folder outside of the war file.
> 
> so the issue is not with a missing xml file or the structure of interact
> jar file, the issue is with externalizing the jar file by not including it
> in the war file instead puts it in an external folder that is in the class
> path of the deployment.
> 
> so the question really is why it behave differently? why do I need to put
> interact.jar file in the lib direcotry of my war file for it to work? why I
> can't put it in an external direcory?
> 
> has anybody tried to externalize "cxf" jar files whether they are custom or
> not?

Well, where are the "CXF" jars?   Are  they also external right next to your 
interact.jar?   It's likely some sort of wacky classloader issue with tomcat 
(or whatever server you are using).      Not really sure how to even debug 
that one.  :-(


-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Re: org.apache.cxf.BusException: No DestinationFactory was found

Posted by firasarabo <fi...@yahoo.com>.
Hi,

all the necessary files are in the META-INF/cxf folder, that is why the
project works fine if I put the interact jar file in WEB-INF/lib directory
of the war file. the project gives the error I have posted only if I put the
jar file in an external folder outside of the war file.

so the issue is not with a missing xml file or the structure of interact jar
file, the issue is with externalizing the jar file by not including it in
the war file instead puts it in an external folder that is in the class path
of the deployment.

so the question really is why it behave differently? why do I need to put
interact.jar file in the lib direcotry of my war file for it to work? why I
can't put it in an external direcory? 

has anybody tried to externalize "cxf" jar files whether they are custom or
not?

Thanks,
Firas
-- 
View this message in context: http://cxf.547215.n5.nabble.com/org-apache-cxf-BusException-No-DestinationFactory-was-found-tp3252224p3255356.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: org.apache.cxf.BusException: No DestinationFactory was found

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

Did you already follow Sergey's suggestion, I believe he is correct,   
in your custom transport project, you need more files in src/main/ 
resources/META-INF/cxf  folder, I believe you already have cxf- 
extension-interact.xml in this folder, please check if you also have  
files like bus-extensions.xml, cxf.extension, etc.

You can take a look at cxf default jms/http transport as an example,  
to get more details how to write those files.

Freeman
On 2010-11-8, at 下午4:13, firasarabo wrote:

>
> Hi,
>
> Yes, the jar file is in the class path. a quick test I did is  
> removing the
> jar file from the class path and I get the error of not able to find
> "META-INF/cxf/cxf-extension-interact.xml" which is in the jar file,  
> I put
> the jar file back in the class path and the error is gone. so the  
> jar file
> is found in the class path and the xml file is read and processed.
>
> Thanks,
> Firas
> -- 
> View this message in context: http://cxf.547215.n5.nabble.com/org-apache-cxf-BusException-No-DestinationFactory-was-found-tp3252224p3254623.html
> Sent from the cxf-user mailing list archive at Nabble.com.


-- 
Freeman Fang

------------------------

FuseSource: http://fusesource.com
blog: http://freemanfang.blogspot.com
twitter: http://twitter.com/freemanfang
Apache Servicemix:http://servicemix.apache.org
Apache Cxf: http://cxf.apache.org
Apache Karaf: http://karaf.apache.org
Apache Felix: http://felix.apache.org


ASM 2.2.3 vs 3.3

Posted by Jason Pell <ja...@gmail.com>.
Hi,
I am using a project which relies on 2.2.3 and I noticed jax ws frontend 2.3.1 relies on 3.3. I excluded 3.3 and set a dependency on 2.2.3 and all seemed to keep functioning.

What are potential repurcussions of excluding 3.3

Sent from my iPhone

Re: org.apache.cxf.BusException: No DestinationFactory was found

Posted by firasarabo <fi...@yahoo.com>.
Hi,

Yes, the jar file is in the class path. a quick test I did is removing the
jar file from the class path and I get the error of not able to find
"META-INF/cxf/cxf-extension-interact.xml" which is in the jar file, I put
the jar file back in the class path and the error is gone. so the jar file
is found in the class path and the xml file is read and processed. 

Thanks,
Firas
-- 
View this message in context: http://cxf.547215.n5.nabble.com/org-apache-cxf-BusException-No-DestinationFactory-was-found-tp3252224p3254623.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: org.apache.cxf.BusException: No DestinationFactory was found

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

A quick question, did you already add your custom transport jar on the  
classpath(or maven dependency)?

Freeman
On 2010-11-6, at 上午3:42, firasarabo wrote:

>
> anybody else has an idea?
> -- 
> View this message in context: http://cxf.547215.n5.nabble.com/org-apache-cxf-BusException-No-DestinationFactory-was-found-tp3252224p3252362.html
> Sent from the cxf-user mailing list archive at Nabble.com.


-- 
Freeman Fang

------------------------

FuseSource: http://fusesource.com
blog: http://freemanfang.blogspot.com
twitter: http://twitter.com/freemanfang
Apache Servicemix:http://servicemix.apache.org
Apache Cxf: http://cxf.apache.org
Apache Karaf: http://karaf.apache.org
Apache Felix: http://felix.apache.org


Re: org.apache.cxf.BusException: No DestinationFactory was found

Posted by firasarabo <fi...@yahoo.com>.
Hi William,

the cxf-extension-interact.xml file is posted above. the interact.jar is not
in the war file, I want it to be outside in an external directory that is in
the class path which is giving the error.

when I put all jars including my interact.jar file in teh war all works just
find. 

Thanks,
Firas
-- 
View this message in context: http://cxf.547215.n5.nabble.com/org-apache-cxf-BusException-No-DestinationFactory-was-found-tp3252224p3257181.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: org.apache.cxf.BusException: No DestinationFactory was found

Posted by "Willem.Jiang" <wi...@gmail.com>.
Can I have a look at the configuration of your cxf-extension-interact.xml?
BTW, can you make sure your customer jar is wrapped into the war rightly?
-- 
View this message in context: http://cxf.547215.n5.nabble.com/org-apache-cxf-BusException-No-DestinationFactory-was-found-tp3252224p3256068.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: org.apache.cxf.BusException: No DestinationFactory was found

Posted by firasarabo <fi...@yahoo.com>.
anybody else has an idea?
-- 
View this message in context: http://cxf.547215.n5.nabble.com/org-apache-cxf-BusException-No-DestinationFactory-was-found-tp3252224p3252362.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: org.apache.cxf.BusException: No DestinationFactory was found

Posted by Sergey Beryozkin <sb...@gmail.com>.
I haven't done custom extensions but I'm just seeing in the source tree that
extensions located in META-INF/cxf have matching cxf.extension files
pointing to these extensions....

cheers, Sergey

On Fri, Nov 5, 2010 at 6:40 PM, firasarabo <fi...@yahoo.com> wrote:

>
> Hi,
>
> not sure what do you mean, I already have service-spring-context.xml in the
> application bundle which contains <import
> resource="classpath:META-INF/cxf/cxf-extension-interact.xml" />, teh
> applicatio is able to see and read cxf-extension-interact.xml file.
>
> Thanks,
> Firas
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/org-apache-cxf-BusException-No-DestinationFactory-was-found-tp3252224p3252289.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>

Re: org.apache.cxf.BusException: No DestinationFactory was found

Posted by firasarabo <fi...@yahoo.com>.
Hi,

not sure what do you mean, I already have service-spring-context.xml in the
application bundle which contains <import
resource="classpath:META-INF/cxf/cxf-extension-interact.xml" />, teh
applicatio is able to see and read cxf-extension-interact.xml file.

Thanks,
Firas
-- 
View this message in context: http://cxf.547215.n5.nabble.com/org-apache-cxf-BusException-No-DestinationFactory-was-found-tp3252224p3252289.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: org.apache.cxf.BusException: No DestinationFactory was found

Posted by Sergey Beryozkin <sb...@gmail.com>.
May be you also need to add a cxf.extension file to your application
jar/bundle which would contain the line

META-INF/cxf/cxf-extension-interact.xml

cheers, Sergey

On Fri, Nov 5, 2010 at 5:59 PM, firasarabo <fi...@yahoo.com> wrote:

>
> not sure why my post didn't show the xml files so I am posting them again
> here
>
> 1- cxf-extension-interact.xml
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <beans xmlns="http://www.springframework.org/schema/beans"
>       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>       xmlns:foo="http://cxf.apache.org/configuration/foo"
>       xsi:schemaLocation="
>       http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd">
>
>
>    <!-- ===================================================================
> -->
>    <!-- CXF Linkage
> -->
>    <!-- ===================================================================
> -->
>
>    <bean
>
> id="com.space.something.mybinding.cxf.transport.interact.InteractTransportFactory"
>
>
> class="com.space.something.mybinding.cxf.transport.interact.InteractTransportFactory"
>          lazy-init="true">
>
>        <property name="bus" ref="cxf"/>
>        <property name="transportIds">
>            <list>
>
> <value>http://space.com/something/transports/iinteract</value>
>            </list>
>        </property>
>    </bean>
>
>  </beans>
>
>
> 2- service-spring-context.xml
>
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>       xmlns="http://www.springframework.org/schema/beans"
>       xmlns:aop="http://www.springframework.org/schema/aop"
>       xmlns:tx="http://www.springframework.org/schema/tx"
>       xmlns:context="http://www.springframework.org/schema/context"
>       xmlns:cxf="http://cxf.apache.org/core"
>       xmlns:jaxws="http://cxf.apache.org/jaxws"
>       xmlns:jaxrs="http://cxf.apache.org/jaxrs"
>       xmlns:simple="http://cxf.apache.org/simple"
>       xmlns:soap="http://cxf.apache.org/bindings/soap"
>
>       xsi:schemaLocation="http://www.springframework.org/schema/beans
>       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
>       http://www.springframework.org/schema/context
> http://www.springframework.org/schema/context/spring-context-2.5.xsd
>       http://cxf.apache.org/transports/http/configuration
> http://cxf.apache.org/schemas/configuration/http-conf.xsd
>       http://cxf.apache.org/bindings/soap
> http://cxf.apache.org/schemas/configuration/soap.xsd
>       http://cxf.apache.org/simple
> http://cxf.apache.org/schemas/simple.xsd
>       http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"
>       default-autowire="byName">
>
>    <import resource="classpath:META-INF/cxf/cxf.xml" />
>    <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
>    <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
>
>    <import resource="classpath:META-INF/cxf/cxf-extension-interact.xml" />
>
>
>    <jaxws:endpoint
>        id="myServiceInteract"
>
>
> implementor="com.space.myservice.calculator.servicesimpl.CalculatorServiceImpl"
>        address="interact://something/myService"
>        transportId="http://space.com/something/transports/interact">
>    </jaxws:endpoint>
>
> </beans>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/org-apache-cxf-BusException-No-DestinationFactory-was-found-tp3252224p3252233.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>