FAQ

[ServiceMix-users] Help: Could not determine bean name for instance of class org.apache.cxf.transport.jbi.JBIDestination

Jmandawg
Mar 16, 2009 at 10:03 pm
[sending again, got a mail delivery failure]

I'm Just trying to setup up an http BC for a cxf pojo SE.



The pojo is the default one (ExampleService.java) generated from the maven

command:



C:\ServiceMixTest>mvn archetype:create

-DarchetypeArtifactId=servicemix-cxf-se-service-unit

-DarchetypeGroupId=org.apache.servicemix.tooling

-DartifactId=test-pojo-cxf-su



Then i created an http consumer bc:



C:\ServiceMixTest>mvn archetype:create

-DarchetypeArtifactId=servicemix-http-consumer-service-unit

-DarchetypeGroupId=org.apache.servicemix.tooling -DartifactId=test-http-bc



And setup the Bean.xml to use the ExampleService cxf



<beans xmlns:http="http://servicemix.apache.org/http/1.0"

xmlns:test="http://example.com/exampleService"

xmlns="http://www.springframework.org/schema/beans"

xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance
<http://http:/www.w3.org/2001/XMLSchema-instance> "

xsi:schemaLocation="http://servicemix.apache.org/http/1.0

http://servicemix.apache.org/schema/servicemix-http-3.2.2.xsd

http://www.springframework.org/schema/beans

" rel="nofollow">http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">



<http:endpoint service="test:ExampleService"

targetService="test:ExampleService"

endpoint="soap"

role="consumer"

locationURI="http://localhost:8192/example/"

defaultMep="http://www.w3.org/2004/08/wsdl/in-out"

soap="true" />



</beans>



Then i package it up into a SA and deploy the zip file and...



INFO - ServiceAssemblyLifeCycle - Starting service assembly: test-sa

INFO - ServiceUnitLifeCycle - Initializing service unit:

test-pojo-cxf-su

INFO - ServiceUnitLifeCycle - Initializing service unit:

test-http-bc

INFO - jetty - jetty-6.1.12rc1

INFO - jetty - Started

SelectChannelConnector@localhost:8192

INFO - ServiceUnitLifeCycle - Starting service unit:

test-pojo-cxf-su

Mar 16, 2009 5:35:01 PM

org.apache.cxf.service.factory.ReflectionServiceFactoryBean

buildServiceFromClass

INFO: Creating Service

{http://example.com/exampleService}ExampleServiceService from class
com.ray.servicemix.test.ExampleService

Mar 16, 2009 5:35:02 PM org.apache.cxf.configuration.spring.ConfigurerImpl

getBeanName

INFO: Could not determine bean name for instance of class
org.apache.cxf.transport.jbi.JBIDestination.

Mar 16, 2009 5:35:02 PM org.apache.cxf.endpoint.ServerImpl initDestination

INFO: Setting the server's publish address to be
jbi://ID-147-18-231-24-120113408c7-30-0

INFO - ServiceUnitLifeCycle - Starting service unit: test-http-bc







I can't get to the webservice.



What am i doing wrong?



Thanks,



-J
reply

Search Discussions

6 responses

  • Freeman Fang at Mar 17, 2009 at 1:10 am
    Hi,
    How do you try to get to the webservice? Any error you see?
    The log you show here is normal.

    Freeman

    jmandawg wrote:
    [sending again, got a mail delivery failure]

    I'm Just trying to setup up an http BC for a cxf pojo SE.



    The pojo is the default one (ExampleService.java) generated from the maven

    command:



    C:\ServiceMixTest>mvn archetype:create

    -DarchetypeArtifactId=servicemix-cxf-se-service-unit

    -DarchetypeGroupId=org.apache.servicemix.tooling

    -DartifactId=test-pojo-cxf-su



    Then i created an http consumer bc:



    C:\ServiceMixTest>mvn archetype:create

    -DarchetypeArtifactId=servicemix-http-consumer-service-unit

    -DarchetypeGroupId=org.apache.servicemix.tooling -DartifactId=test-http-bc



    And setup the Bean.xml to use the ExampleService cxf



    <beans xmlns:http="http://servicemix.apache.org/http/1.0"

    xmlns:test="http://example.com/exampleService"

    xmlns="http://www.springframework.org/schema/beans"

    xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance
    <http://http:/www.w3.org/2001/XMLSchema-instance> "

    xsi:schemaLocation="http://servicemix.apache.org/http/1.0

    http://servicemix.apache.org/schema/servicemix-http-3.2.2.xsd

    http://www.springframework.org/schema/beans

    " rel="nofollow">http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">



    <http:endpoint service="test:ExampleService"

    targetService="test:ExampleService"

    endpoint="soap"

    role="consumer"

    locationURI="http://localhost:8192/example/"

    defaultMep="http://www.w3.org/2004/08/wsdl/in-out"

    soap="true" />



    </beans>



    Then i package it up into a SA and deploy the zip file and...



    INFO - ServiceAssemblyLifeCycle - Starting service assembly: test-sa

    INFO - ServiceUnitLifeCycle - Initializing service unit:

    test-pojo-cxf-su

    INFO - ServiceUnitLifeCycle - Initializing service unit:

    test-http-bc

    INFO - jetty - jetty-6.1.12rc1

    INFO - jetty - Started

    SelectChannelConnector@localhost:8192

    INFO - ServiceUnitLifeCycle - Starting service unit:

    test-pojo-cxf-su

    Mar 16, 2009 5:35:01 PM

    org.apache.cxf.service.factory.ReflectionServiceFactoryBean

    buildServiceFromClass

    INFO: Creating Service

    {http://example.com/exampleService}ExampleServiceService from class
    com.ray.servicemix.test.ExampleService

    Mar 16, 2009 5:35:02 PM org.apache.cxf.configuration.spring.ConfigurerImpl

    getBeanName

    INFO: Could not determine bean name for instance of class
    org.apache.cxf.transport.jbi.JBIDestination.

    Mar 16, 2009 5:35:02 PM org.apache.cxf.endpoint.ServerImpl initDestination

    INFO: Setting the server's publish address to be
    jbi://ID-147-18-231-24-120113408c7-30-0

    INFO - ServiceUnitLifeCycle - Starting service unit: test-http-bc







    I can't get to the webservice.



    What am i doing wrong?



    Thanks,



    -J



  • Jean-Baptiste Onofré at Mar 17, 2009 at 11:11 am
    Hi,

    you can get an example here :
    http://servicemix.apache.org/6-intermediate-using-ejb-inside-servicemix.html

    Either if this tutorial explains how to expose an EJB inside ServiceMix, it uses exactly that you want to do :
    - define a CXF-SE POJO
    - expose it using HTTP

    Keep me posted if you need more support.

    Regards
    JB
    On Mon 16/03/09 23:03, "jmandawg" jmandawg@hotmail.com wrote:
    [sending again, got a mail delivery failure]

    I'm Just trying to setup up an http BC for a cxf pojo SE.

    The pojo is the default one (ExampleService.java) generated from the
    maven

    command:

    C:ServiceMixTest>mvn archetype:create

    -DarchetypeArtifactId=servicemix-cxf-se-service-unit

    -DarchetypeGroupId=org.apache.servicemix.tooling

    -DartifactId=test-pojo-cxf-su

    Then i created an http consumer bc:

    C:ServiceMixTest>mvn archetype:create

    -DarchetypeArtifactId=servicemix-http-consumer-service-unit

    -DarchetypeGroupId=org.apache.servicemix.tooling
    -DartifactId=test-http-bc

    And setup the Bean.xml to use the ExampleService cxf


    xmlns:test="http://example.com/exampleService [2]"

    xmlns="http://www.springframework.org/schema/beans [3]"

    xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance [4]

    xsi:schemaLocation="http://servicemix.apache.org/http/1.0 [6]

    http://servicemix.apache.org/schema/servicemix-http-3.2.2.xsd [7]

    http://www.springframework.org/schema/beans [8]

    http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"


    targetService="test:ExampleService"

    endpoint="soap"

    role="consumer"

    locationURI="http://localhost:8192/example/ [10]"

    defaultMep="http://www.w3.org/2004/08/wsdl/in-out [11]"

    soap="true" />



    Then i package it up into a SA and deploy the zip file and...

    INFO - ServiceAssemblyLifeCycle - Starting service assembly: test-sa

    INFO - ServiceUnitLifeCycle - Initializing service unit:

    test-pojo-cxf-su

    INFO - ServiceUnitLifeCycle - Initializing service unit:

    test-http-bc

    INFO - jetty - jetty-6.1.12rc1

    INFO - jetty - Started

    SelectChannelConnector@localhost:8192

    INFO - ServiceUnitLifeCycle - Starting service unit:

    test-pojo-cxf-su

    Mar 16, 2009 5:35:01 PM

    org.apache.cxf.service.factory.ReflectionServiceFactoryBean

    buildServiceFromClass

    INFO: Creating Service

    {http://example.com/exampleService}ExampleServiceService [12] from
    class
    com.ray.servicemix.test.ExampleService

    Mar 16, 2009 5:35:02 PM
    org.apache.cxf.configuration.spring.ConfigurerImpl

    getBeanName

    INFO: Could not determine bean name for instance of class
    org.apache.cxf.transport.jbi.JBIDestination.

    Mar 16, 2009 5:35:02 PM org.apache.cxf.endpoint.ServerImpl
    initDestination

    INFO: Setting the server's publish address to be
    jbi://ID-147-18-231-24-120113408c7-30-0 [13]

    INFO - ServiceUnitLifeCycle - Starting service unit: test-http-bc

    I can't get to the webservice.

    What am i doing wrong?

    Thanks,

    -J



    Links:
    ------
    [1]
    http://webmail.nanthrax.net/parse.php?redirect=http%3A%2F%2Fservicemix.apac
    he.org%2Fhttp%2F1.0[2]
    http://webmail.nanthrax.net/parse.php?redirect=http%3A%2F%2Fexample.com%2Fe
    xampleService[3]
    http://webmail.nanthrax.net/parse.php?redirect=http%3A%2F%2Fwww.springframe
    work.org%2Fschema%2Fbeans[4]
    http://webmail.nanthrax.net/parse.php?redirect=http%3A%2F%2Fhttp%3A%2F%2Fww
    w.w3.org%2F2001%2FXMLSchema-instance[5]
    http://webmail.nanthrax.net/parse.php?redirect=http%3A%2F%2Fhttp%3A%2Fwww.w
    3.org%2F2001%2FXMLSchema-instance%26gt[6]
    http://webmail.nanthrax.net/parse.php?redirect=http%3A%2F%2Fservicemix.apac
    he.org%2Fhttp%2F1.0[7]
    http://webmail.nanthrax.net/parse.php?redirect=http%3A%2F%2Fservicemix.apac
    he.org%2Fschema%2Fservicemix-http-3.2.2.xsd[8]
    http://webmail.nanthrax.net/parse.php?redirect=http%3A%2F%2Fwww.springframe
    work.org%2Fschema%2Fbeans[9]
    http://webmail.nanthrax.net/parse.php?redirect=http%3A%2F%2Fwww.springframe
    work.org%2Fschema%2Fbeans%2Fspring-beans-2.0.xsd%22%26gt[10]
    http://webmail.nanthrax.net/parse.php?redirect=http%3A%2F%2Flocalhost%3A819
    2%2Fexample%2F[11]
    http://webmail.nanthrax.net/parse.php?redirect=http%3A%2F%2Fwww.w3.org%2F20
    04%2F08%2Fwsdl%2Fin-out[12]
    http://webmail.nanthrax.net/parse.php?redirect=http%3A%2F%2Fexample.com%2Fe
    xampleService%7DExampleServiceService[13]
    http://webmail.nanthrax.net/parse.php?redirect=jbi%3A%2F%2FID-147-18-231-24
    -120113408c7-30-0
  • J- MAN at Mar 17, 2009 at 2:23 pm

    Hi,
    How do you try to get to the webservice? Any error you see?
    The log you show here is normal.
    I tried going to http://localhost:8192/example/

    and i get a 404

    When i try to test using a simple client i get:

    STATUS: 500
    env:Serverjavax.jbi.messaging.MessagingException: Could not find route for exchange: InOut[
    id: ID:147.18.231.24-12010e04e1f-10:61
    status: Active
    role: provider
    service: {http://example.com/exampleService}ExampleService
    operation: {http://servicemix.apache.org/samples/wsdl-first/types}sayHello
    in:
    world

    ] for service: {http://example.com/exampleService}ExampleService and interface: null


    This used to work with the jsr181 pojo, but it had problems with multiple parameters and i read that jsr181 was deprecated in favor of cxf.


    you can get an example here :
    http://servicemix.apache.org/6-intermediate-using-ejb-inside-servicemix.html

    Either if this tutorial explains how to expose an EJB inside ServiceMix, it uses exactly that you want to do :
    - define a CXF-SE POJO
    - expose it using HTTP

    Tried doing the example step by step but maven cannot resolve the following dependencies.
    [INFO] Failed to resolve artifact.
    Missing:----------1) jboss:jbossall-client:jar:4.2.2.GA2) my.ejb.provider:ejb-client:jar:1.0-SNAPSHOT

    Also do i need these since i'm just trying to do a simple pojo?I don't think i need to setup the proxy and environment do i?

    Thanks,
    -J
    _________________________________________________________________
    Windows Live™: Life without walls.
    http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1a_explore_032009
  • Freeman Fang at Mar 18, 2009 at 5:37 am
    Hi,
    Try add
    targetInterface="test:ExampleService" for your http endpoint also.
    And I suggest you should use wsdl first way if your bussiness logic is
    complex, since it would be less error.
    How about you also use servicemix-cxf-bc instead of the http component?
    We have cxf-wsdl-fisrt example in the kit.
    Freeman

    J- MAN wrote:
    Hi,
    How do you try to get to the webservice? Any error you see?
    The log you show here is normal.
    I tried going to http://localhost:8192/example/

    and i get a 404

    When i try to test using a simple client i get:

    STATUS: 500
    env:Serverjavax.jbi.messaging.MessagingException: Could not find route for exchange: InOut[
    id: ID:147.18.231.24-12010e04e1f-10:61
    status: Active
    role: provider
    service: {http://example.com/exampleService}ExampleService
    operation: {http://servicemix.apache.org/samples/wsdl-first/types}sayHello
    in:
    world

    ] for service: {http://example.com/exampleService}ExampleService and interface: null


    This used to work with the jsr181 pojo, but it had problems with multiple parameters and i read that jsr181 was deprecated in favor of cxf.



    you can get an example here :
    http://servicemix.apache.org/6-intermediate-using-ejb-inside-servicemix.html

    Either if this tutorial explains how to expose an EJB inside ServiceMix, it uses exactly that you want to do :
    - define a CXF-SE POJO
    - expose it using HTTP

    Tried doing the example step by step but maven cannot resolve the following dependencies.
    [INFO] Failed to resolve artifact.
    Missing:----------1) jboss:jbossall-client:jar:4.2.2.GA2) my.ejb.provider:ejb-client:jar:1.0-SNAPSHOT

    Also do i need these since i'm just trying to do a simple pojo?I don't think i need to setup the proxy and environment do i?

    Thanks,
    -J
    _________________________________________________________________
    Windows Live™: Life without walls.
    http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1a_explore_032009
  • Rsmaoui at May 2, 2012 at 6:32 am
    Hi jean,

    can you please explain to me how i can invoke ejb from servicemix,

    I tried
    http://servicemix.apache.org/6-intermediate-using-ejb-inside-servicemix.html
    but its not clear,

    in this example, my EJB should be deployed under jboss or just import jar
    files on my esb?
  • Jean-Baptiste Onofré at May 2, 2012 at 1:15 pm
    Hi,

    The EJBs are deployed in your application server (JBoss for instance).

    ServiceMix bean uses the EJB remotely using RMI-IIOP.

    Regards
    JB
    On 04/27/2012 06:59 PM, rsmaoui wrote:
    Hi jean,

    can you please explain to me how i can invoke ejb from servicemix,

    I tried
    http://servicemix.apache.org/6-intermediate-using-ejb-inside-servicemix.html
    but its not clear,

    in this example, my EJB should be deployed under jboss or just import jar
    files on my esb?



    --
    View this message in context: http://servicemix.396122.n5.nabble.com/Help-Could-not-determine-bean-name-for-instance-of-class-org-apache-cxf-transport-jbi-JBIDestination-tp417389p5670839.html
    Sent from the ServiceMix - User mailing list archive at Nabble.com.
    --
    Jean-Baptiste Onofré
    jbonofre@apache.org
    http://blog.nanthrax.net
    Talend - http://www.talend.com

Related Discussions

Discussion Navigation
viewthread | post