Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 677F8177F8 for ; Thu, 2 Oct 2014 09:18:23 +0000 (UTC) Received: (qmail 89469 invoked by uid 500); 2 Oct 2014 09:18:22 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 89420 invoked by uid 500); 2 Oct 2014 09:18:22 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 89409 invoked by uid 99); 2 Oct 2014 09:18:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Oct 2014 09:18:22 +0000 X-ASF-Spam-Status: No, hits=2.3 required=5.0 tests=SPF_SOFTFAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: softfail (nike.apache.org: transitioning domain of fernandezmartinezmiguel@gmail.com does not designate 216.139.236.26 as permitted sender) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Oct 2014 09:17:56 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1XZcWJ-0004Gd-LV for users@camel.apache.org; Thu, 02 Oct 2014 02:17:55 -0700 Date: Thu, 2 Oct 2014 02:17:55 -0700 (PDT) From: miguelfdez To: users@camel.apache.org Message-ID: <1412241475660-5757312.post@n5.nabble.com> Subject: Camel tracer in Switchyard Project MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi! Following this documentation and example: https://camel.apache.org/tracer.html // https://camel.apache.org/tracer-example.html I'm trying to add a tracer to my project. With this approach I try to store each message exchange in the "CAMEL_MESSAGETRACED" table in the database. The compilation proccess doesn't throw any errors and the deployment and execution are also ok. However, nothing is inserted in the DB. What am I doing wrong? Should I add something to switchyard.xml? Thank you! Camel Java Implementation: public void configure() { Tracer tracer = new Tracer(); tracer.setTraceOutExchanges(true); tracer.setUseJpa(true); tracer.setEnabled(true); tracer.setTraceInterceptors(true); DefaultTraceFormatter formatter = new DefaultTraceFormatter(); formatter.setShowOutBody(true); formatter.setShowOutBodyType(true); tracer.setFormatter(formatter); getContext().setTracing(true); getContext().addInterceptStrategy(tracer); org.apache.camel.Processor myProc = new org.apache.camel.Processor() { public void process(org.apache.camel.Exchange exchange) throws Exception { String body = exchange.getIn().getBody(String.class); exchange.getOut().setBody(body); exchange.getOut().setHeaders(exchange.getIn().getHeaders()); } }; from("switchyard://ProxyService").process(myProc) .log("${body}").to("switchyard://ProxifiedService").end(); } persistence.xml org.hibernate.ejb.HibernatePersistence org.apache.camel.processor.interceptor.jpa.JpaTraceEventMessage JBoss Log: 11:06:22,162 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015876: Starting deployment of "ApplicationService-0.0.1-SNAPSHOT.jar" (runtime-name: "ApplicationService-0.0.1-SNAPSHOT.jar") 11:06:22,192 INFO [org.jboss.as.jpa] (MSC service thread 1-6) JBAS011401: Read persistence.xml for tracer 11:06:22,206 INFO [org.jboss.weld.deployer] (MSC service thread 1-6) JBAS016002: Processing weld deployment ApplicationService-0.0.1-SNAPSHOT.jar 11:06:22,228 INFO [org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016005: Starting Services for CDI deployment: ApplicationService-0.0.1-SNAPSHOT.jar 11:06:22,230 INFO [org.switchyard] (MSC service thread 1-1) Deploying SwitchYard application 'ApplicationService-0.0.1-SNAPSHOT.jar' 11:06:22,233 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 98) JBAS011402: Starting Persistence Unit Service 'ApplicationService-0.0.1-SNAPSHOT.jar#tracer' 11:06:22,233 INFO [org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016008: Starting weld service for deployment ApplicationService-0.0.1-SNAPSHOT.jar 11:06:22,352 INFO [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 98) HHH000400: Using dialect: org.hibernate.dialect.Oracle10gDialect 11:06:22,404 INFO [org.hibernate.engine.transaction.internal.TransactionFactoryInitiator] (ServerService Thread Pool -- 98) HHH000268: Transaction strategy: org.hibernate.engine.transaction.internal.jdbc.JdbcTransactionFactory 11:06:22,406 INFO [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (ServerService Thread Pool -- 98) HHH000397: Using ASTQueryTranslatorFactory 11:06:22,487 INFO [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 98) HHH000227: Running hbm2ddl schema export 11:06:22,490 INFO [stdout] (ServerService Thread Pool -- 98) Hibernate: 11:06:22,490 INFO [stdout] (ServerService Thread Pool -- 98) drop table CAMEL_MESSAGETRACED cascade constraints 11:06:22,750 INFO [stdout] (ServerService Thread Pool -- 98) Hibernate: 11:06:22,750 INFO [stdout] (ServerService Thread Pool -- 98) drop sequence hibernate_sequence 11:06:22,785 INFO [stdout] (ServerService Thread Pool -- 98) Hibernate: 11:06:22,785 INFO [stdout] (ServerService Thread Pool -- 98) create table CAMEL_MESSAGETRACED ( 11:06:22,786 INFO [stdout] (ServerService Thread Pool -- 98) id number(19,0) not null, 11:06:22,786 INFO [stdout] (ServerService Thread Pool -- 98) body clob, 11:06:22,786 INFO [stdout] (ServerService Thread Pool -- 98) bodyType varchar2(255 char), 11:06:22,786 INFO [stdout] (ServerService Thread Pool -- 98) causedByException clob, 11:06:22,786 INFO [stdout] (ServerService Thread Pool -- 98) exchangeId varchar2(255 char), 11:06:22,787 INFO [stdout] (ServerService Thread Pool -- 98) exchangePattern varchar2(255 char), 11:06:22,787 INFO [stdout] (ServerService Thread Pool -- 98) fromEndpointUri varchar2(255 char), 11:06:22,787 INFO [stdout] (ServerService Thread Pool -- 98) headers clob, 11:06:22,787 INFO [stdout] (ServerService Thread Pool -- 98) outBody clob, 11:06:22,787 INFO [stdout] (ServerService Thread Pool -- 98) outBodyType varchar2(255 char), 11:06:22,787 INFO [stdout] (ServerService Thread Pool -- 98) outHeaders clob, 11:06:22,788 INFO [stdout] (ServerService Thread Pool -- 98) previousNode varchar2(255 char), 11:06:22,788 INFO [stdout] (ServerService Thread Pool -- 98) properties clob, 11:06:22,788 INFO [stdout] (ServerService Thread Pool -- 98) routeId varchar2(255 char), 11:06:22,789 INFO [stdout] (ServerService Thread Pool -- 98) shortExchangeId varchar2(255 char), 11:06:22,789 INFO [stdout] (ServerService Thread Pool -- 98) timestamp timestamp, 11:06:22,789 INFO [stdout] (ServerService Thread Pool -- 98) toNode varchar2(255 char), 11:06:22,789 INFO [stdout] (ServerService Thread Pool -- 98) primary key (id) 11:06:22,790 INFO [stdout] (ServerService Thread Pool -- 98) ) 11:06:22,948 INFO [stdout] (ServerService Thread Pool -- 98) Hibernate: 11:06:22,948 INFO [stdout] (ServerService Thread Pool -- 98) create sequence hibernate_sequence start with 1 increment by 1 11:06:22,982 INFO [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 98) HHH000230: Schema export complete 11:06:22,983 WARN [org.hibernate.internal.SessionFactoryImpl] (ServerService Thread Pool -- 98) HHH000008: JTASessionContext being used with JDBCTransactionFactory; auto-flush will not operate correctly with getCurrentSession() 11:06:23,044 INFO [org.switchyard] (MSC service thread 1-1) Starting SwitchYard service 11:06:23,065 INFO [org.apache.camel.management.ManagementStrategyFactory] (MSC service thread 1-1) JMX enabled. 11:06:23,065 INFO [org.switchyard.common.camel.SwitchYardCamelContext] (MSC service thread 1-1) Apache Camel 1.1.0.Final (CamelContext: camel-10) is starting 11:06:23,066 INFO [org.apache.camel.management.DefaultManagementLifecycleStrategy] (MSC service thread 1-1) StatisticsLevel at All so enabling load performance statistics 11:06:23,077 INFO [org.apache.camel.impl.converter.DefaultTypeConverter] (MSC service thread 1-1) Loaded 179 type converters 11:06:23,081 INFO [org.switchyard.common.camel.SwitchYardCamelContext] (MSC service thread 1-1) Total 0 routes, of which 0 is started. 11:06:23,082 INFO [org.switchyard.common.camel.SwitchYardCamelContext] (MSC service thread 1-1) Apache Camel 1.1.0.Final (CamelContext: camel-10) started in 0.016 seconds 11:06:23,172 INFO [org.switchyard.component.soap] (MSC service thread 1-1) SWITCHYARD035014: Creating dispatch with WSDL vfs:/C:/mycompany/EntornoDesarrollo/newEA/jboss-eap-6.1/bin/content/ApplicationService-0.0.1-SNAPSHOT.jar/META-INF/ApplicationWS.wsdl 11:06:23,345 INFO [org.switchyard.common.camel.SwitchYardCamelContext] (MSC service thread 1-1) Route: direct:{urn:com.mycompany.ea.application:ApplicationService:1.0}ProxyService/ProxifiedService started and consuming from: Endpoint[direct://%7Burn:com.mycompany.ea.application:ApplicationService:1.0%7DProxyService/ProxifiedService] 11:06:23,382 INFO [org.switchyard.common.camel.SwitchYardCamelContext] (MSC service thread 1-1) Route: route5 started and consuming from: Endpoint[switchyard://ProxyService] 11:06:23,546 INFO [org.switchyard.common.camel.SwitchYardCamelContext] (MSC service thread 1-1) Route: direct:{urn:com.mycompany.ea.application:ApplicationService:1.0}PromotedProxyService started and consuming from: Endpoint[direct://%7Burn:com.mycompany.ea.application:ApplicationService:1.0%7DPromotedProxyService] 11:06:23,552 INFO [org.switchyard] (MSC service thread 1-1) Addressing [enabled = false, required = false] 11:06:23,553 INFO [org.switchyard] (MSC service thread 1-1) MTOM [enabled = false, threshold = 0] 11:06:23,556 INFO [org.jboss.ws.cxf.metadata] (MSC service thread 1-1) JBWS024061: Adding service endpoint metadata: id=ApplicationWSService address=http://localhost:8080/ApplicationService/ApplicationWSService implementor=org.switchyard.component.soap.endpoint.BaseWebService serviceName={http://service.admin.ws.mycompany.com/}ApplicationWSService portName={http://service.admin.ws.mycompany.com/}ApplicationWSPort annotationWsdlLocation=null wsdlLocationOverride=vfs:/C:/mycompany/EntornoDesarrollo/newEA/jboss-eap-6.1/bin/content/ApplicationService-0.0.1-SNAPSHOT.jar/META-INF/ApplicationWS.wsdl mtomEnabled=false handlers=[org.switchyard.component.soap.InboundResponseHandler] publishedEndpointUrl=http://localhost:8080/ApplicationService/ApplicationWSService invoker=org.jboss.wsf.stack.cxf.JBossWSInvoker properties=[org.jboss.as.webservices.metadata.modelComponentViewName -> null] 11:06:23,605 INFO [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-1) Creating Service {http://service.admin.ws.mycompany.com/}ApplicationWSService from WSDL: vfs:/C:/mycompany/EntornoDesarrollo/newEA/jboss-eap-6.1/bin/content/ApplicationService-0.0.1-SNAPSHOT.jar/META-INF/ApplicationWS.wsdl 11:06:23,617 INFO [org.apache.cxf.endpoint.ServerImpl] (MSC service thread 1-1) Setting the server's publish address to be http://localhost:8080/ApplicationService/ApplicationWSService 11:06:23,640 INFO [org.jboss.ws.cxf.deployment] (MSC service thread 1-1) JBWS024074: WSDL published to: file:/C:/mycompany/EntornoDesarrollo/newEA/jboss-eap-6.1/standalone/data/wsdl/ApplicationService.deployment/ApplicationWSService.wsdl 11:06:23,642 INFO [org.jboss.as.webservices] (MSC service thread 1-2) JBAS015539: Starting service jboss.ws.port-component-link 11:06:23,642 INFO [org.jboss.as.webservices] (MSC service thread 1-2) JBAS015539: Starting service jboss.ws.endpoint."ApplicationService.deployment".ApplicationWSService 11:06:23,652 ERROR [org.jboss.as.webservices] (MSC service thread 1-2) JBAS015591: Cannot register record processor with JMX server 11:06:23,653 ERROR [org.jboss.as.webservices] (MSC service thread 1-2) JBAS015591: Cannot register record processor with JMX server 11:06:23,655 INFO [org.jboss.ws.common.management] (MSC service thread 1-2) JBWS022050: Endpoint registered: jboss.ws:context=ApplicationService,endpoint=ApplicationWSService 11:06:23,689 INFO [org.jboss.as.server] (HttpManagementService-threads - 3) JBAS018559: Deployed "ApplicationService-0.0.1-SNAPSHOT.jar" (runtime-name : "ApplicationService-0.0.1-SNAPSHOT.jar") 11:08:32,394 INFO [route5] (http-/127.0.0.1:8080-1) -- View this message in context: http://camel.465427.n5.nabble.com/Camel-tracer-in-Switchyard-Project-tp5757312.html Sent from the Camel - Users mailing list archive at Nabble.com.