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: [EMAIL PROTECTED]
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:
[EMAIL PROTECTED]
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:
[EMAIL PROTECTED]
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 = [EMAIL PROTECTED],
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
[EMAIL PROTECTED]; 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.

Reply via email to