You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by mqaiserm <Qa...@revolution.com> on 2006/05/16 21:42:37 UTC

error in endpoint generation

Running Servicemix-3.0 snapshot version and getting this error : 

org.apache.servicemix.jbi.RuntimeJBIException:
javax.jbi.messaging.MessagingExce 
ption: Failed to resolve endpoint:
org.apache.servicemix.jbi.NoServiceAvailableE 
xception: Cannot find an instance of the service:
{http://servicemix.apache.org/ 
demo/}savedata 
        at
org.apache.servicemix.components.jms.JmsInBinding.onMessage(JmsInBind 
ing.java:74) 
        at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126) 
        at
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMe 
ssage(MessageEndpointProxy.java:120) 
        at
org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpoint 
Proxy.java:60) 
        at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:664) 
        at
org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:1 
63) 
        at
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.ja 
va:291) 
        at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown So 
urce) 
        at java.lang.Thread.run(Thread.java:595) 
Caused by: javax.jbi.messaging.MessagingException: Failed to resolve
endpoint: o 
rg.apache.servicemix.jbi.NoServiceAvailableException: Cannot find an
instance of 
 the service: {http://servicemix.apache.org/demo/}savedata 
        at
org.apache.servicemix.jbi.nmr.Broker.resolveAddress(Broker.java:378) 
        at
org.apache.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java:2 
84) 
        at
org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBICont 
ainer.java:683) 
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(Delive 
ryChannelImpl.java:450) 
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(Delivery 
ChannelImpl.java:490) 
        at
org.apache.servicemix.components.jms.JmsInBinding.onMessage(JmsInBind 
ing.java:66) 
        ... 8 more 
Caused by: org.apache.servicemix.jbi.NoServiceAvailableException: Cannot
find an 
 instance of the service: {http://servicemix.apache.org/demo/}savedata 
        at
org.apache.servicemix.jbi.resolver.ServiceNameEndpointResolver.create 
ServiceUnavailableException(ServiceNameEndpointResolver.java:60) 
        at
org.apache.servicemix.jbi.resolver.EndpointResolverSupport.resolveEnd 
point(EndpointResolverSupport.java:39) 
        at
org.apache.servicemix.jbi.nmr.Broker.resolveAddress(Broker.java:375) 
        ... 13 more 

my servicemix.xml code is : 

<?xml version="1.0" encoding="UTF-8"?> 
<beans xmlns="http://xbean.org/schemas/spring/1.0" 
        xmlns:spring="http://xbean.org/schemas/spring/1.0" 
        xmlns:sm="http://servicemix.org/config/1.0" 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xsi:schemaLocation="http://xbean.org/schemas/spring/1.0
../../conf/spring-beans.xsd 
                            http://servicemix.org/config/1.0
../../conf/servicemix.xsd" 
    xmlns:my="http://servicemix.org/demo/"> 
    
  <!-- the JBI container --> 
  <sm:container spring:id="jbi" 
                  useMBeanServer="true" 
                  createMBeanServer="true" 
                  dumpStats="true" 
            rmiPort="1080" 
                  statsInterval="10" 
                  transactionManager="#transactionManager"> 
                  
          <sm:activationSpecs> 
          
        <!-- Subscribe to a JMS destination --> 
                  <sm:activationSpec componentName="inputReceiver" 
                                                    
service="my:inputReceiver" 
                                                    
destinationService="my:outputSender"> 
                    <sm:component> 
                      <bean xmlns="http://xbean.org/schemas/spring/1.0" 
                           
class="org.servicemix.components.jms.JmsInUsingJCABinding"> 
        <property name="jcaContainer" ref="jencks"/> 
        <property name="activationSpec"> 
          <bean class="org.activemq.ra.ActiveMQActivationSpec"> 
            <property name="destination"
value="com.rhg.servicemix.messaging.errorLogging"/> 
            <property name="destinationType" value="javax.jms.Topic"/> 
          </bean> 
        </property> 
                      </bean> 
                    </sm:component> 
                  </sm:activationSpec> 
                  
      <!-- Publish the result to a JMS destination --> 
                  <sm:activationSpec componentName="outputSender" 
                                                    
service="my:outputSender"> 
                    <sm:component> 
                      <bean xmlns="http://xbean.org/schemas/spring/1.0" 
                           
class="org.servicemix.components.jms.JmsSenderComponent"> 
        <property name="template"> 
          <bean class="org.springframework.jms.core.JmsTemplate"> 
            <property name="connectionFactory"> 
              <ref local="jmsFactory"/> 
            </property> 
            <property name="defaultDestinationName"
value="com.rhg.servicemix.messaging.errorLoggingResult"/> 
            <property name="pubSubDomain" value="true"/> 
          </bean> 
        </property> 
                      </bean> 
                    </sm:component> 
                  </sm:activationSpec> 

         <sm:activationSpec componentName="jmsTrace" service="my:jmsTrace"
destinationService="my:savetodb"> 
        <sm:component> 
          <bean class="org.servicemix.components.jms.JmsInUsingJCABinding"> 
        <property name="jcaContainer" ref="jencks"/> 
        <property name="activationSpec"> 
          <bean class="org.activemq.ra.ActiveMQActivationSpec"> 
            <property name="destination"
value="com.rhg.servicemix.messaging.errorLoggingResult"/> 
            <property name="destinationType" value="javax.jms.Topic"/> 
          </bean> 
        </property> 
          </bean> 
        </sm:component> 
      </sm:activationSpec> 

      <sm:activationSpec componentName="trace" service="my:savetodb"> 
        <sm:component> 
          <bean class="com.rhg.infrastructure.jms.MessageReceiverImpl"/> 
        </sm:component> 
      </sm:activationSpec> 

                  
          </sm:activationSpecs> 
  </sm:container> 


  <!-- the JCA container --> 
  <bean id="jencks" class="org.jencks.JCAContainer" singleton="true"> 

    <!-- lets use the default configuration of work manager and transaction
manager--> 
    <property name="bootstrapContext"> 
      <bean class="org.jencks.factory.BootstrapContextFactoryBean"> 
        <property name="threadPoolSize" value="25"/> 
      </bean> 
    </property> 

    
    <!-- the JCA Resource Adapter --> 
    <property name="resourceAdapter"> 
      <bean id="activeMQResourceAdapter"
class="org.activemq.ra.ActiveMQResourceAdapter" singleton="true"> 
        <property name="serverUrl" value="tcp://localhost:61616"/> 
      </bean> 
    </property> 
  </bean> 

  <!-- message broker --> 
  <bean id="broker" class="org.activemq.spring.BrokerFactoryBean"> 
     <property name="config" value="activemq.xml"/> 
   </bean> 

        <bean id="transactionContextManager"
class="org.jencks.factory.TransactionContextManagerFactoryBean"/> 
        <bean id="transactionManager"
class="org.jencks.factory.GeronimoTransactionManagerFactoryBean" /> 

  <bean id="jmsFactory" class="org.activemq.pool.PooledConnectionFactory"> 
    <property name="connectionFactory"> 
      <bean class="org.activemq.ActiveMQConnectionFactory"> 
        <property name="brokerURL"> 
          <value>tcp://localhost:61616</value> 
        </property> 
      </bean> 
    </property> 
  </bean> 

</beans> 


Any idea ?

--
View this message in context: http://www.nabble.com/error-in-endpoint-generation-t1630736.html#a4417434
Sent from the ServiceMix - User forum at Nabble.com.


Re: error in endpoint generation

Posted by Guillaume Nodet <gn...@gmail.com>.
In the servicemix/conf/log4j.xml, replace all INFO/WARN by DEBUG.
Could you try to change your component with

public void init(ComponentContext context) throws JBIException {
    log.error("@@@@@@@@@ Enter init method");
    try {
        super.init(context);
        log.error("@@@@@@@@@ Activating endpoint: " + getService() + " / " +
getEndpoint());
        context.activateEndpoint(service, endpoint);
        log.error("@@@@@@@@@ Endpoint activated");
    } catch(Exception e) {
        log.error("@@@@@@@ error is " +e.toString(), e);
        throw new JBIException(e);
    }
    log.error("@@@@@@@@@ Leave init method");
}

This should fail because the endpoint should have already been activated
when calling super.init(context) , but ...
Then post the full log.

Also, which version / snapshot of servicemix you use ?

Guillaume


On 5/17/06, mqaiserm <Qa...@revolution.com> wrote:
>
>
> New code is following but still getting error :
>
> public class MessageReceiverImpl extends ComponentSupport implements
> MessageExchangeListener,MessageReceiver{
>
>         // log
>     private Log log =LogFactory.getLog(MessageReceiverImpl.class);
>
>         // sourcetransformer to transform message from exchange
>     private SourceTransformer sourceTransformer = new SourceTransformer();
>
>     public Log getLog() {
>         return log;
>     }
>
>     public void setLog(Log log) {
>         this.log = log;
>     }
>
>     public SourceTransformer getSourceTransformer() {
>         return sourceTransformer;
>     }
>
>     public void init(ComponentContext context) {
>         try {
>         super.init(context);
>         } catch(Exception e) {
>                 log.error("@@@@@@@ error is " +e.toString());
>         }
>         log.error("@@@@@@@@@ In init method");
>
>     }
>
>     public void setSourceTransformer(SourceTransformer sourceTransformer)
> {
>         this.sourceTransformer = sourceTransformer;
>     }
>
>     /**
>          * This method will get the Asynchronous messages from exchange,
> will transform into Java Bean and then
>          * call another class method to store into db.
>          * @return void
>          * @param args MessageExchange exchange to get messages
>          */
>
>     public void onMessageExchange(MessageExchange exchange) throws
> MessagingException {
>
>         // getting the incoming message from exchange
>         NormalizedMessage message = exchange.getMessage("in");
>
>         if (message == null) {
>             log.warn("Received null message from exchange: " + exchange);
>         }
>         else {
>                     log.info("Exchange: " + exchange + " received IN
> message
> : " + message);
>             try {
>                     // getting the messaging content from message in xml
> format
>                     String xml =
> sourceTransformer.toString(message.getContent());
>
>                     // using the custom utility class to transform xml
> into
> java object
>                 //Message messageBean =
> XMLBeanUtil.getMessageObjectFromXML(xml);
>
>                 // saving that java object into database by using the
> hibernate
>                 //MessagesDAOImpl instance = new MessagesDAOImpl();
>                 //instance.saveMessage(messageBean);
>                 log.error(xml);
>
>             }
>             catch (TransformerException e) {
>                 log.error("Failed to turn message body into text: "+ e,
> e);
>             }
>             catch(Exception e) {
>                     log.error("Failed to turn message body intotext: " +
> e,
> e);
>             }
>         }
>         // done with exchange
>         done(exchange);
>     }
> }
>
>
> can you please also tell me how I can on debug level in servicemix
> --
> View this message in context:
> http://www.nabble.com/error-in-endpoint-generation-t1630736.html#a4434604
> Sent from the ServiceMix - User forum at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet

Re: error in endpoint generation

Posted by mqaiserm <Qa...@revolution.com>.
New code is following but still getting error :

public class MessageReceiverImpl extends ComponentSupport implements
MessageExchangeListener,MessageReceiver{ 
        
        // log 
    private Log log =LogFactory.getLog(MessageReceiverImpl.class); 

        // sourcetransformer to transform message from exchange 
    private SourceTransformer sourceTransformer = new SourceTransformer(); 

    public Log getLog() { 
        return log; 
    } 

    public void setLog(Log log) { 
        this.log = log; 
    } 

    public SourceTransformer getSourceTransformer() { 
        return sourceTransformer; 
    } 
    
    public void init(ComponentContext context) {
    	try {
    	super.init(context);
    	} catch(Exception e) {
    		log.error("@@@@@@@ error is " +e.toString());
    	}
    	log.error("@@@@@@@@@ In init method");
    	
    }

    public void setSourceTransformer(SourceTransformer sourceTransformer) { 
        this.sourceTransformer = sourceTransformer; 
    } 

    /** 
         * This method will get the Asynchronous messages from exchange,
will transform into Java Bean and then 
         * call another class method to store into db. 
         * @return void 
         * @param args MessageExchange exchange to get messages 
         */ 
    
    public void onMessageExchange(MessageExchange exchange) throws
MessagingException { 
            
        // getting the incoming message from exchange 
        NormalizedMessage message = exchange.getMessage("in"); 
        
        if (message == null) { 
            log.warn("Received null message from exchange: " + exchange); 
        } 
        else { 
                    log.info("Exchange: " + exchange + " received IN message
: " + message); 
            try { 
                    // getting the messaging content from message in xml
format 
                    String xml =
sourceTransformer.toString(message.getContent()); 
                    
                    // using the custom utility class to transform xml into
java object 
                //Message messageBean =
XMLBeanUtil.getMessageObjectFromXML(xml); 
                
                // saving that java object into database by using the
hibernate 
                //MessagesDAOImpl instance = new MessagesDAOImpl(); 
                //instance.saveMessage(messageBean); 
                log.error(xml);
                
            } 
            catch (TransformerException e) { 
                log.error("Failed to turn message body into text: "+ e, e);
            } 
            catch(Exception e) { 
                    log.error("Failed to turn message body intotext: " + e,
e); 
            } 
        } 
        // done with exchange 
        done(exchange); 
    } 
} 


can you please also tell me how I can on debug level in servicemix
--
View this message in context: http://www.nabble.com/error-in-endpoint-generation-t1630736.html#a4434604
Sent from the ServiceMix - User forum at Nabble.com.


Re: error in endpoint generation

Posted by Guillaume Nodet <gn...@gmail.com>.
Send me a mail with the following attachments:
* full log to DEBUG level
* full code for your component
* full servicemix.xml configuration

Btw, if you do not call super.init(context), the endpoint will never be
created ...

Guillaume

On 5/17/06, mqaiserm <Qa...@revolution.com> wrote:
>
> Error is :
>
> ERROR - GeronimoLog.error(106) | error dispatching message:
> org.apache.servicemix.jbi.RuntimeJBIException:
> javax.jbi.messaging.MessagingExce
> ption: Failed to resolve endpoint:
> org.apache.servicemix.jbi.NoServiceAvailableE
> xception: Cannot find an instance of the service:
> {http://servicemix.apache.org/
> demo/}savedata
>         at
> org.apache.servicemix.components.jms.JmsInBinding.onMessage(JmsInBind
> ing.java:74)
>         at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMe
> ssage(MessageEndpointProxy.java:120)
>         at
> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpoint
> Proxy.java:60)
>         at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java
:664)
>         at
> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:1
> 63)
>         at
> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.ja
> va:291)
>         at
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown So
> urce)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: javax.jbi.messaging.MessagingException: Failed to resolve
> endpoint: o
> rg.apache.servicemix.jbi.NoServiceAvailableException: Cannot find an
> instance of
>  the service: {http://servicemix.apache.org/demo/}savedata
>         at
> org.apache.servicemix.jbi.nmr.Broker.resolveAddress(Broker.java:378)
>         at
> org.apache.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java:2
> 84)
>         at
> org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBICont
> ainer.java:683)
>         at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(Delive
> ryChannelImpl.java:450)
>         at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(Delivery
> ChannelImpl.java:490)
>         at
> org.apache.servicemix.components.jms.JmsInBinding.onMessage(JmsInBind
> ing.java:66)
>         ... 8 more
> Caused by: org.apache.servicemix.jbi.NoServiceAvailableException: Cannot
> find an
>  instance of the service: {http://servicemix.apache.org/demo/}savedata
>         at
> org.apache.servicemix.jbi.resolver.ServiceNameEndpointResolver.create
> ServiceUnavailableException(ServiceNameEndpointResolver.java:60)
>         at
> org.apache.servicemix.jbi.resolver.EndpointResolverSupport.resolveEnd
> point(EndpointResolverSupport.java:39)
>         at
> org.apache.servicemix.jbi.nmr.Broker.resolveAddress(Broker.java:375)
>         ... 13 more
> 11:58:10,703 ERROR [ActiveMQSession] error dispatching message:
> org.apache.servicemix.jbi.RuntimeJBIException:
> javax.jbi.messaging.MessagingExce
> ption: Failed to resolve endpoint:
> org.apache.servicemix.jbi.NoServiceAvailableE
> xception: Cannot find an instance of the service:
> {http://servicemix.apache.org/
> demo/}savedata
>         at
> org.apache.servicemix.components.jms.JmsInBinding.onMessage(JmsInBind
> ing.java:74)
>         at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMe
> ssage(MessageEndpointProxy.java:120)
>         at
> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpoint
> Proxy.java:60)
>         at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java
:664)
>         at
> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:1
> 63)
>         at
> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.ja
> va:291)
>         at
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown So
> urce)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: javax.jbi.messaging.MessagingException: Failed to resolve
> endpoint: o
> rg.apache.servicemix.jbi.NoServiceAvailableException: Cannot find an
> instance of
>  the service: {http://servicemix.apache.org/demo/}savedata
>         at
> org.apache.servicemix.jbi.nmr.Broker.resolveAddress(Broker.java:378)
>         at
> org.apache.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java:2
> 84)
>         at
> org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBICont
> ainer.java:683)
>         at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(Delive
> ryChannelImpl.java:450)
>         at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(Delivery
> ChannelImpl.java:490)
>         at
> org.apache.servicemix.components.jms.JmsInBinding.onMessage(JmsInBind
> ing.java:66)
>         ... 8 more
> Caused by: org.apache.servicemix.jbi.NoServiceAvailableException: Cannot
> find an
>  instance of the service: {http://servicemix.apache.org/demo/}savedata
>         at
> org.apache.servicemix.jbi.resolver.ServiceNameEndpointResolver.create
> ServiceUnavailableException(ServiceNameEndpointResolver.java:60)
>         at
> org.apache.servicemix.jbi.resolver.EndpointResolverSupport.resolveEnd
> point(EndpointResolverSupport.java:39)
>         at
> org.apache.servicemix.jbi.nmr.Broker.resolveAddress(Broker.java:375)
>         ... 13 more
> ERROR - GeronimoLog.error(106) | Unexpected exception rolling back
> org.apache.ac
> tivemq.ra.LocalAndXATransaction@122dad5; continuing with rollback
> javax.transaction.xa.XAException: The connection is already closed
>         at
> org.apache.activemq.TransactionContext.toXAException(TransactionConte
> xt.java:589)
>         at
> org.apache.activemq.TransactionContext.rollback(TransactionContext.ja
> va:414)
>         at
> org.apache.activemq.ra.LocalAndXATransaction.rollback(LocalAndXATrans
> action.java:126)
>         at
> org.apache.geronimo.transaction.manager.TransactionImpl.rollbackResou
> rces(TransactionImpl.java:542)
>         at
> org.apache.geronimo.transaction.manager.TransactionImpl.rollback(Tran
> sactionImpl.java:446)
>         at
> org.apache.geronimo.transaction.manager.TransactionManagerImpl.rollba
> ck(TransactionManagerImpl.java:155)
>         at
> org.apache.geronimo.transaction.context.InheritableTransactionContext
> .isRolledback(InheritableTransactionContext.java:283)
>         at
> org.apache.geronimo.transaction.context.InheritableTransactionContext
> .complete(InheritableTransactionContext.java:171)
>         at
> org.apache.geronimo.transaction.context.InheritableTransactionContext
> .rollback(InheritableTransactionContext.java:152)
>         at
> org.apache.geronimo.transaction.context.GeronimoTransactionManager.ro
> llback(GeronimoTransactionManager.java:108)
>         at
> org.apache.geronimo.transaction.context.GeronimoTransactionDelegate.r
> ollback(GeronimoTransactionDelegate.java:74)
>         at org.jencks.XAEndpoint.release(XAEndpoint.java:133)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointDead.enter
> (MessageEndpointProxy.java:140)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointState.tran
> sition(MessageEndpointProxy.java:98)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.rele
> ase(MessageEndpointProxy.java:133)
>         at
> org.apache.activemq.ra.MessageEndpointProxy.release(MessageEndpointPr
> oxy.java:68)
>         at
> org.apache.activemq.ra.ServerSessionImpl.close(ServerSessionImpl.java
> :250)
>         at
> org.apache.activemq.ra.ServerSessionPoolImpl.removeFromPool(ServerSes
> sionPoolImpl.java:180)
>         at
> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:1
> 77)
>         at
> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.ja
> va:291)
>         at
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown So
> urce)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: org.apache.activemq.ConnectionClosedException: The connection
is
> alre
> ady closed
>         at
> org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnect
> ion.java:1104)
>         at
> org.apache.activemq.TransactionContext.rollback(TransactionContext.ja
> va:403)
>         ... 20 more
> 11:58:11,734 ERROR [Transaction] Unexpected exception rolling back
> org.apache.ac
> tivemq.ra.LocalAndXATransaction@122dad5; continuing with rollback
> javax.transaction.xa.XAException: The connection is already closed
>         at
> org.apache.activemq.TransactionContext.toXAException(TransactionConte
> xt.java:589)
>         at
> org.apache.activemq.TransactionContext.rollback(TransactionContext.ja
> va:414)
>         at
> org.apache.activemq.ra.LocalAndXATransaction.rollback(LocalAndXATrans
> action.java:126)
>         at
> org.apache.geronimo.transaction.manager.TransactionImpl.rollbackResou
> rces(TransactionImpl.java:542)
>         at
> org.apache.geronimo.transaction.manager.TransactionImpl.rollback(Tran
> sactionImpl.java:446)
>         at
> org.apache.geronimo.transaction.manager.TransactionManagerImpl.rollba
> ck(TransactionManagerImpl.java:155)
>         at
> org.apache.geronimo.transaction.context.InheritableTransactionContext
> .isRolledback(InheritableTransactionContext.java:283)
>         at
> org.apache.geronimo.transaction.context.InheritableTransactionContext
> .complete(InheritableTransactionContext.java:171)
>         at
> org.apache.geronimo.transaction.context.InheritableTransactionContext
> .rollback(InheritableTransactionContext.java:152)
>         at
> org.apache.geronimo.transaction.context.GeronimoTransactionManager.ro
> llback(GeronimoTransactionManager.java:108)
>         at
> org.apache.geronimo.transaction.context.GeronimoTransactionDelegate.r
> ollback(GeronimoTransactionDelegate.java:74)
>         at org.jencks.XAEndpoint.release(XAEndpoint.java:133)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointDead.enter
> (MessageEndpointProxy.java:140)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointState.tran
> sition(MessageEndpointProxy.java:98)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.rele
> ase(MessageEndpointProxy.java:133)
>         at
> org.apache.activemq.ra.MessageEndpointProxy.release(MessageEndpointPr
> oxy.java:68)
>         at
> org.apache.activemq.ra.ServerSessionImpl.close(ServerSessionImpl.java
> :250)
>         at
> org.apache.activemq.ra.ServerSessionPoolImpl.removeFromPool(ServerSes
> sionPoolImpl.java:180)
>         at
> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:1
> 77)
>         at
> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.ja
> va:291)
>         at
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown So
> urce)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: org.apache.activemq.ConnectionClosedException: The connection
is
> alre
> ady closed
>         at
> org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnect
> ion.java:1104)
>         at
> org.apache.activemq.TransactionContext.rollback(TransactionContext.ja
> va:403)
>         ... 20 more
> ERROR - GeronimoLog.error(106) | Unable to roll back transaction
> java.lang.IllegalStateException: Status is STATUS_NO_TRANSACTION
>         at
> org.apache.geronimo.transaction.manager.TransactionImpl.rollback(Tran
> sactionImpl.java:438)
>         at
> org.apache.geronimo.transaction.context.InheritableTransactionContext
> .rollbackAndThrow(InheritableTransactionContext.java:308)
>         at
> org.apache.geronimo.transaction.context.InheritableTransactionContext
> .complete(InheritableTransactionContext.java:199)
>         at
> org.apache.geronimo.transaction.context.InheritableTransactionContext
> .rollback(InheritableTransactionContext.java:152)
>         at
> org.apache.geronimo.transaction.context.GeronimoTransactionManager.ro
> llback(GeronimoTransactionManager.java:108)
>         at
> org.apache.geronimo.transaction.context.GeronimoTransactionDelegate.r
> ollback(GeronimoTransactionDelegate.java:74)
>         at org.jencks.XAEndpoint.release(XAEndpoint.java:133)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointDead.enter
> (MessageEndpointProxy.java:140)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointState.tran
> sition(MessageEndpointProxy.java:98)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.rele
> ase(MessageEndpointProxy.java:133)
>         at
> org.apache.activemq.ra.MessageEndpointProxy.release(MessageEndpointPr
> oxy.java:68)
>         at
> org.apache.activemq.ra.ServerSessionImpl.close(ServerSessionImpl.java
> :250)
>         at
> org.apache.activemq.ra.ServerSessionPoolImpl.removeFromPool(ServerSes
> sionPoolImpl.java:180)
>         at
> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:1
> 77)
>         at
> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.ja
> va:291)
>         at
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown So
> urce)
>         at java.lang.Thread.run(Thread.java:595)
> 11:58:11,765 ERROR [AbstractTransactionContext] Unable to roll back
> transaction
> java.lang.IllegalStateException: Status is STATUS_NO_TRANSACTION
>         at
> org.apache.geronimo.transaction.manager.TransactionImpl.rollback(Tran
> sactionImpl.java:438)
>         at
> org.apache.geronimo.transaction.context.InheritableTransactionContext
> .rollbackAndThrow(InheritableTransactionContext.java:308)
>         at
> org.apache.geronimo.transaction.context.InheritableTransactionContext
> .complete(InheritableTransactionContext.java:199)
>         at
> org.apache.geronimo.transaction.context.InheritableTransactionContext
> .rollback(InheritableTransactionContext.java:152)
>         at
> org.apache.geronimo.transaction.context.GeronimoTransactionManager.ro
> llback(GeronimoTransactionManager.java:108)
>         at
> org.apache.geronimo.transaction.context.GeronimoTransactionDelegate.r
> ollback(GeronimoTransactionDelegate.java:74)
>         at org.jencks.XAEndpoint.release(XAEndpoint.java:133)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointDead.enter
> (MessageEndpointProxy.java:140)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointState.tran
> sition(MessageEndpointProxy.java:98)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.rele
> ase(MessageEndpointProxy.java:133)
>         at
> org.apache.activemq.ra.MessageEndpointProxy.release(MessageEndpointPr
> oxy.java:68)
>         at
> org.apache.activemq.ra.ServerSessionImpl.close(ServerSessionImpl.java
> :250)
>         at
> org.apache.activemq.ra.ServerSessionPoolImpl.removeFromPool(ServerSes
> sionPoolImpl.java:180)
>         at
> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:1
> 77)
>         at
> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.ja
> va:291)
>         at
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown So
> urce)
>         at java.lang.Thread.run(Thread.java:595)
>
> And my servicemix.xml code :
>
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns:sm="http://servicemix.apache.org/config/1.0"
>        xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0"
>        xmlns:http="http://servicemix.apache.org/http/1.0"
>        xmlns:my="http://servicemix.apache.org/demo/"
>        xmlns:demo="http://servicemix.apache.org/demo/">
>
>   <!-- the JBI container -->
>   <sm:container id="jbi"
>                 useMBeanServer="true"
>                 createMBeanServer="true"
>                 dumpStats="true"
>         rmiPort="2222"
>                 statsInterval="10"
>                 transactionManager="#transactionManager">
>
>         <sm:activationSpecs>
>
>             <!-- Subscribe to a JMS destination -->
>                 <sm:activationSpec componentName="inputReceiver"
>                                                    service="my:inputReceiver"
>                                                    destinationService="my:savedata">
>                   <sm:component>
>                     <bean
> class="org.apache.servicemix.components.jms.JmsInUsingJCABinding">
>         <property name="jcaContainer" ref="jencks"/>
>         <property name="activationSpec">
>           <bean class="org.apache.activemq.ra.ActiveMQActivationSpec">
>             <property name="destination"
> value="com.rhg.servicemix.messaging.errorLogging"/>
>             <property name="destinationType" value="javax.jms.Topic"/>
>           </bean>
>         </property>
>                     </bean>
>                   </sm:component>
>                 </sm:activationSpec>
>
>
>
>
>       <sm:activationSpec id="savedata"
>                                 service="my:savedata">
>                 <sm:component>
>                         <bean xmlns="http://xbean.org/schemas/spring/1.0"
>                                 class="
com.rhg.infrastructure.jms.MessageReceiverImpl" />
>                 </sm:component>
>         </sm:activationSpec>
>
>
>         </sm:activationSpecs>
>   </sm:container>
>
>
>   <!-- the JCA container -->
>   <bean id="jencks" class="org.jencks.JCAContainer" singleton="true">
>
>     <!-- lets use the default configuration of work manager and
transaction
> manager-->
>     <property name="bootstrapContext">
>       <bean class="org.jencks.factory.BootstrapContextFactoryBean">
>         <property name="threadPoolSize" value="25"/>
>       </bean>
>     </property>
>
>     <!-- the JCA Resource Adapter -->
>     <property name="resourceAdapter">
>       <bean id="activeMQResourceAdapter"
> class="org.apache.activemq.ra.ActiveMQResourceAdapter" singleton="true">
>         <property name="serverUrl" value="tcp://localhost:61616"/>
>       </bean>
>     </property>
>   </bean>
>
>   <!-- message broker -->
>   <bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">
>      <property name="config" value="classpath:activemq.xml"/>
>    </bean>
>
>         <bean id="transactionContextManager"
> class="org.jencks.factory.TransactionContextManagerFactoryBean"/>
>         <bean id="transactionManager"
> class="org.jencks.factory.GeronimoTransactionManagerFactoryBean" />
>
>   <bean id="jmsFactory"
> class="org.apache.activemq.pool.PooledConnectionFactory">
>     <property name="connectionFactory">
>       <bean class="org.apache.activemq.ActiveMQConnectionFactory">
>         <property name="brokerURL">
>           <value>tcp://localhost:61616</value>
>         </property>
>       </bean>
>     </property>
>   </bean>
>
> </beans>
>
> And my MessageReceiverImpl code :
>
> public class MessageReceiverImpl extends ComponentSupport implements
> MessageExchangeListener,MessageReceiver{
>
>         // log
>     private Log log =LogFactory.getLog(MessageReceiverImpl.class);
>
>         // sourcetransformer to transform message from exchange
>     private SourceTransformer sourceTransformer = new SourceTransformer();
>
>     public Log getLog() {
>         return log;
>     }
>
>     public void setLog(Log log) {
>         this.log = log;
>     }
>
>     public SourceTransformer getSourceTransformer() {
>         return sourceTransformer;
>     }
>
>     public void init(ComponentContext context) {
>
>         log.error("@@@@@@@@@ In init method");
>
>     }
>
>     public void setSourceTransformer(SourceTransformer sourceTransformer)
{
>         this.sourceTransformer = sourceTransformer;
>     }
>
>     /**
>          * This method will get the Asynchronous messages from exchange,
> will transform into Java Bean and then
>          * call another class method to store into db.
>          * @return void
>          * @param args MessageExchange exchange to get messages
>          */
>
>     public void onMessageExchange(MessageExchange exchange) throws
> MessagingException {
>
>         // getting the incoming message from exchange
>         NormalizedMessage message = exchange.getMessage("in");
>
>         if (message == null) {
>             log.warn("Received null message from exchange: " + exchange);
>         }
>         else {
>                     log.info("Exchange: " + exchange + " received IN
message
> : " + message);
>             try {
>                     // getting the messaging content from message in xml
> format
>                     String xml =
> sourceTransformer.toString(message.getContent());
>
>                     // using the custom utility class to transform xml
into
> java object
>                 Message messageBean =
> XMLBeanUtil.getMessageObjectFromXML(xml);
>
>                 // saving that java object into database by using the
> hibernate
>                 MessagesDAOImpl instance = new MessagesDAOImpl();
>                 instance.saveMessage(messageBean);
>
>
>             }
>             catch (TransformerException e) {
>                 log.error("Failed to turn message body into text: "+ e,
e);
>             }
>             catch(Exception e) {
>                     log.error("Failed to turn message body intotext: " +
e,
> e);
>             }
>         }
>         // done with exchange
>         done(exchange);
>     }
> }
>
>
> Any idea ?
> --
> View this message in context:
http://www.nabble.com/error-in-endpoint-generation-t1630736.html#a4433550
> Sent from the ServiceMix - User forum at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet

Re: error in endpoint generation

Posted by mqaiserm <Qa...@revolution.com>.
Error is :

ERROR - GeronimoLog.error(106) | error dispatching message:
org.apache.servicemix.jbi.RuntimeJBIException:
javax.jbi.messaging.MessagingExce
ption: Failed to resolve endpoint:
org.apache.servicemix.jbi.NoServiceAvailableE
xception: Cannot find an instance of the service:
{http://servicemix.apache.org/
demo/}savedata
        at
org.apache.servicemix.components.jms.JmsInBinding.onMessage(JmsInBind
ing.java:74)
        at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
        at
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMe
ssage(MessageEndpointProxy.java:120)
        at
org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpoint
Proxy.java:60)
        at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:664)
        at
org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:1
63)
        at
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.ja
va:291)
        at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown So
urce)
        at java.lang.Thread.run(Thread.java:595)
Caused by: javax.jbi.messaging.MessagingException: Failed to resolve
endpoint: o
rg.apache.servicemix.jbi.NoServiceAvailableException: Cannot find an
instance of
 the service: {http://servicemix.apache.org/demo/}savedata
        at
org.apache.servicemix.jbi.nmr.Broker.resolveAddress(Broker.java:378)
        at
org.apache.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java:2
84)
        at
org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBICont
ainer.java:683)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(Delive
ryChannelImpl.java:450)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(Delivery
ChannelImpl.java:490)
        at
org.apache.servicemix.components.jms.JmsInBinding.onMessage(JmsInBind
ing.java:66)
        ... 8 more
Caused by: org.apache.servicemix.jbi.NoServiceAvailableException: Cannot
find an
 instance of the service: {http://servicemix.apache.org/demo/}savedata
        at
org.apache.servicemix.jbi.resolver.ServiceNameEndpointResolver.create
ServiceUnavailableException(ServiceNameEndpointResolver.java:60)
        at
org.apache.servicemix.jbi.resolver.EndpointResolverSupport.resolveEnd
point(EndpointResolverSupport.java:39)
        at
org.apache.servicemix.jbi.nmr.Broker.resolveAddress(Broker.java:375)
        ... 13 more
11:58:10,703 ERROR [ActiveMQSession] error dispatching message:
org.apache.servicemix.jbi.RuntimeJBIException:
javax.jbi.messaging.MessagingExce
ption: Failed to resolve endpoint:
org.apache.servicemix.jbi.NoServiceAvailableE
xception: Cannot find an instance of the service:
{http://servicemix.apache.org/
demo/}savedata
        at
org.apache.servicemix.components.jms.JmsInBinding.onMessage(JmsInBind
ing.java:74)
        at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
        at
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMe
ssage(MessageEndpointProxy.java:120)
        at
org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpoint
Proxy.java:60)
        at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:664)
        at
org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:1
63)
        at
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.ja
va:291)
        at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown So
urce)
        at java.lang.Thread.run(Thread.java:595)
Caused by: javax.jbi.messaging.MessagingException: Failed to resolve
endpoint: o
rg.apache.servicemix.jbi.NoServiceAvailableException: Cannot find an
instance of
 the service: {http://servicemix.apache.org/demo/}savedata
        at
org.apache.servicemix.jbi.nmr.Broker.resolveAddress(Broker.java:378)
        at
org.apache.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java:2
84)
        at
org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBICont
ainer.java:683)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(Delive
ryChannelImpl.java:450)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(Delivery
ChannelImpl.java:490)
        at
org.apache.servicemix.components.jms.JmsInBinding.onMessage(JmsInBind
ing.java:66)
        ... 8 more
Caused by: org.apache.servicemix.jbi.NoServiceAvailableException: Cannot
find an
 instance of the service: {http://servicemix.apache.org/demo/}savedata
        at
org.apache.servicemix.jbi.resolver.ServiceNameEndpointResolver.create
ServiceUnavailableException(ServiceNameEndpointResolver.java:60)
        at
org.apache.servicemix.jbi.resolver.EndpointResolverSupport.resolveEnd
point(EndpointResolverSupport.java:39)
        at
org.apache.servicemix.jbi.nmr.Broker.resolveAddress(Broker.java:375)
        ... 13 more
ERROR - GeronimoLog.error(106) | Unexpected exception rolling back
org.apache.ac
tivemq.ra.LocalAndXATransaction@122dad5; continuing with rollback
javax.transaction.xa.XAException: The connection is already closed
        at
org.apache.activemq.TransactionContext.toXAException(TransactionConte
xt.java:589)
        at
org.apache.activemq.TransactionContext.rollback(TransactionContext.ja
va:414)
        at
org.apache.activemq.ra.LocalAndXATransaction.rollback(LocalAndXATrans
action.java:126)
        at
org.apache.geronimo.transaction.manager.TransactionImpl.rollbackResou
rces(TransactionImpl.java:542)
        at
org.apache.geronimo.transaction.manager.TransactionImpl.rollback(Tran
sactionImpl.java:446)
        at
org.apache.geronimo.transaction.manager.TransactionManagerImpl.rollba
ck(TransactionManagerImpl.java:155)
        at
org.apache.geronimo.transaction.context.InheritableTransactionContext
.isRolledback(InheritableTransactionContext.java:283)
        at
org.apache.geronimo.transaction.context.InheritableTransactionContext
.complete(InheritableTransactionContext.java:171)
        at
org.apache.geronimo.transaction.context.InheritableTransactionContext
.rollback(InheritableTransactionContext.java:152)
        at
org.apache.geronimo.transaction.context.GeronimoTransactionManager.ro
llback(GeronimoTransactionManager.java:108)
        at
org.apache.geronimo.transaction.context.GeronimoTransactionDelegate.r
ollback(GeronimoTransactionDelegate.java:74)
        at org.jencks.XAEndpoint.release(XAEndpoint.java:133)
        at
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointDead.enter
(MessageEndpointProxy.java:140)
        at
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointState.tran
sition(MessageEndpointProxy.java:98)
        at
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.rele
ase(MessageEndpointProxy.java:133)
        at
org.apache.activemq.ra.MessageEndpointProxy.release(MessageEndpointPr
oxy.java:68)
        at
org.apache.activemq.ra.ServerSessionImpl.close(ServerSessionImpl.java
:250)
        at
org.apache.activemq.ra.ServerSessionPoolImpl.removeFromPool(ServerSes
sionPoolImpl.java:180)
        at
org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:1
77)
        at
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.ja
va:291)
        at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown So
urce)
        at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.activemq.ConnectionClosedException: The connection is
alre
ady closed
        at
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnect
ion.java:1104)
        at
org.apache.activemq.TransactionContext.rollback(TransactionContext.ja
va:403)
        ... 20 more
11:58:11,734 ERROR [Transaction] Unexpected exception rolling back
org.apache.ac
tivemq.ra.LocalAndXATransaction@122dad5; continuing with rollback
javax.transaction.xa.XAException: The connection is already closed
        at
org.apache.activemq.TransactionContext.toXAException(TransactionConte
xt.java:589)
        at
org.apache.activemq.TransactionContext.rollback(TransactionContext.ja
va:414)
        at
org.apache.activemq.ra.LocalAndXATransaction.rollback(LocalAndXATrans
action.java:126)
        at
org.apache.geronimo.transaction.manager.TransactionImpl.rollbackResou
rces(TransactionImpl.java:542)
        at
org.apache.geronimo.transaction.manager.TransactionImpl.rollback(Tran
sactionImpl.java:446)
        at
org.apache.geronimo.transaction.manager.TransactionManagerImpl.rollba
ck(TransactionManagerImpl.java:155)
        at
org.apache.geronimo.transaction.context.InheritableTransactionContext
.isRolledback(InheritableTransactionContext.java:283)
        at
org.apache.geronimo.transaction.context.InheritableTransactionContext
.complete(InheritableTransactionContext.java:171)
        at
org.apache.geronimo.transaction.context.InheritableTransactionContext
.rollback(InheritableTransactionContext.java:152)
        at
org.apache.geronimo.transaction.context.GeronimoTransactionManager.ro
llback(GeronimoTransactionManager.java:108)
        at
org.apache.geronimo.transaction.context.GeronimoTransactionDelegate.r
ollback(GeronimoTransactionDelegate.java:74)
        at org.jencks.XAEndpoint.release(XAEndpoint.java:133)
        at
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointDead.enter
(MessageEndpointProxy.java:140)
        at
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointState.tran
sition(MessageEndpointProxy.java:98)
        at
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.rele
ase(MessageEndpointProxy.java:133)
        at
org.apache.activemq.ra.MessageEndpointProxy.release(MessageEndpointPr
oxy.java:68)
        at
org.apache.activemq.ra.ServerSessionImpl.close(ServerSessionImpl.java
:250)
        at
org.apache.activemq.ra.ServerSessionPoolImpl.removeFromPool(ServerSes
sionPoolImpl.java:180)
        at
org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:1
77)
        at
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.ja
va:291)
        at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown So
urce)
        at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.activemq.ConnectionClosedException: The connection is
alre
ady closed
        at
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnect
ion.java:1104)
        at
org.apache.activemq.TransactionContext.rollback(TransactionContext.ja
va:403)
        ... 20 more
ERROR - GeronimoLog.error(106) | Unable to roll back transaction
java.lang.IllegalStateException: Status is STATUS_NO_TRANSACTION
        at
org.apache.geronimo.transaction.manager.TransactionImpl.rollback(Tran
sactionImpl.java:438)
        at
org.apache.geronimo.transaction.context.InheritableTransactionContext
.rollbackAndThrow(InheritableTransactionContext.java:308)
        at
org.apache.geronimo.transaction.context.InheritableTransactionContext
.complete(InheritableTransactionContext.java:199)
        at
org.apache.geronimo.transaction.context.InheritableTransactionContext
.rollback(InheritableTransactionContext.java:152)
        at
org.apache.geronimo.transaction.context.GeronimoTransactionManager.ro
llback(GeronimoTransactionManager.java:108)
        at
org.apache.geronimo.transaction.context.GeronimoTransactionDelegate.r
ollback(GeronimoTransactionDelegate.java:74)
        at org.jencks.XAEndpoint.release(XAEndpoint.java:133)
        at
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointDead.enter
(MessageEndpointProxy.java:140)
        at
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointState.tran
sition(MessageEndpointProxy.java:98)
        at
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.rele
ase(MessageEndpointProxy.java:133)
        at
org.apache.activemq.ra.MessageEndpointProxy.release(MessageEndpointPr
oxy.java:68)
        at
org.apache.activemq.ra.ServerSessionImpl.close(ServerSessionImpl.java
:250)
        at
org.apache.activemq.ra.ServerSessionPoolImpl.removeFromPool(ServerSes
sionPoolImpl.java:180)
        at
org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:1
77)
        at
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.ja
va:291)
        at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown So
urce)
        at java.lang.Thread.run(Thread.java:595)
11:58:11,765 ERROR [AbstractTransactionContext] Unable to roll back
transaction
java.lang.IllegalStateException: Status is STATUS_NO_TRANSACTION
        at
org.apache.geronimo.transaction.manager.TransactionImpl.rollback(Tran
sactionImpl.java:438)
        at
org.apache.geronimo.transaction.context.InheritableTransactionContext
.rollbackAndThrow(InheritableTransactionContext.java:308)
        at
org.apache.geronimo.transaction.context.InheritableTransactionContext
.complete(InheritableTransactionContext.java:199)
        at
org.apache.geronimo.transaction.context.InheritableTransactionContext
.rollback(InheritableTransactionContext.java:152)
        at
org.apache.geronimo.transaction.context.GeronimoTransactionManager.ro
llback(GeronimoTransactionManager.java:108)
        at
org.apache.geronimo.transaction.context.GeronimoTransactionDelegate.r
ollback(GeronimoTransactionDelegate.java:74)
        at org.jencks.XAEndpoint.release(XAEndpoint.java:133)
        at
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointDead.enter
(MessageEndpointProxy.java:140)
        at
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointState.tran
sition(MessageEndpointProxy.java:98)
        at
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.rele
ase(MessageEndpointProxy.java:133)
        at
org.apache.activemq.ra.MessageEndpointProxy.release(MessageEndpointPr
oxy.java:68)
        at
org.apache.activemq.ra.ServerSessionImpl.close(ServerSessionImpl.java
:250)
        at
org.apache.activemq.ra.ServerSessionPoolImpl.removeFromPool(ServerSes
sionPoolImpl.java:180)
        at
org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:1
77)
        at
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.ja
va:291)
        at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown So
urce)
        at java.lang.Thread.run(Thread.java:595)

And my servicemix.xml code :

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:sm="http://servicemix.apache.org/config/1.0"
       xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0"
       xmlns:http="http://servicemix.apache.org/http/1.0"
       xmlns:my="http://servicemix.apache.org/demo/"
       xmlns:demo="http://servicemix.apache.org/demo/">
    
  <!-- the JBI container -->
  <sm:container id="jbi"
  		useMBeanServer="true"
  		createMBeanServer="true"
  		dumpStats="true"
        rmiPort="2222"
  		statsInterval="10"
  		transactionManager="#transactionManager">
  		
  	<sm:activationSpecs>
  	
  	    <!-- Subscribe to a JMS destination -->
  		<sm:activationSpec componentName="inputReceiver" 	
  						   service="my:inputReceiver"
  						   destinationService="my:savedata">
  		  <sm:component>
  		    <bean
class="org.apache.servicemix.components.jms.JmsInUsingJCABinding">
        <property name="jcaContainer" ref="jencks"/>
        <property name="activationSpec">
          <bean class="org.apache.activemq.ra.ActiveMQActivationSpec">
            <property name="destination"
value="com.rhg.servicemix.messaging.errorLogging"/>
            <property name="destinationType" value="javax.jms.Topic"/>
          </bean>
        </property>
  		    </bean>
  		  </sm:component>
  		</sm:activationSpec>
  		
        
       
       
      <sm:activationSpec id="savedata"
				service="my:savedata">
		<sm:component>
			<bean xmlns="http://xbean.org/schemas/spring/1.0"
				class="com.rhg.infrastructure.jms.MessageReceiverImpl" />
		</sm:component>
	</sm:activationSpec>

       		
  	</sm:activationSpecs>
  </sm:container>


  <!-- the JCA container -->
  <bean id="jencks" class="org.jencks.JCAContainer" singleton="true">

    <!-- lets use the default configuration of work manager and transaction
manager-->
    <property name="bootstrapContext">
      <bean class="org.jencks.factory.BootstrapContextFactoryBean">
        <property name="threadPoolSize" value="25"/>
      </bean>
    </property>

    <!-- the JCA Resource Adapter -->
    <property name="resourceAdapter">
      <bean id="activeMQResourceAdapter"
class="org.apache.activemq.ra.ActiveMQResourceAdapter" singleton="true">
        <property name="serverUrl" value="tcp://localhost:61616"/>
      </bean>
    </property>
  </bean>

  <!-- message broker -->
  <bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">
     <property name="config" value="classpath:activemq.xml"/>
   </bean>

	<bean id="transactionContextManager"
class="org.jencks.factory.TransactionContextManagerFactoryBean"/>
	<bean id="transactionManager"
class="org.jencks.factory.GeronimoTransactionManagerFactoryBean" />

  <bean id="jmsFactory"
class="org.apache.activemq.pool.PooledConnectionFactory">
    <property name="connectionFactory">
      <bean class="org.apache.activemq.ActiveMQConnectionFactory">
        <property name="brokerURL">
          <value>tcp://localhost:61616</value>
        </property>
      </bean>
    </property>
  </bean>

</beans>

And my MessageReceiverImpl code :

public class MessageReceiverImpl extends ComponentSupport implements
MessageExchangeListener,MessageReceiver{ 
        
        // log 
    private Log log =LogFactory.getLog(MessageReceiverImpl.class); 

        // sourcetransformer to transform message from exchange 
    private SourceTransformer sourceTransformer = new SourceTransformer(); 

    public Log getLog() { 
        return log; 
    } 

    public void setLog(Log log) { 
        this.log = log; 
    } 

    public SourceTransformer getSourceTransformer() { 
        return sourceTransformer; 
    } 
    
    public void init(ComponentContext context) {
    	
    	log.error("@@@@@@@@@ In init method");
    	
    }

    public void setSourceTransformer(SourceTransformer sourceTransformer) { 
        this.sourceTransformer = sourceTransformer; 
    } 

    /** 
         * This method will get the Asynchronous messages from exchange,
will transform into Java Bean and then 
         * call another class method to store into db. 
         * @return void 
         * @param args MessageExchange exchange to get messages 
         */ 
    
    public void onMessageExchange(MessageExchange exchange) throws
MessagingException { 
            
        // getting the incoming message from exchange 
        NormalizedMessage message = exchange.getMessage("in"); 
        
        if (message == null) { 
            log.warn("Received null message from exchange: " + exchange); 
        } 
        else { 
                    log.info("Exchange: " + exchange + " received IN message
: " + message); 
            try { 
                    // getting the messaging content from message in xml
format 
                    String xml =
sourceTransformer.toString(message.getContent()); 
                    
                    // using the custom utility class to transform xml into
java object 
                Message messageBean =
XMLBeanUtil.getMessageObjectFromXML(xml); 
                
                // saving that java object into database by using the
hibernate 
                MessagesDAOImpl instance = new MessagesDAOImpl(); 
                instance.saveMessage(messageBean); 
                
                
            } 
            catch (TransformerException e) { 
                log.error("Failed to turn message body into text: "+ e, e);
            } 
            catch(Exception e) { 
                    log.error("Failed to turn message body intotext: " + e,
e); 
            } 
        } 
        // done with exchange 
        done(exchange); 
    } 
} 


Any idea ?
--
View this message in context: http://www.nabble.com/error-in-endpoint-generation-t1630736.html#a4433550
Sent from the ServiceMix - User forum at Nabble.com.


Re: error in endpoint generation

Posted by Guillaume Nodet <gn...@gmail.com>.
Could you post the full java file from beginning to end ?
I suspect you compile your component with servicemix 2.x ...

Guillaume

On 5/17/06, mqaiserm <Qa...@revolution.com> wrote:
>
>
> My log for outage.log :
>
> WARN - GeronimoLog.warn(90) | brokerName not set
> DEBUG - GeronimoLog.debug(66) | Registering system service:
> org.apache.servicemix:ContainerName=ServiceMix
> ,Type=SystemService,Name=ManagementContext
> DEBUG - GeronimoLog.debug(66) | Registering system service:
> org.apache.servicemix:ContainerName=ServiceMix
> ,Type=SystemService,Name=EnvironmentContext
> DEBUG - GeronimoLog.debug(66) | Registering system service:
> org.apache.servicemix:ContainerName=ServiceMix
> ,Type=SystemService,Name=Registry
> DEBUG - GeronimoLog.debug(66) | Registering system service:
> org.apache.servicemix:ContainerName=ServiceMix
> ,Type=SystemService,Name=Broker
> INFO - GeronimoLog.info(78) | Activating component for:
> [container=ServiceMix,name=#SubscriptionManager#] with service: null
> component: org.apache.servicemix.jbi.nmr.SubscriptionManager@ad339b
> INFO - GeronimoLog.info(78) | Initializing component:
> #SubscriptionManager#
> DEBUG - GeronimoLog.debug(66) | Registering system service:
> org.apache.servicemix:ContainerName=ServiceMix
> ,Type=SystemService,Name=InstallationService
> DEBUG - GeronimoLog.debug(66) | Registering system service:
> org.apache.servicemix:ContainerName=ServiceMix
> ,Type=SystemService,Name=DeploymentService
> INFO - GeronimoLog.info(78) | Restoring service assemblies
> DEBUG - GeronimoLog.debug(66) | Registering system service:
> org.apache.servicemix:ContainerName=ServiceMix
> ,Type=SystemService,Name=AutoDeploymentService
> DEBUG - GeronimoLog.debug(66) | State file doesn't exist:
> C:\servicemix\revolution\rootDir\install.xml
> DEBUG - GeronimoLog.debug(66) | State file doesn't exist:
> C:\servicemix\revolution\rootDir\deploy.xml
> DEBUG - GeronimoLog.debug(66) | Registering system service:
> org.apache.servicemix:ContainerName=ServiceMix
> ,Type=SystemService,Name=AdminCommandsService
> INFO - GeronimoLog.info(78) | ServiceMix JBI Container
> (http://servicemix.org/) name: ServiceMix running version: 3.0-M1
> INFO - GeronimoLog.info(78) | Activating component for:
> [container=ServiceMix,name=inputReceiver] with service:
> {http://servicemix.apache.org/demo/}inputReceiver component:
> org.apache.servicemix.components.jms.JmsInUsingJCABinding@a45435
> INFO - GeronimoLog.info(78) | Initializing component: inputReceiver
> DEBUG - GeronimoLog.debug(66) | Component: inputReceiver activated
> endpoint:
> {http://servicemix.apache.org/demo/}inputReceiver : inputReceiver
> DEBUG - GeronimoLog.debug(66) | Endpoint
> ServiceEndpoint[service={
> http://servicemix.apache.org/demo/}inputReceiver,endpoint=inputReceiver]
> has no service description
> INFO - GeronimoLog.info(78) | Activating component for:
> [container=ServiceMix,name=savedata] with service:
> {http://servicemix.apache.org/demo/}savedata component:
> com.rhg.infrastructure.jms.MessageReceiverImpl@12cb585
> INFO - GeronimoLog.info(78) | Initializing component: savedata
> ERROR - GeronimoLog.error(102) | @@@@@@@@@ Enter init method
> ERROR - GeronimoLog.error(102) | @@@@@@@@@ Activating endpoint: null /
> null
> DEBUG - GeronimoLog.debug(66) | Component: savedata activated endpoint:
> http:// :
> DEBUG - GeronimoLog.debug(66) | Endpoint
> ServiceEndpoint[service=http://,endpoint=] has no service description
> DEBUG - GeronimoLog.debug(66) | Component: savedata activated endpoint:
> {http://localhost/savedata/}savedata : savedata
> DEBUG - GeronimoLog.debug(66) | Endpoint
> ServiceEndpoint[service={
> http://localhost/savedata/}savedata,endpoint=savedata]
> has no service description
> ERROR - GeronimoLog.error(102) | @@@@@@@@@ Endpoint activated
> ERROR - GeronimoLog.error(102) | @@@@@@@@@ Leave init method
> DEBUG - GeronimoLog.debug(66) | Monitoring directory
> C:\servicemix\revolution\rootDir\install for new or modified archives
> DEBUG - GeronimoLog.debug(66) | Monitoring directory
> C:\servicemix\revolution\rootDir\deploy for new or modified archives
> DEBUG - GeronimoLog.debug(66) | Monitoring directory
> C:\servicemix\revolution\rootDir\install for new or modified archives
> DEBUG - GeronimoLog.debug(66) | Monitoring directory
> C:\servicemix\revolution\rootDir\deploy for new or modified archives
> DEBUG - GeronimoLog.debug(66) | Monitoring directory
> C:\servicemix\revolution\rootDir\install for new or modified archives
> DEBUG - GeronimoLog.debug(66) | Monitoring directory
> C:\servicemix\revolution\rootDir\deploy for new or modified archives
> DEBUG - GeronimoLog.debug(66) | Monitoring directory
> C:\servicemix\revolution\rootDir\install for new or modified archives
> DEBUG - GeronimoLog.debug(66) | Monitoring directory
> C:\servicemix\revolution\rootDir\deploy for new or modified archives
> DEBUG - GeronimoLog.debug(66) | Monitoring directory
> C:\servicemix\revolution\rootDir\install for new or modified archives
> DEBUG - GeronimoLog.debug(66) | Monitoring directory
> C:\servicemix\revolution\rootDir\deploy for new or modified archives
> DEBUG - GeronimoLog.debug(66) | Monitoring directory
> C:\servicemix\revolution\rootDir\install for new or modified archives
> DEBUG - GeronimoLog.debug(66) | Monitoring directory
> C:\servicemix\revolution\rootDir\deploy for new or modified archives
> DEBUG - GeronimoLog.debug(66) | Monitoring directory
> C:\servicemix\revolution\rootDir\install for new or modified archives
> DEBUG - GeronimoLog.debug(66) | Monitoring directory
> C:\servicemix\revolution\rootDir\deploy for new or modified archives
> DEBUG - GeronimoLog.trace(54) | Received: ActiveMQTextMessage {commandId =
> 6, responseRequired = true, messageId =
> ID:qmehmood-lap-1769-1147889978468-1:0:1:1:1, originalDestination = null,
> originalTransactionId = null, producerId =
> ID:qmehmood-lap-1769-1147889978468-1:0:1:1, destination =
> topic://com.rhg.servicemix.messaging.errorLogging, transactionId = null,
> expiration = 0, timestamp = 1147889978859, arrival = 0, correlationId =
> null, replyTo = null, persistent = true, type = null, priority = 4,
> groupID
> = null, groupSequence = 0, targetConsumerId = null, compressed = false,
> userID = null, content = org.apache.activeio.packet.ByteSequence@14a97b,
> marshalledProperties = null, dataStructure = null, redeliveryCounter = 0,
> size = 0, properties = null, readOnlyProperties = true, readOnlyBody =
> true,
> text = null}
> WARN - GeronimoLog.warn(90) | ServiceName
> ({http://servicemix.apache.org/demo/}savedata) specified for routing, but
> can't find it registered
> ERROR - GeronimoLog.error(106) | error dispatching message:
> org.apache.servicemix.jbi.RuntimeJBIException:
> javax.jbi.messaging.MessagingException: Failed to resolve endpoint:
> org.apache.servicemix.jbi.NoServiceAvailableException: Cannot find an
> instance of the service: {http://servicemix.apache.org/demo/}savedata
>         at
> org.apache.servicemix.components.jms.JmsInBinding.onMessage(
> JmsInBinding.java:74)
>         at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage
> (MessageEndpointProxy.java:120)
>         at
> org.apache.activemq.ra.MessageEndpointProxy.onMessage(
> MessageEndpointProxy.java:60)
>         at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java
> :664)
>         at org.apache.activemq.ra.ServerSessionImpl.run(
> ServerSessionImpl.java:163)
>         at
> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java
> :291)
>         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run
> (Unknown
> Source)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: javax.jbi.messaging.MessagingException: Failed to resolve
> endpoint: org.apache.servicemix.jbi.NoServiceAvailableException: Cannot
> find
> an instance of the service: {http://servicemix.apache.org/demo/}savedata
>         at org.apache.servicemix.jbi.nmr.Broker.resolveAddress(Broker.java
> :378)
>         at org.apache.servicemix.jbi.nmr.Broker.sendExchangePacket(
> Broker.java:284)
>         at
> org.apache.servicemix.jbi.container.JBIContainer.sendExchange(
> JBIContainer.java:683)
>         at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(
> DeliveryChannelImpl.java:450)
>         at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(
> DeliveryChannelImpl.java:490)
>         at
> org.apache.servicemix.components.jms.JmsInBinding.onMessage(
> JmsInBinding.java:66)
>         ... 8 more
> Caused by: org.apache.servicemix.jbi.NoServiceAvailableException: Cannot
> find an instance of the service:
> {http://servicemix.apache.org/demo/}savedata
>         at
>
> org.apache.servicemix.jbi.resolver.ServiceNameEndpointResolver.createServiceUnavailableException
> (ServiceNameEndpointResolver.java:60)
>         at
> org.apache.servicemix.jbi.resolver.EndpointResolverSupport.resolveEndpoint
> (EndpointResolverSupport.java:39)
>         at org.apache.servicemix.jbi.nmr.Broker.resolveAddress(Broker.java
> :375)
>         ... 13 more
> ERROR - GeronimoLog.error(106) | Unexpected exception rolling back
> org.apache.activemq.ra.LocalAndXATransaction@19cd5f5; continuing with
> rollback
> javax.transaction.xa.XAException: The connection is already closed
>         at
> org.apache.activemq.TransactionContext.toXAException(
> TransactionContext.java:589)
>         at
> org.apache.activemq.TransactionContext.rollback(TransactionContext.java
> :414)
>         at
> org.apache.activemq.ra.LocalAndXATransaction.rollback(
> LocalAndXATransaction.java:126)
>         at
> org.apache.geronimo.transaction.manager.TransactionImpl.rollbackResources(
> TransactionImpl.java:542)
>         at
> org.apache.geronimo.transaction.manager.TransactionImpl.rollback(
> TransactionImpl.java:446)
>         at
> org.apache.geronimo.transaction.manager.TransactionManagerImpl.rollback(
> TransactionManagerImpl.java:155)
>         at
>
> org.apache.geronimo.transaction.context.InheritableTransactionContext.isRolledback
> (InheritableTransactionContext.java:283)
>         at
>
> org.apache.geronimo.transaction.context.InheritableTransactionContext.complete
> (InheritableTransactionContext.java:171)
>         at
>
> org.apache.geronimo.transaction.context.InheritableTransactionContext.rollback
> (InheritableTransactionContext.java:152)
>         at
>
> org.apache.geronimo.transaction.context.GeronimoTransactionManager.rollback
> (GeronimoTransactionManager.java:108)
>         at
>
> org.apache.geronimo.transaction.context.GeronimoTransactionDelegate.rollback
> (GeronimoTransactionDelegate.java:74)
>         at org.jencks.XAEndpoint.release(XAEndpoint.java:133)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointDead.enter(
> MessageEndpointProxy.java:140)
>         at
>
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointState.transition
> (MessageEndpointProxy.java:98)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.release(
> MessageEndpointProxy.java:133)
>         at
> org.apache.activemq.ra.MessageEndpointProxy.release(
> MessageEndpointProxy.java:68)
>         at
> org.apache.activemq.ra.ServerSessionImpl.close(ServerSessionImpl.java:250)
>         at
> org.apache.activemq.ra.ServerSessionPoolImpl.removeFromPool(
> ServerSessionPoolImpl.java:180)
>         at org.apache.activemq.ra.ServerSessionImpl.run(
> ServerSessionImpl.java:177)
>         at
> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java
> :291)
>         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run
> (Unknown
> Source)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: org.apache.activemq.ConnectionClosedException: The connection
> is
> already closed
>         at
> org.apache.activemq.ActiveMQConnection.syncSendPacket(
> ActiveMQConnection.java:1104)
>         at
> org.apache.activemq.TransactionContext.rollback(TransactionContext.java
> :403)
>         ... 20 more
> ERROR - GeronimoLog.error(106) | Unable to roll back transaction
> java.lang.IllegalStateException: Status is STATUS_NO_TRANSACTION
>         at
> org.apache.geronimo.transaction.manager.TransactionImpl.rollback(
> TransactionImpl.java:438)
>         at
>
> org.apache.geronimo.transaction.context.InheritableTransactionContext.rollbackAndThrow
> (InheritableTransactionContext.java:308)
>         at
>
> org.apache.geronimo.transaction.context.InheritableTransactionContext.complete
> (InheritableTransactionContext.java:199)
>         at
>
> org.apache.geronimo.transaction.context.InheritableTransactionContext.rollback
> (InheritableTransactionContext.java:152)
>         at
>
> org.apache.geronimo.transaction.context.GeronimoTransactionManager.rollback
> (GeronimoTransactionManager.java:108)
>         at
>
> org.apache.geronimo.transaction.context.GeronimoTransactionDelegate.rollback
> (GeronimoTransactionDelegate.java:74)
>         at org.jencks.XAEndpoint.release(XAEndpoint.java:133)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointDead.enter(
> MessageEndpointProxy.java:140)
>         at
>
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointState.transition
> (MessageEndpointProxy.java:98)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.release(
> MessageEndpointProxy.java:133)
>         at
> org.apache.activemq.ra.MessageEndpointProxy.release(
> MessageEndpointProxy.java:68)
>         at
> org.apache.activemq.ra.ServerSessionImpl.close(ServerSessionImpl.java:250)
>         at
> org.apache.activemq.ra.ServerSessionPoolImpl.removeFromPool(
> ServerSessionPoolImpl.java:180)
>         at org.apache.activemq.ra.ServerSessionImpl.run(
> ServerSessionImpl.java:177)
>         at
> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java
> :291)
>         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run
> (Unknown
> Source)
>         at java.lang.Thread.run(Thread.java:595)
> DEBUG - GeronimoLog.debug(66) | Monitoring directory
> C:\servicemix\revolution\rootDir\install for new or modified archives
> DEBUG - GeronimoLog.debug(66) | Monitoring directory
> C:\servicemix\revolution\rootDir\deploy for new or modified archives
> DEBUG - GeronimoLog.debug(66) | Monitoring directory
> C:\servicemix\revolution\rootDir\install for new or modified archives
> DEBUG - GeronimoLog.debug(66) | Monitoring directory
> C:\servicemix\revolution\rootDir\deploy for new or modified archives
> DEBUG - GeronimoLog.debug(66) | Monitoring directory
> C:\servicemix\revolution\rootDir\install for new or modified archives
> DEBUG - GeronimoLog.debug(66) | Monitoring directory
> C:\servicemix\revolution\rootDir\deploy for new or modified archives
> DEBUG - GeronimoLog.debug(66) | Monitoring directory
> C:\servicemix\revolution\rootDir\install for new or modified archives
> DEBUG - GeronimoLog.debug(66) | Monitoring directory
> C:\servicemix\revolution\rootDir\deploy for new or modified archives
> DEBUG - GeronimoLog.debug(66) | Monitoring directory
> C:\servicemix\revolution\rootDir\install for new or modified archives
> DEBUG - GeronimoLog.debug(66) | Monitoring directory
> C:\servicemix\revolution\rootDir\deploy for new or modified archives
> DEBUG - GeronimoLog.debug(66) | Monitoring directory
> C:\servicemix\revolution\rootDir\install for new or modified archives
> DEBUG - GeronimoLog.debug(66) | Monitoring directory
> C:\servicemix\revolution\rootDir\deploy for new or modified archives
> DEBUG - GeronimoLog.debug(66) | Monitoring directory
> C:\servicemix\revolution\rootDir\install for new or modified archives
>
> And my servicemix.xml :
>
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns:sm="http://servicemix.apache.org/config/1.0"
>        xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0"
>        xmlns:http="http://servicemix.apache.org/http/1.0"
>        xmlns:my="http://servicemix.apache.org/demo/"
>        xmlns:demo="http://servicemix.apache.org/demo/">
>
>   <!-- the JBI container -->
>   <sm:container id="jbi"
>                 useMBeanServer="true"
>                 createMBeanServer="true"
>                 dumpStats="true"
>         rmiPort="2222"
>                 statsInterval="10"
>                 transactionManager="#transactionManager">
>
>         <sm:activationSpecs>
>
>             <!-- Subscribe to a JMS destination -->
>                 <sm:activationSpec componentName="inputReceiver"
>
> service="my:inputReceiver"
>
> destinationService="my:savedata">
>                   <sm:component>
>                     <bean
> class="org.apache.servicemix.components.jms.JmsInUsingJCABinding">
>         <property name="jcaContainer" ref="jencks"/>
>         <property name="activationSpec">
>           <bean class="org.apache.activemq.ra.ActiveMQActivationSpec">
>             <property name="destination"
> value="com.rhg.servicemix.messaging.errorLogging"/>
>             <property name="destinationType" value="javax.jms.Topic"/>
>           </bean>
>         </property>
>                     </bean>
>                   </sm:component>
>                 </sm:activationSpec>
>
>
>
>
>       <sm:activationSpec id="savedata"
>                                 service="my:savedata">
>                 <sm:component>
>                         <bean xmlns="http://xbean.org/schemas/spring/1.0"
>                                 class="
> com.rhg.infrastructure.jms.MessageReceiverImpl" />
>                 </sm:component>
>         </sm:activationSpec>
>
>
>         </sm:activationSpecs>
>   </sm:container>
>
>
>   <!-- the JCA container -->
>   <bean id="jencks" class="org.jencks.JCAContainer" singleton="true">
>
>     <!-- lets use the default configuration of work manager and
> transaction
> manager-->
>     <property name="bootstrapContext">
>       <bean class="org.jencks.factory.BootstrapContextFactoryBean">
>         <property name="threadPoolSize" value="25"/>
>       </bean>
>     </property>
>
>     <!-- the JCA Resource Adapter -->
>     <property name="resourceAdapter">
>       <bean id="activeMQResourceAdapter"
> class="org.apache.activemq.ra.ActiveMQResourceAdapter" singleton="true">
>         <property name="serverUrl" value="tcp://localhost:61616"/>
>       </bean>
>     </property>
>   </bean>
>
>   <!-- message broker -->
>   <bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">
>      <property name="config" value="classpath:activemq.xml"/>
>    </bean>
>
>         <bean id="transactionContextManager"
> class="org.jencks.factory.TransactionContextManagerFactoryBean"/>
>         <bean id="transactionManager"
> class="org.jencks.factory.GeronimoTransactionManagerFactoryBean" />
>
>   <bean id="jmsFactory"
> class="org.apache.activemq.pool.PooledConnectionFactory">
>     <property name="connectionFactory">
>       <bean class="org.apache.activemq.ActiveMQConnectionFactory">
>         <property name="brokerURL">
>           <value>tcp://localhost:61616</value>
>         </property>
>       </bean>
>     </property>
>   </bean>
>
> </beans>
>
> And my MessageReceiverImpl code :
>
> public class MessageReceiverImpl extends ComponentSupport implements
> MessageExchangeListener,MessageReceiver{
>
>         // log
>     private Log log =LogFactory.getLog(MessageReceiverImpl.class);
>
>         // sourcetransformer to transform message from exchange
>     private SourceTransformer sourceTransformer = new SourceTransformer();
>
>     public Log getLog() {
>         return log;
>     }
>
>     public void setLog(Log log) {
>         this.log = log;
>     }
>
>     public SourceTransformer getSourceTransformer() {
>         return sourceTransformer;
>     }
>
>     public void init(ComponentContext context) throws JBIException {
>         log.error("@@@@@@@@@ Enter init method");
>         try {
>             super.init(context);
>             log.error("@@@@@@@@@ Activating endpoint: " + getService() + "
> /
> " + getEndpoint());
>             context.activateEndpoint(new QName("http://"),"");
>             context.activateEndpoint(new QName("http://localhost/savedata/
> ",
> "savedata"), "savedata");
>             log.error("@@@@@@@@@ Endpoint activated");
>         } catch(Exception e) {
>             log.error("@@@@@@@ error is " +e.toString(), e);
>             throw new JBIException(e);
>         }
>         log.error("@@@@@@@@@ Leave init method");
>      }
>
>     public void setSourceTransformer(SourceTransformer sourceTransformer)
> {
>         this.sourceTransformer = sourceTransformer;
>     }
>
>     /**
>          * This method will get the Asynchronous messages from exchange,
> will transform into Java Bean and then
>          * call another class method to store into db.
>          * @return void
>          * @param args MessageExchange exchange to get messages
>          */
>
>     public void onMessageExchange(MessageExchange exchange) throws
> MessagingException {
>
>         // getting the incoming message from exchange
>         NormalizedMessage message = exchange.getMessage("in");
>
>         if (message == null) {
>             log.warn("Received null message from exchange: " + exchange);
>         }
>         else {
>                     log.info("Exchange: " + exchange + " received IN
> message
> : " + message);
>             try {
>                     // getting the messaging content from message in xml
> format
>                     String xml =
> sourceTransformer.toString(message.getContent());
>
>                     // using the custom utility class to transform xml
> into
> java object
>                 //Message messageBean =
> XMLBeanUtil.getMessageObjectFromXML(xml);
>
>                 // saving that java object into database by using the
> hibernate
>                 //MessagesDAOImpl instance = new MessagesDAOImpl();
>                 //instance.saveMessage(messageBean);
>                 log.error(xml);
>
>             }
>             catch (TransformerException e) {
>                 log.error("Failed to turn message body into text: "+ e,
> e);
>             }
>             catch(Exception e) {
>                     log.error("Failed to turn message body intotext: " +
> e,
> e);
>             }
>         }
>         // done with exchange
>         done(exchange);
>     }
> }
>
> --
> View this message in context:
> http://www.nabble.com/error-in-endpoint-generation-t1630736.html#a4436201
> Sent from the ServiceMix - User forum at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet

Re: error in endpoint generation

Posted by mqaiserm <Qa...@revolution.com>.
My log for outage.log :

WARN - GeronimoLog.warn(90) | brokerName not set
DEBUG - GeronimoLog.debug(66) | Registering system service:
org.apache.servicemix:ContainerName=ServiceMix,Type=SystemService,Name=ManagementContext
DEBUG - GeronimoLog.debug(66) | Registering system service:
org.apache.servicemix:ContainerName=ServiceMix,Type=SystemService,Name=EnvironmentContext
DEBUG - GeronimoLog.debug(66) | Registering system service:
org.apache.servicemix:ContainerName=ServiceMix,Type=SystemService,Name=Registry
DEBUG - GeronimoLog.debug(66) | Registering system service:
org.apache.servicemix:ContainerName=ServiceMix,Type=SystemService,Name=Broker
INFO - GeronimoLog.info(78) | Activating component for:
[container=ServiceMix,name=#SubscriptionManager#] with service: null
component: org.apache.servicemix.jbi.nmr.SubscriptionManager@ad339b
INFO - GeronimoLog.info(78) | Initializing component: #SubscriptionManager#
DEBUG - GeronimoLog.debug(66) | Registering system service:
org.apache.servicemix:ContainerName=ServiceMix,Type=SystemService,Name=InstallationService
DEBUG - GeronimoLog.debug(66) | Registering system service:
org.apache.servicemix:ContainerName=ServiceMix,Type=SystemService,Name=DeploymentService
INFO - GeronimoLog.info(78) | Restoring service assemblies
DEBUG - GeronimoLog.debug(66) | Registering system service:
org.apache.servicemix:ContainerName=ServiceMix,Type=SystemService,Name=AutoDeploymentService
DEBUG - GeronimoLog.debug(66) | State file doesn't exist:
C:\servicemix\revolution\rootDir\install.xml
DEBUG - GeronimoLog.debug(66) | State file doesn't exist:
C:\servicemix\revolution\rootDir\deploy.xml
DEBUG - GeronimoLog.debug(66) | Registering system service:
org.apache.servicemix:ContainerName=ServiceMix,Type=SystemService,Name=AdminCommandsService
INFO - GeronimoLog.info(78) | ServiceMix JBI Container
(http://servicemix.org/) name: ServiceMix running version: 3.0-M1
INFO - GeronimoLog.info(78) | Activating component for:
[container=ServiceMix,name=inputReceiver] with service:
{http://servicemix.apache.org/demo/}inputReceiver component:
org.apache.servicemix.components.jms.JmsInUsingJCABinding@a45435
INFO - GeronimoLog.info(78) | Initializing component: inputReceiver
DEBUG - GeronimoLog.debug(66) | Component: inputReceiver activated endpoint:
{http://servicemix.apache.org/demo/}inputReceiver : inputReceiver
DEBUG - GeronimoLog.debug(66) | Endpoint
ServiceEndpoint[service={http://servicemix.apache.org/demo/}inputReceiver,endpoint=inputReceiver]
has no service description
INFO - GeronimoLog.info(78) | Activating component for:
[container=ServiceMix,name=savedata] with service:
{http://servicemix.apache.org/demo/}savedata component:
com.rhg.infrastructure.jms.MessageReceiverImpl@12cb585
INFO - GeronimoLog.info(78) | Initializing component: savedata
ERROR - GeronimoLog.error(102) | @@@@@@@@@ Enter init method
ERROR - GeronimoLog.error(102) | @@@@@@@@@ Activating endpoint: null / null
DEBUG - GeronimoLog.debug(66) | Component: savedata activated endpoint:
http:// : 
DEBUG - GeronimoLog.debug(66) | Endpoint
ServiceEndpoint[service=http://,endpoint=] has no service description
DEBUG - GeronimoLog.debug(66) | Component: savedata activated endpoint:
{http://localhost/savedata/}savedata : savedata
DEBUG - GeronimoLog.debug(66) | Endpoint
ServiceEndpoint[service={http://localhost/savedata/}savedata,endpoint=savedata]
has no service description
ERROR - GeronimoLog.error(102) | @@@@@@@@@ Endpoint activated
ERROR - GeronimoLog.error(102) | @@@@@@@@@ Leave init method
DEBUG - GeronimoLog.debug(66) | Monitoring directory
C:\servicemix\revolution\rootDir\install for new or modified archives
DEBUG - GeronimoLog.debug(66) | Monitoring directory
C:\servicemix\revolution\rootDir\deploy for new or modified archives
DEBUG - GeronimoLog.debug(66) | Monitoring directory
C:\servicemix\revolution\rootDir\install for new or modified archives
DEBUG - GeronimoLog.debug(66) | Monitoring directory
C:\servicemix\revolution\rootDir\deploy for new or modified archives
DEBUG - GeronimoLog.debug(66) | Monitoring directory
C:\servicemix\revolution\rootDir\install for new or modified archives
DEBUG - GeronimoLog.debug(66) | Monitoring directory
C:\servicemix\revolution\rootDir\deploy for new or modified archives
DEBUG - GeronimoLog.debug(66) | Monitoring directory
C:\servicemix\revolution\rootDir\install for new or modified archives
DEBUG - GeronimoLog.debug(66) | Monitoring directory
C:\servicemix\revolution\rootDir\deploy for new or modified archives
DEBUG - GeronimoLog.debug(66) | Monitoring directory
C:\servicemix\revolution\rootDir\install for new or modified archives
DEBUG - GeronimoLog.debug(66) | Monitoring directory
C:\servicemix\revolution\rootDir\deploy for new or modified archives
DEBUG - GeronimoLog.debug(66) | Monitoring directory
C:\servicemix\revolution\rootDir\install for new or modified archives
DEBUG - GeronimoLog.debug(66) | Monitoring directory
C:\servicemix\revolution\rootDir\deploy for new or modified archives
DEBUG - GeronimoLog.debug(66) | Monitoring directory
C:\servicemix\revolution\rootDir\install for new or modified archives
DEBUG - GeronimoLog.debug(66) | Monitoring directory
C:\servicemix\revolution\rootDir\deploy for new or modified archives
DEBUG - GeronimoLog.trace(54) | Received: ActiveMQTextMessage {commandId =
6, responseRequired = true, messageId =
ID:qmehmood-lap-1769-1147889978468-1:0:1:1:1, originalDestination = null,
originalTransactionId = null, producerId =
ID:qmehmood-lap-1769-1147889978468-1:0:1:1, destination =
topic://com.rhg.servicemix.messaging.errorLogging, transactionId = null,
expiration = 0, timestamp = 1147889978859, arrival = 0, correlationId =
null, replyTo = null, persistent = true, type = null, priority = 4, groupID
= null, groupSequence = 0, targetConsumerId = null, compressed = false,
userID = null, content = org.apache.activeio.packet.ByteSequence@14a97b,
marshalledProperties = null, dataStructure = null, redeliveryCounter = 0,
size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true,
text = null}
WARN - GeronimoLog.warn(90) | ServiceName
({http://servicemix.apache.org/demo/}savedata) specified for routing, but
can't find it registered
ERROR - GeronimoLog.error(106) | error dispatching message: 
org.apache.servicemix.jbi.RuntimeJBIException:
javax.jbi.messaging.MessagingException: Failed to resolve endpoint:
org.apache.servicemix.jbi.NoServiceAvailableException: Cannot find an
instance of the service: {http://servicemix.apache.org/demo/}savedata
	at
org.apache.servicemix.components.jms.JmsInBinding.onMessage(JmsInBinding.java:74)
	at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
	at
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:120)
	at
org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:60)
	at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:664)
	at org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:163)
	at
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
	at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
Source)
	at java.lang.Thread.run(Thread.java:595)
Caused by: javax.jbi.messaging.MessagingException: Failed to resolve
endpoint: org.apache.servicemix.jbi.NoServiceAvailableException: Cannot find
an instance of the service: {http://servicemix.apache.org/demo/}savedata
	at org.apache.servicemix.jbi.nmr.Broker.resolveAddress(Broker.java:378)
	at org.apache.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java:284)
	at
org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:683)
	at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:450)
	at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:490)
	at
org.apache.servicemix.components.jms.JmsInBinding.onMessage(JmsInBinding.java:66)
	... 8 more
Caused by: org.apache.servicemix.jbi.NoServiceAvailableException: Cannot
find an instance of the service:
{http://servicemix.apache.org/demo/}savedata
	at
org.apache.servicemix.jbi.resolver.ServiceNameEndpointResolver.createServiceUnavailableException(ServiceNameEndpointResolver.java:60)
	at
org.apache.servicemix.jbi.resolver.EndpointResolverSupport.resolveEndpoint(EndpointResolverSupport.java:39)
	at org.apache.servicemix.jbi.nmr.Broker.resolveAddress(Broker.java:375)
	... 13 more
ERROR - GeronimoLog.error(106) | Unexpected exception rolling back
org.apache.activemq.ra.LocalAndXATransaction@19cd5f5; continuing with
rollback
javax.transaction.xa.XAException: The connection is already closed
	at
org.apache.activemq.TransactionContext.toXAException(TransactionContext.java:589)
	at
org.apache.activemq.TransactionContext.rollback(TransactionContext.java:414)
	at
org.apache.activemq.ra.LocalAndXATransaction.rollback(LocalAndXATransaction.java:126)
	at
org.apache.geronimo.transaction.manager.TransactionImpl.rollbackResources(TransactionImpl.java:542)
	at
org.apache.geronimo.transaction.manager.TransactionImpl.rollback(TransactionImpl.java:446)
	at
org.apache.geronimo.transaction.manager.TransactionManagerImpl.rollback(TransactionManagerImpl.java:155)
	at
org.apache.geronimo.transaction.context.InheritableTransactionContext.isRolledback(InheritableTransactionContext.java:283)
	at
org.apache.geronimo.transaction.context.InheritableTransactionContext.complete(InheritableTransactionContext.java:171)
	at
org.apache.geronimo.transaction.context.InheritableTransactionContext.rollback(InheritableTransactionContext.java:152)
	at
org.apache.geronimo.transaction.context.GeronimoTransactionManager.rollback(GeronimoTransactionManager.java:108)
	at
org.apache.geronimo.transaction.context.GeronimoTransactionDelegate.rollback(GeronimoTransactionDelegate.java:74)
	at org.jencks.XAEndpoint.release(XAEndpoint.java:133)
	at
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointDead.enter(MessageEndpointProxy.java:140)
	at
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointState.transition(MessageEndpointProxy.java:98)
	at
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.release(MessageEndpointProxy.java:133)
	at
org.apache.activemq.ra.MessageEndpointProxy.release(MessageEndpointProxy.java:68)
	at
org.apache.activemq.ra.ServerSessionImpl.close(ServerSessionImpl.java:250)
	at
org.apache.activemq.ra.ServerSessionPoolImpl.removeFromPool(ServerSessionPoolImpl.java:180)
	at org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:177)
	at
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
	at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
Source)
	at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.activemq.ConnectionClosedException: The connection is
already closed
	at
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1104)
	at
org.apache.activemq.TransactionContext.rollback(TransactionContext.java:403)
	... 20 more
ERROR - GeronimoLog.error(106) | Unable to roll back transaction
java.lang.IllegalStateException: Status is STATUS_NO_TRANSACTION
	at
org.apache.geronimo.transaction.manager.TransactionImpl.rollback(TransactionImpl.java:438)
	at
org.apache.geronimo.transaction.context.InheritableTransactionContext.rollbackAndThrow(InheritableTransactionContext.java:308)
	at
org.apache.geronimo.transaction.context.InheritableTransactionContext.complete(InheritableTransactionContext.java:199)
	at
org.apache.geronimo.transaction.context.InheritableTransactionContext.rollback(InheritableTransactionContext.java:152)
	at
org.apache.geronimo.transaction.context.GeronimoTransactionManager.rollback(GeronimoTransactionManager.java:108)
	at
org.apache.geronimo.transaction.context.GeronimoTransactionDelegate.rollback(GeronimoTransactionDelegate.java:74)
	at org.jencks.XAEndpoint.release(XAEndpoint.java:133)
	at
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointDead.enter(MessageEndpointProxy.java:140)
	at
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointState.transition(MessageEndpointProxy.java:98)
	at
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.release(MessageEndpointProxy.java:133)
	at
org.apache.activemq.ra.MessageEndpointProxy.release(MessageEndpointProxy.java:68)
	at
org.apache.activemq.ra.ServerSessionImpl.close(ServerSessionImpl.java:250)
	at
org.apache.activemq.ra.ServerSessionPoolImpl.removeFromPool(ServerSessionPoolImpl.java:180)
	at org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:177)
	at
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
	at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
Source)
	at java.lang.Thread.run(Thread.java:595)
DEBUG - GeronimoLog.debug(66) | Monitoring directory
C:\servicemix\revolution\rootDir\install for new or modified archives
DEBUG - GeronimoLog.debug(66) | Monitoring directory
C:\servicemix\revolution\rootDir\deploy for new or modified archives
DEBUG - GeronimoLog.debug(66) | Monitoring directory
C:\servicemix\revolution\rootDir\install for new or modified archives
DEBUG - GeronimoLog.debug(66) | Monitoring directory
C:\servicemix\revolution\rootDir\deploy for new or modified archives
DEBUG - GeronimoLog.debug(66) | Monitoring directory
C:\servicemix\revolution\rootDir\install for new or modified archives
DEBUG - GeronimoLog.debug(66) | Monitoring directory
C:\servicemix\revolution\rootDir\deploy for new or modified archives
DEBUG - GeronimoLog.debug(66) | Monitoring directory
C:\servicemix\revolution\rootDir\install for new or modified archives
DEBUG - GeronimoLog.debug(66) | Monitoring directory
C:\servicemix\revolution\rootDir\deploy for new or modified archives
DEBUG - GeronimoLog.debug(66) | Monitoring directory
C:\servicemix\revolution\rootDir\install for new or modified archives
DEBUG - GeronimoLog.debug(66) | Monitoring directory
C:\servicemix\revolution\rootDir\deploy for new or modified archives
DEBUG - GeronimoLog.debug(66) | Monitoring directory
C:\servicemix\revolution\rootDir\install for new or modified archives
DEBUG - GeronimoLog.debug(66) | Monitoring directory
C:\servicemix\revolution\rootDir\deploy for new or modified archives
DEBUG - GeronimoLog.debug(66) | Monitoring directory
C:\servicemix\revolution\rootDir\install for new or modified archives

And my servicemix.xml :

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:sm="http://servicemix.apache.org/config/1.0"
       xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0"
       xmlns:http="http://servicemix.apache.org/http/1.0"
       xmlns:my="http://servicemix.apache.org/demo/"
       xmlns:demo="http://servicemix.apache.org/demo/">
    
  <!-- the JBI container -->
  <sm:container id="jbi"
  		useMBeanServer="true"
  		createMBeanServer="true"
  		dumpStats="true"
        rmiPort="2222"
  		statsInterval="10"
  		transactionManager="#transactionManager">
  		
  	<sm:activationSpecs>
  	
  	    <!-- Subscribe to a JMS destination -->
  		<sm:activationSpec componentName="inputReceiver" 	
  						   service="my:inputReceiver"
  						   destinationService="my:savedata">
  		  <sm:component>
  		    <bean
class="org.apache.servicemix.components.jms.JmsInUsingJCABinding">
        <property name="jcaContainer" ref="jencks"/>
        <property name="activationSpec">
          <bean class="org.apache.activemq.ra.ActiveMQActivationSpec">
            <property name="destination"
value="com.rhg.servicemix.messaging.errorLogging"/>
            <property name="destinationType" value="javax.jms.Topic"/>
          </bean>
        </property>
  		    </bean>
  		  </sm:component>
  		</sm:activationSpec>
  		
        
       
       
      <sm:activationSpec id="savedata"
				service="my:savedata">
		<sm:component>
			<bean xmlns="http://xbean.org/schemas/spring/1.0"
				class="com.rhg.infrastructure.jms.MessageReceiverImpl" />
		</sm:component>
	</sm:activationSpec>

       		
  	</sm:activationSpecs>
  </sm:container>


  <!-- the JCA container -->
  <bean id="jencks" class="org.jencks.JCAContainer" singleton="true">

    <!-- lets use the default configuration of work manager and transaction
manager-->
    <property name="bootstrapContext">
      <bean class="org.jencks.factory.BootstrapContextFactoryBean">
        <property name="threadPoolSize" value="25"/>
      </bean>
    </property>

    <!-- the JCA Resource Adapter -->
    <property name="resourceAdapter">
      <bean id="activeMQResourceAdapter"
class="org.apache.activemq.ra.ActiveMQResourceAdapter" singleton="true">
        <property name="serverUrl" value="tcp://localhost:61616"/>
      </bean>
    </property>
  </bean>

  <!-- message broker -->
  <bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">
     <property name="config" value="classpath:activemq.xml"/>
   </bean>

	<bean id="transactionContextManager"
class="org.jencks.factory.TransactionContextManagerFactoryBean"/>
	<bean id="transactionManager"
class="org.jencks.factory.GeronimoTransactionManagerFactoryBean" />

  <bean id="jmsFactory"
class="org.apache.activemq.pool.PooledConnectionFactory">
    <property name="connectionFactory">
      <bean class="org.apache.activemq.ActiveMQConnectionFactory">
        <property name="brokerURL">
          <value>tcp://localhost:61616</value>
        </property>
      </bean>
    </property>
  </bean>

</beans>

And my MessageReceiverImpl code :

public class MessageReceiverImpl extends ComponentSupport implements
MessageExchangeListener,MessageReceiver{ 
        
        // log 
    private Log log =LogFactory.getLog(MessageReceiverImpl.class); 

        // sourcetransformer to transform message from exchange 
    private SourceTransformer sourceTransformer = new SourceTransformer(); 

    public Log getLog() { 
        return log; 
    } 

    public void setLog(Log log) { 
        this.log = log; 
    } 

    public SourceTransformer getSourceTransformer() { 
        return sourceTransformer; 
    } 
    
    public void init(ComponentContext context) throws JBIException {
        log.error("@@@@@@@@@ Enter init method");
        try {
            super.init(context);
            log.error("@@@@@@@@@ Activating endpoint: " + getService() + " /
" + getEndpoint());
            context.activateEndpoint(new QName("http://"),"");
            context.activateEndpoint(new QName("http://localhost/savedata/",
"savedata"), "savedata");
            log.error("@@@@@@@@@ Endpoint activated");
        } catch(Exception e) {
            log.error("@@@@@@@ error is " +e.toString(), e);
            throw new JBIException(e);
        }
        log.error("@@@@@@@@@ Leave init method"); 
     }

    public void setSourceTransformer(SourceTransformer sourceTransformer) { 
        this.sourceTransformer = sourceTransformer; 
    } 

    /** 
         * This method will get the Asynchronous messages from exchange,
will transform into Java Bean and then 
         * call another class method to store into db. 
         * @return void 
         * @param args MessageExchange exchange to get messages 
         */ 
    
    public void onMessageExchange(MessageExchange exchange) throws
MessagingException { 
            
        // getting the incoming message from exchange 
        NormalizedMessage message = exchange.getMessage("in"); 
        
        if (message == null) { 
            log.warn("Received null message from exchange: " + exchange); 
        } 
        else { 
                    log.info("Exchange: " + exchange + " received IN message
: " + message); 
            try { 
                    // getting the messaging content from message in xml
format 
                    String xml =
sourceTransformer.toString(message.getContent()); 
                    
                    // using the custom utility class to transform xml into
java object 
                //Message messageBean =
XMLBeanUtil.getMessageObjectFromXML(xml); 
                
                // saving that java object into database by using the
hibernate 
                //MessagesDAOImpl instance = new MessagesDAOImpl(); 
                //instance.saveMessage(messageBean); 
                log.error(xml);
                
            } 
            catch (TransformerException e) { 
                log.error("Failed to turn message body into text: "+ e, e);
            } 
            catch(Exception e) { 
                    log.error("Failed to turn message body intotext: " + e,
e); 
            } 
        } 
        // done with exchange 
        done(exchange); 
    } 
} 

--
View this message in context: http://www.nabble.com/error-in-endpoint-generation-t1630736.html#a4436201
Sent from the ServiceMix - User forum at Nabble.com.


Re: error in endpoint generation

Posted by Guillaume Nodet <gn...@gmail.com>.
Send me a mail with the following attachments:
  * full log to DEBUG level
  * full code for your component
  * full servicemix.xml configuration

Guillaume

On 5/17/06, mqaiserm <Qa...@revolution.com> wrote:
>
> I tried debugging it and override method init , when I started servicemix ,
> its calling that init method and after that when I calling and sending
> message , its again calling that init method , but again same error :
>
> ERROR - GeronimoLog.error(106) | error dispatching message:
> org.apache.servicemix.jbi.RuntimeJBIException:
> javax.jbi.messaging.MessagingExce
> ption: Failed to resolve endpoint:
> org.apache.servicemix.jbi.NoServiceAvailableE
> xception: Cannot find an instance of the service:
> {http://servicemix.apache.org/
> demo/}savedata
> --
> View this message in context: http://www.nabble.com/error-in-endpoint-generation-t1630736.html#a4432209
> Sent from the ServiceMix - User forum at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet

Re: error in endpoint generation

Posted by mqaiserm <Qa...@revolution.com>.
I tried debugging it and override method init , when I started servicemix ,
its calling that init method and after that when I calling and sending
message , its again calling that init method , but again same error :

ERROR - GeronimoLog.error(106) | error dispatching message:
org.apache.servicemix.jbi.RuntimeJBIException:
javax.jbi.messaging.MessagingExce
ption: Failed to resolve endpoint:
org.apache.servicemix.jbi.NoServiceAvailableE
xception: Cannot find an instance of the service:
{http://servicemix.apache.org/
demo/}savedata
--
View this message in context: http://www.nabble.com/error-in-endpoint-generation-t1630736.html#a4432209
Sent from the ServiceMix - User forum at Nabble.com.


Re: error in endpoint generation

Posted by mqaiserm <Qa...@revolution.com>.
I tried debugging it and override method init , when I started servicemix ,
its calling that init method and after that when I calling and sending
message , its again calling that init method , but again same error : 

ERROR - GeronimoLog.error(106) | error dispatching message: 
org.apache.servicemix.jbi.RuntimeJBIException:
javax.jbi.messaging.MessagingExce 
ption: Failed to resolve endpoint:
org.apache.servicemix.jbi.NoServiceAvailableE 
xception: Cannot find an instance of the service:
{http://servicemix.apache.org/ 
demo/}savedata

--
View this message in context: http://www.nabble.com/error-in-endpoint-generation-t1630736.html#a4432586
Sent from the ServiceMix - User forum at Nabble.com.


Re: error in endpoint generation

Posted by Guillaume Nodet <gn...@gmail.com>.
The code seems fine.
If the endpoint is not activated, there is a problem but i have no idea why.
You should try to increase the log level to DEBUG and verify if this
is really the case.
Also, put some traces in your component, override the
init(ComponentContext) method, check that it is called and that the
endpoint has been activated.  Try to debug ;)

Cheers,
Guillaume Nodet

On 5/17/06, mqaiserm <Qa...@revolution.com> wrote:
>
> My MessageReceiver code :
>
> public class MessageReceiverImpl extends ComponentSupport implements
> MessageExchangeListener,MessageReceiver{
>
>                 // log
>                 private Log log =
> LogFactory.getLog(MessageReceiverImpl.class);
>
>                 // sourcetransformer to transform message from exchange
>             private SourceTransformer sourceTransformer = new
> SourceTransformer();
>
>             public Log getLog() {
>                 return log;
>             }
>
>             public void setLog(Log log) {
>                 this.log = log;
>             }
>
>             public SourceTransformer getSourceTransformer() {
>                 return sourceTransformer;
>             }
>
>             public void setSourceTransformer(SourceTransformer
> sourceTransformer) {
>                 this.sourceTransformer = sourceTransformer;
>             }
>
>             /**
>                  * This method will get the Asynchronous messages from
> exchange, will transform into Java Bean and then
>                  * call another class method to store into db.
>                  * @return void
>                  * @param args MessageExchange exchange to get messages
>                  */
>
>             public void onMessageExchange(MessageExchange exchange) throws
> MessagingException {
>
>                 // getting the incoming message from exchange
>                 NormalizedMessage message = exchange.getMessage("in");
>
>                 if (message == null) {
>                     log.warn("Received null message from exchange: " +
> exchange);
>                 }
>                 else {
>                             log.info("Exchange: " + exchange + " received IN
> message : " + message);
>                     try {
>                             // getting the messaging content from message in
> xml format
>                             String xml =
> sourceTransformer.toString(message.getContent());
>
>                             // using the custom utility class to transform
> xml into java object
>                         Message messageBean =
> XMLBeanUtil.getMessageObjectFromXML(xml);
>
>                         // saving that java object into database by using
> the hibernate
>                         MessagesDAOImpl instance = new MessagesDAOImpl();
>                         instance.saveMessage(messageBean);
>
>
>                     }
>                     catch (TransformerException e) {
>                         log.error("Failed to turn message body into text: "
> + e, e);
>                     }
>                     catch(Exception e) {
>                             log.error("Failed to turn message body into
> text: " + e, e);
>                     }
>                 }
>                 // done with exchange
>                 done(exchange);
>             }
>         }
>
>
> --
> View this message in context: http://www.nabble.com/error-in-endpoint-generation-t1630736.html#a4431780
> Sent from the ServiceMix - User forum at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet

Re: error in endpoint generation

Posted by mqaiserm <Qa...@revolution.com>.
My MessageReceiver code : 

public class MessageReceiverImpl extends ComponentSupport implements
MessageExchangeListener,MessageReceiver{ 
                
                // log 
                private Log log =
LogFactory.getLog(MessageReceiverImpl.class); 
        
                // sourcetransformer to transform message from exchange 
            private SourceTransformer sourceTransformer = new
SourceTransformer(); 
        
            public Log getLog() { 
                return log; 
            } 
        
            public void setLog(Log log) { 
                this.log = log; 
            } 
        
            public SourceTransformer getSourceTransformer() { 
                return sourceTransformer; 
            } 
        
            public void setSourceTransformer(SourceTransformer
sourceTransformer) { 
                this.sourceTransformer = sourceTransformer; 
            } 
        
            /** 
                 * This method will get the Asynchronous messages from
exchange, will transform into Java Bean and then 
                 * call another class method to store into db. 
                 * @return void 
                 * @param args MessageExchange exchange to get messages 
                 */ 
            
            public void onMessageExchange(MessageExchange exchange) throws
MessagingException { 
                    
                // getting the incoming message from exchange 
                NormalizedMessage message = exchange.getMessage("in"); 
                
                if (message == null) { 
                    log.warn("Received null message from exchange: " +
exchange); 
                } 
                else { 
                            log.info("Exchange: " + exchange + " received IN
message : " + message); 
                    try { 
                            // getting the messaging content from message in
xml format 
                            String xml =
sourceTransformer.toString(message.getContent()); 
                            
                            // using the custom utility class to transform
xml into java object 
                        Message messageBean =
XMLBeanUtil.getMessageObjectFromXML(xml); 
                        
                        // saving that java object into database by using
the hibernate 
                        MessagesDAOImpl instance = new MessagesDAOImpl(); 
                        instance.saveMessage(messageBean); 
                        
                        
                    } 
                    catch (TransformerException e) { 
                        log.error("Failed to turn message body into text: "
+ e, e); 
                    } 
                    catch(Exception e) { 
                            log.error("Failed to turn message body into
text: " + e, e); 
                    } 
                } 
                // done with exchange 
                done(exchange); 
            } 
        } 


--
View this message in context: http://www.nabble.com/error-in-endpoint-generation-t1630736.html#a4431780
Sent from the ServiceMix - User forum at Nabble.com.


Re: error in endpoint generation

Posted by mqaiserm <Qa...@revolution.com>.
My MessageReceiver code :

public class MessageReceiverImpl extends ComponentSupport implements
MessageExchangeListener,MessageReceiver{
		
		// log
		private Log log = LogFactory.getLog(MessageReceiverImpl.class);
	
		// sourcetransformer to transform message from exchange
	    private SourceTransformer sourceTransformer = new SourceTransformer();
	
	    public Log getLog() {
	        return log;
	    }
	
	    public void setLog(Log log) {
	        this.log = log;
	    }
	
	    public SourceTransformer getSourceTransformer() {
	        return sourceTransformer;
	    }
	
	    public void setSourceTransformer(SourceTransformer sourceTransformer) {
	        this.sourceTransformer = sourceTransformer;
	    }
	
	    /**
		 * This method will get the Asynchronous messages from exchange, will
transform into Java Bean and then
		 * call another class method to store into db.
		 * @return void
		 * @param args MessageExchange exchange to get messages
		 */
	    
	    public void onMessageExchange(MessageExchange exchange) throws
MessagingException {
	    	
	        // getting the incoming message from exchange
	        NormalizedMessage message = exchange.getMessage("in");
	        
	        if (message == null) {
	            log.warn("Received null message from exchange: " + exchange);
	        }
	        else {
	            	log.info("Exchange: " + exchange + " received IN message : " +
message);
	            try {
	            	// getting the messaging content from message in xml format
	            	String xml = sourceTransformer.toString(message.getContent()); 
	            	
	            	// using the custom utility class to transform xml into java
object
	                Message messageBean =
XMLBeanUtil.getMessageObjectFromXML(xml);
	                
	                // saving that java object into database by using the
hibernate
	                MessagesDAOImpl instance = new MessagesDAOImpl();
	                instance.saveMessage(messageBean);
	                
	                
	            }
	            catch (TransformerException e) {
	                log.error("Failed to turn message body into text: " + e,
e);
	            }
	            catch(Exception e) {
	            	log.error("Failed to turn message body into text: " + e, e);
	            }
	        }
	        // done with exchange
	        done(exchange);
	    }
	}

--
View this message in context: http://www.nabble.com/error-in-endpoint-generation-t1630736.html#a4419576
Sent from the ServiceMix - User forum at Nabble.com.


Re: error in endpoint generation

Posted by Guillaume Nodet <gn...@gmail.com>.
Your component does not work ;)
If you inherit the ComponentSupport, an endpoint is created if the
service and endpoint are set.  It seems you set the service name, and
the endpoint name is generated if needed.
Maybe you override the init(ComponentContext) method without calling super ?

Cheers,
Guillaume Nodet

On 5/16/06, mqaiserm <Qa...@revolution.com> wrote:
>
> I have changed the sequence and its not working , I also checked the JMX
> console and its not generating the endpoint for savedata.
>
> Any idea ?
> --
> View this message in context: http://www.nabble.com/error-in-endpoint-generation-t1630736.html#a4419418
> Sent from the ServiceMix - User forum at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet

Re: error in endpoint generation

Posted by mqaiserm <Qa...@revolution.com>.
I have changed the sequence and its not working , I also checked the JMX
console and its not generating the endpoint for savedata.

Any idea ?
--
View this message in context: http://www.nabble.com/error-in-endpoint-generation-t1630736.html#a4419418
Sent from the ServiceMix - User forum at Nabble.com.


Re: error in endpoint generation

Posted by Guillaume Nodet <gn...@gmail.com>.
Check that the endpoint has been created (by browsing the log or using
a jmx console).
If it happens when servicemix is starting, this is due to lifecycle
problems with lightweight components.  You can try changing the order
of the components (putting the destination first in the configuration
file).

Cheers,
Guillaume Nodet

On 5/16/06, mqaiserm <Qa...@revolution.com> wrote:
>
> what about this error :
>
> ERROR - GeronimoLog.error(106) | error dispatching message:
> org.apache.servicemix.jbi.RuntimeJBIException:
> javax.jbi.messaging.MessagingExce
> ption: Failed to resolve endpoint:
> org.apache.servicemix.jbi.NoServiceAvailableE
> xception: Cannot find an instance of the service:
> {http://servicemix.apache.org/
> demo/}savedata
>         at
> org.apache.servicemix.components.jms.JmsInBinding.onMessage(JmsInBind
> ing.java:74)
>         at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMe
> ssage(MessageEndpointProxy.java:120)
>         at
> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpoint
> Proxy.java:60)
>         at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:664)
>         at
> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:1
> 63)
>         at
> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.ja
> va:291)
>         at
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown So
> urce)
>         at java.lang.Thread.run(Thread.java:595)
>
> And my servicemix.xml code is :
>
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns:sm="http://servicemix.apache.org/config/1.0"
>        xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0"
>        xmlns:http="http://servicemix.apache.org/http/1.0"
>        xmlns:my="http://servicemix.apache.org/demo/"
>        xmlns:demo="http://servicemix.apache.org/demo/">
>
>   <!-- the JBI container -->
>   <sm:container id="jbi"
>                 useMBeanServer="true"
>                 createMBeanServer="true"
>                 dumpStats="true"
>         rmiPort="2222"
>                 statsInterval="10"
>                 transactionManager="#transactionManager">
>
>         <sm:activationSpecs>
>
>             <!-- Subscribe to a JMS destination -->
>                 <sm:activationSpec componentName="inputReceiver"
>                                                    service="my:inputReceiver"
>                                                    destinationService="demo:savedata">
>                   <sm:component>
>                     <bean
> class="org.apache.servicemix.components.jms.JmsInUsingJCABinding">
>         <property name="jcaContainer" ref="jencks"/>
>         <property name="activationSpec">
>           <bean class="org.apache.activemq.ra.ActiveMQActivationSpec">
>             <property name="destination"
> value="com.rhg.servicemix.messaging.errorLogging"/>
>             <property name="destinationType" value="javax.jms.Topic"/>
>           </bean>
>         </property>
>                     </bean>
>                   </sm:component>
>                 </sm:activationSpec>
>
>
>
>       <sm:activationSpec componentName="savedata"
>                                 service="demo:savedata">
>                 <sm:component>
>                         <bean xmlns="http://xbean.org/schemas/spring/1.0"
>                                 class="com.rhg.infrastructure.jms.MessageReceiverImpl" />
>                 </sm:component>
>         </sm:activationSpec>
>
>
>         </sm:activationSpecs>
>   </sm:container>
>
>
>   <!-- the JCA container -->
>   <bean id="jencks" class="org.jencks.JCAContainer" singleton="true">
>
>     <!-- lets use the default configuration of work manager and transaction
> manager-->
>     <property name="bootstrapContext">
>       <bean class="org.jencks.factory.BootstrapContextFactoryBean">
>         <property name="threadPoolSize" value="25"/>
>       </bean>
>     </property>
>
>     <!-- the JCA Resource Adapter -->
>     <property name="resourceAdapter">
>       <bean id="activeMQResourceAdapter"
> class="org.apache.activemq.ra.ActiveMQResourceAdapter" singleton="true">
>         <property name="serverUrl" value="tcp://localhost:61616"/>
>       </bean>
>     </property>
>   </bean>
>
>   <!-- message broker -->
>   <bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">
>      <property name="config" value="classpath:activemq.xml"/>
>    </bean>
>
>         <bean id="transactionContextManager"
> class="org.jencks.factory.TransactionContextManagerFactoryBean"/>
>         <bean id="transactionManager"
> class="org.jencks.factory.GeronimoTransactionManagerFactoryBean" />
>
>   <bean id="jmsFactory"
> class="org.apache.activemq.pool.PooledConnectionFactory">
>     <property name="connectionFactory">
>       <bean class="org.apache.activemq.ActiveMQConnectionFactory">
>         <property name="brokerURL">
>           <value>tcp://localhost:61616</value>
>         </property>
>       </bean>
>     </property>
>   </bean>
>
> </beans>
>
> Any idea ?
> --
> View this message in context: http://www.nabble.com/error-in-endpoint-generation-t1630736.html#a4419100
> Sent from the ServiceMix - User forum at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet

Re: error in endpoint generation

Posted by mqaiserm <Qa...@revolution.com>.
what about this error :

ERROR - GeronimoLog.error(106) | error dispatching message:
org.apache.servicemix.jbi.RuntimeJBIException:
javax.jbi.messaging.MessagingExce
ption: Failed to resolve endpoint:
org.apache.servicemix.jbi.NoServiceAvailableE
xception: Cannot find an instance of the service:
{http://servicemix.apache.org/
demo/}savedata
        at
org.apache.servicemix.components.jms.JmsInBinding.onMessage(JmsInBind
ing.java:74)
        at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
        at
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMe
ssage(MessageEndpointProxy.java:120)
        at
org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpoint
Proxy.java:60)
        at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:664)
        at
org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:1
63)
        at
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.ja
va:291)
        at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown So
urce)
        at java.lang.Thread.run(Thread.java:595)

And my servicemix.xml code is :

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:sm="http://servicemix.apache.org/config/1.0"
       xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0"
       xmlns:http="http://servicemix.apache.org/http/1.0"
       xmlns:my="http://servicemix.apache.org/demo/"
       xmlns:demo="http://servicemix.apache.org/demo/">
    
  <!-- the JBI container -->
  <sm:container id="jbi"
  		useMBeanServer="true"
  		createMBeanServer="true"
  		dumpStats="true"
        rmiPort="2222"
  		statsInterval="10"
  		transactionManager="#transactionManager">
  		
  	<sm:activationSpecs>
  	
  	    <!-- Subscribe to a JMS destination -->
  		<sm:activationSpec componentName="inputReceiver" 	
  						   service="my:inputReceiver"
  						   destinationService="demo:savedata">
  		  <sm:component>
  		    <bean
class="org.apache.servicemix.components.jms.JmsInUsingJCABinding">
        <property name="jcaContainer" ref="jencks"/>
        <property name="activationSpec">
          <bean class="org.apache.activemq.ra.ActiveMQActivationSpec">
            <property name="destination"
value="com.rhg.servicemix.messaging.errorLogging"/>
            <property name="destinationType" value="javax.jms.Topic"/>
          </bean>
        </property>
  		    </bean>
  		  </sm:component>
  		</sm:activationSpec>
  		
         
       
      <sm:activationSpec componentName="savedata"
				service="demo:savedata">
		<sm:component>
			<bean xmlns="http://xbean.org/schemas/spring/1.0"
				class="com.rhg.infrastructure.jms.MessageReceiverImpl" />
		</sm:component>
	</sm:activationSpec>

       		
  	</sm:activationSpecs>
  </sm:container>


  <!-- the JCA container -->
  <bean id="jencks" class="org.jencks.JCAContainer" singleton="true">

    <!-- lets use the default configuration of work manager and transaction
manager-->
    <property name="bootstrapContext">
      <bean class="org.jencks.factory.BootstrapContextFactoryBean">
        <property name="threadPoolSize" value="25"/>
      </bean>
    </property>

    <!-- the JCA Resource Adapter -->
    <property name="resourceAdapter">
      <bean id="activeMQResourceAdapter"
class="org.apache.activemq.ra.ActiveMQResourceAdapter" singleton="true">
        <property name="serverUrl" value="tcp://localhost:61616"/>
      </bean>
    </property>
  </bean>

  <!-- message broker -->
  <bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">
     <property name="config" value="classpath:activemq.xml"/>
   </bean>

	<bean id="transactionContextManager"
class="org.jencks.factory.TransactionContextManagerFactoryBean"/>
	<bean id="transactionManager"
class="org.jencks.factory.GeronimoTransactionManagerFactoryBean" />

  <bean id="jmsFactory"
class="org.apache.activemq.pool.PooledConnectionFactory">
    <property name="connectionFactory">
      <bean class="org.apache.activemq.ActiveMQConnectionFactory">
        <property name="brokerURL">
          <value>tcp://localhost:61616</value>
        </property>
      </bean>
    </property>
  </bean>

</beans>

Any idea ?
--
View this message in context: http://www.nabble.com/error-in-endpoint-generation-t1630736.html#a4419100
Sent from the ServiceMix - User forum at Nabble.com.


Re: error in endpoint generation

Posted by Guillaume Nodet <gn...@gmail.com>.
The savedata service is not even defined as a target in the servicemix.xml.
This is weird, as ServiceMix will not generate a service name on its own.
Did you post the right configuration ?

Cheers,
Guillaume Nodet

On 5/16/06, mqaiserm <Qa...@revolution.com> wrote:
>
> Running Servicemix-3.0 snapshot version and getting this error :
>
> org.apache.servicemix.jbi.RuntimeJBIException:
> javax.jbi.messaging.MessagingExce
> ption: Failed to resolve endpoint:
> org.apache.servicemix.jbi.NoServiceAvailableE
> xception: Cannot find an instance of the service:
> {http://servicemix.apache.org/
> demo/}savedata
>         at
> org.apache.servicemix.components.jms.JmsInBinding.onMessage(JmsInBind
> ing.java:74)
>         at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
>         at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMe
> ssage(MessageEndpointProxy.java:120)
>         at
> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpoint
> Proxy.java:60)
>         at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:664)
>         at
> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:1
> 63)
>         at
> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.ja
> va:291)
>         at
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown So
> urce)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: javax.jbi.messaging.MessagingException: Failed to resolve
> endpoint: o
> rg.apache.servicemix.jbi.NoServiceAvailableException: Cannot find an
> instance of
>  the service: {http://servicemix.apache.org/demo/}savedata
>         at
> org.apache.servicemix.jbi.nmr.Broker.resolveAddress(Broker.java:378)
>         at
> org.apache.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java:2
> 84)
>         at
> org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBICont
> ainer.java:683)
>         at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(Delive
> ryChannelImpl.java:450)
>         at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(Delivery
> ChannelImpl.java:490)
>         at
> org.apache.servicemix.components.jms.JmsInBinding.onMessage(JmsInBind
> ing.java:66)
>         ... 8 more
> Caused by: org.apache.servicemix.jbi.NoServiceAvailableException: Cannot
> find an
>  instance of the service: {http://servicemix.apache.org/demo/}savedata
>         at
> org.apache.servicemix.jbi.resolver.ServiceNameEndpointResolver.create
> ServiceUnavailableException(ServiceNameEndpointResolver.java:60)
>         at
> org.apache.servicemix.jbi.resolver.EndpointResolverSupport.resolveEnd
> point(EndpointResolverSupport.java:39)
>         at
> org.apache.servicemix.jbi.nmr.Broker.resolveAddress(Broker.java:375)
>         ... 13 more
>
> my servicemix.xml code is :
>
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://xbean.org/schemas/spring/1.0"
>         xmlns:spring="http://xbean.org/schemas/spring/1.0"
>         xmlns:sm="http://servicemix.org/config/1.0"
>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>         xsi:schemaLocation="http://xbean.org/schemas/spring/1.0
> ../../conf/spring-beans.xsd
>                             http://servicemix.org/config/1.0
> ../../conf/servicemix.xsd"
>     xmlns:my="http://servicemix.org/demo/">
>
>   <!-- the JBI container -->
>   <sm:container spring:id="jbi"
>                   useMBeanServer="true"
>                   createMBeanServer="true"
>                   dumpStats="true"
>             rmiPort="1080"
>                   statsInterval="10"
>                   transactionManager="#transactionManager">
>
>           <sm:activationSpecs>
>
>         <!-- Subscribe to a JMS destination -->
>                   <sm:activationSpec componentName="inputReceiver"
>
> service="my:inputReceiver"
>
> destinationService="my:outputSender">
>                     <sm:component>
>                       <bean xmlns="http://xbean.org/schemas/spring/1.0"
>
> class="org.servicemix.components.jms.JmsInUsingJCABinding">
>         <property name="jcaContainer" ref="jencks"/>
>         <property name="activationSpec">
>           <bean class="org.activemq.ra.ActiveMQActivationSpec">
>             <property name="destination"
> value="com.rhg.servicemix.messaging.errorLogging"/>
>             <property name="destinationType" value="javax.jms.Topic"/>
>           </bean>
>         </property>
>                       </bean>
>                     </sm:component>
>                   </sm:activationSpec>
>
>       <!-- Publish the result to a JMS destination -->
>                   <sm:activationSpec componentName="outputSender"
>
> service="my:outputSender">
>                     <sm:component>
>                       <bean xmlns="http://xbean.org/schemas/spring/1.0"
>
> class="org.servicemix.components.jms.JmsSenderComponent">
>         <property name="template">
>           <bean class="org.springframework.jms.core.JmsTemplate">
>             <property name="connectionFactory">
>               <ref local="jmsFactory"/>
>             </property>
>             <property name="defaultDestinationName"
> value="com.rhg.servicemix.messaging.errorLoggingResult"/>
>             <property name="pubSubDomain" value="true"/>
>           </bean>
>         </property>
>                       </bean>
>                     </sm:component>
>                   </sm:activationSpec>
>
>          <sm:activationSpec componentName="jmsTrace" service="my:jmsTrace"
> destinationService="my:savetodb">
>         <sm:component>
>           <bean class="org.servicemix.components.jms.JmsInUsingJCABinding">
>         <property name="jcaContainer" ref="jencks"/>
>         <property name="activationSpec">
>           <bean class="org.activemq.ra.ActiveMQActivationSpec">
>             <property name="destination"
> value="com.rhg.servicemix.messaging.errorLoggingResult"/>
>             <property name="destinationType" value="javax.jms.Topic"/>
>           </bean>
>         </property>
>           </bean>
>         </sm:component>
>       </sm:activationSpec>
>
>       <sm:activationSpec componentName="trace" service="my:savetodb">
>         <sm:component>
>           <bean class="com.rhg.infrastructure.jms.MessageReceiverImpl"/>
>         </sm:component>
>       </sm:activationSpec>
>
>
>           </sm:activationSpecs>
>   </sm:container>
>
>
>   <!-- the JCA container -->
>   <bean id="jencks" class="org.jencks.JCAContainer" singleton="true">
>
>     <!-- lets use the default configuration of work manager and transaction
> manager-->
>     <property name="bootstrapContext">
>       <bean class="org.jencks.factory.BootstrapContextFactoryBean">
>         <property name="threadPoolSize" value="25"/>
>       </bean>
>     </property>
>
>
>     <!-- the JCA Resource Adapter -->
>     <property name="resourceAdapter">
>       <bean id="activeMQResourceAdapter"
> class="org.activemq.ra.ActiveMQResourceAdapter" singleton="true">
>         <property name="serverUrl" value="tcp://localhost:61616"/>
>       </bean>
>     </property>
>   </bean>
>
>   <!-- message broker -->
>   <bean id="broker" class="org.activemq.spring.BrokerFactoryBean">
>      <property name="config" value="activemq.xml"/>
>    </bean>
>
>         <bean id="transactionContextManager"
> class="org.jencks.factory.TransactionContextManagerFactoryBean"/>
>         <bean id="transactionManager"
> class="org.jencks.factory.GeronimoTransactionManagerFactoryBean" />
>
>   <bean id="jmsFactory" class="org.activemq.pool.PooledConnectionFactory">
>     <property name="connectionFactory">
>       <bean class="org.activemq.ActiveMQConnectionFactory">
>         <property name="brokerURL">
>           <value>tcp://localhost:61616</value>
>         </property>
>       </bean>
>     </property>
>   </bean>
>
> </beans>
>
>
> Any idea ?
>
> --
> View this message in context: http://www.nabble.com/error-in-endpoint-generation-t1630736.html#a4417434
> Sent from the ServiceMix - User forum at Nabble.com.
>
>