You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Gnanaguru S <gn...@wipro.com> on 2011/07/05 10:17:26 UTC

Camel Blueprint Issue


Hi

when i put this code i get the tailed log of this post. Help me out.

CODE:

<?xml version="1.0" encoding="UTF-8"?>
<blueprint
    xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
      http://www.osgi.org/xmlns/blueprint/v1.0.0
      http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">

    <camelContext xmlns="http://camel.apache.org/schema/blueprint">
    
  <route>
            

	<wireTap uri="direct:tap">
        	<setHeader headerName="id"><constant>123</constant></setHeader>
       	</wireTap>

	<to uri="activemq:queue:newquu"/>

	</route>

	<route>
        <from uri="activemq:queue:newquu"/>
        <to uri="file:activemq/input/tetx.txt"/>
      </route>

    </camelContext>
</blueprint>



LOG:

13:45:46,953 | ERROR | rint Extender: 2 | BlueprintContainerImpl           |
?
   ? | 10 - org.apache.aries.blueprint - 0.3.1 | Unable to start blueprint
container for bundle queu_test.xml
org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to
validate xml
        at
org.apache.aries.blueprint.container.Parser.validate(Parser.java:288)[10:org.apache.aries.blueprint
:0.3.1]
        at
org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:275)[
10:org.apache.aries.blueprint:0.3.1]
        at
org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:227)[10
:org.apache.aries.blueprint:0.3.1]
        at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_17]
        at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_17]
        at
java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_17]
        at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPool
Executor.java:98)[:1.6.0_17]
        at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecuto
r.java:207)[:1.6.0_17]
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_17]
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_17]
        at java.lang.Thread.run(Thread.java:619)[:1.6.0_17]
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid
content was found starting with elem
ent 'setHeader'. One of
'{"http://camel.apache.org/schema/blueprint":description,
"http://camel.apache.org/sch
ema/blueprint":body}' is expected.
        at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)[:]
        at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown
Source)[:]
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)[:]
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)[:]
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)[:]
        at
org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown
Source)[:]
        at
org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown
Source)[:]
        at
org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown
Source)[:]
        at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown
Source)[:]
        at
org.apache.xerces.jaxp.validation.DOMValidatorHelper.beginNode(Unknown
Source)[:]
        at
org.apache.xerces.jaxp.validation.DOMValidatorHelper.validate(Unknown
Source)[:]
        at
org.apache.xerces.jaxp.validation.DOMValidatorHelper.validate(Unknown
Source)[:]
        at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown
Source)[:]
        at javax.xml.validation.Validator.validate(Unknown Source)[:1.4.01]
        at
org.apache.aries.blueprint.container.Parser.validate(Parser.java:285)[10:org.apache.aries.blueprint
:0.3.1]
        ... 10 more

karaf@root>

Cheers
Guru



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Blueprint-Issue-tp4552502p4552502.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel Blueprint Issue

Posted by Gnanaguru S <gn...@wipro.com>.
Hi

Now i got it work with the following code, Thanks a lot.

CODE:

<?xml version="1.0" encoding="UTF-8"?>
<blueprint
     xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="
       http://www.osgi.org/xmlns/blueprint/v1.0.0
       http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
     <camelContext xmlns="http://camel.apache.org/schema/blueprint"
trace="true">
	     
	  <route>    
	     
		  <from uri="file://inputdir/"/>
		  <to uri="activemq:queue:inputQueue"/>
	</route>
	   
	    <route> 
		    <from uri="activemq:queue:inputQueue"/>
		    <to
uri="xslt:file:C:\ESB\Fuse_ESB_4.4\apache-servicemix-4.4.0-fuse-00-27\design.xsl"/>
		    <to uri="activemq:queue:outputQueue"/>
	</route>
	 <route>
		 <from uri="activemq:queue:outputQueue"/>
		 <to uri="file://outputdir/"/>
	</route>

     
     </camelContext>
</blueprint> 


Cheers
Guru

--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Blueprint-Issue-tp4552502p4553140.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FileEndpoint Concurrent Consumer and Producer

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Jul 6, 2011 at 9:25 AM, Narita Bagchi
<Na...@headstrong.com> wrote:
> Hey Guys,
>
> Can anyone please help me with making FileEndpoint (Consumer and Producer) concurrent ? I am looking for some directions.
>

I posted a blog entry a long time ago how to do that on the file. You
may google and find that. I guess its around 2 years ago or something
like that.

Check the threads DSL which can speedup the consumer.

The producer is using the current thread, so just have multiple
threads executing to have producers working concurrently. Notice that
Camel will detect if you do concurrent writes to the *same* file, if
so it ensures synchronized writes, so you wont lose write updates.
That is though in one of the latest releases.


> Thanks.
> Regards,
> Narita
>
>
> ***The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review,retransmission,dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.***
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

FileEndpoint Concurrent Consumer and Producer

Posted by Narita Bagchi <Na...@headstrong.com>.
Hey Guys,

Can anyone please help me with making FileEndpoint (Consumer and Producer) concurrent ? I am looking for some directions.

Thanks.
Regards,
Narita


***The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review,retransmission,dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.***

Re: Camel Blueprint Issue

Posted by Charles Moulliard <cm...@gmail.com>.
Your first camel route does not contain a <from/>

<route>
       <wireTap uri="direct:tap">
               <setHeader headerName="id"><constant>123</constant></setHeader>
       </wireTap>
       <to uri="activemq:queue:newquu"/>
 </route>

-->

<route>
       <from uri="toBeDefined"/>
       <wireTap uri="direct:tap">
               <setHeader headerName="id"><constant>123</constant></setHeader>
       </wireTap>
       <to uri="activemq:queue:newquu"/>
 </route>

Regards,

Charles

On Tue, Jul 5, 2011 at 10:17 AM, Gnanaguru S
<gn...@wipro.com> wrote:
>
>
> Hi
>
> when i put this code i get the tailed log of this post. Help me out.
>
> CODE:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <blueprint
>    xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
>    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>    xsi:schemaLocation="
>      http://www.osgi.org/xmlns/blueprint/v1.0.0
>      http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
>
>    <camelContext xmlns="http://camel.apache.org/schema/blueprint">
>
>  <route>
>
>
>        <wireTap uri="direct:tap">
>                <setHeader headerName="id"><constant>123</constant></setHeader>
>        </wireTap>
>
>        <to uri="activemq:queue:newquu"/>
>
>        </route>
>
>        <route>
>        <from uri="activemq:queue:newquu"/>
>        <to uri="file:activemq/input/tetx.txt"/>
>      </route>
>
>    </camelContext>
> </blueprint>
>
>
>
> LOG:
>
> 13:45:46,953 | ERROR | rint Extender: 2 | BlueprintContainerImpl           |
> ?
>   ? | 10 - org.apache.aries.blueprint - 0.3.1 | Unable to start blueprint
> container for bundle queu_test.xml
> org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to
> validate xml
>        at
> org.apache.aries.blueprint.container.Parser.validate(Parser.java:288)[10:org.apache.aries.blueprint
> :0.3.1]
>        at
> org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:275)[
> 10:org.apache.aries.blueprint:0.3.1]
>        at
> org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:227)[10
> :org.apache.aries.blueprint:0.3.1]
>        at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_17]
>        at
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_17]
>        at
> java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_17]
>        at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPool
> Executor.java:98)[:1.6.0_17]
>        at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecuto
> r.java:207)[:1.6.0_17]
>        at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_17]
>        at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_17]
>        at java.lang.Thread.run(Thread.java:619)[:1.6.0_17]
> Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid
> content was found starting with elem
> ent 'setHeader'. One of
> '{"http://camel.apache.org/schema/blueprint":description,
> "http://camel.apache.org/sch
> ema/blueprint":body}' is expected.
>        at
> org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
> Source)[:]
>        at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown
> Source)[:]
>        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
> Source)[:]
>        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
> Source)[:]
>        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
> Source)[:]
>        at
> org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown
> Source)[:]
>        at
> org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown
> Source)[:]
>        at
> org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown
> Source)[:]
>        at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown
> Source)[:]
>        at
> org.apache.xerces.jaxp.validation.DOMValidatorHelper.beginNode(Unknown
> Source)[:]
>        at
> org.apache.xerces.jaxp.validation.DOMValidatorHelper.validate(Unknown
> Source)[:]
>        at
> org.apache.xerces.jaxp.validation.DOMValidatorHelper.validate(Unknown
> Source)[:]
>        at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown
> Source)[:]
>        at javax.xml.validation.Validator.validate(Unknown Source)[:1.4.01]
>        at
> org.apache.aries.blueprint.container.Parser.validate(Parser.java:285)[10:org.apache.aries.blueprint
> :0.3.1]
>        ... 10 more
>
> karaf@root>
>
> Cheers
> Guru
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-Blueprint-Issue-tp4552502p4552502.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: Camel Blueprint Issue

Posted by Andrè <mo...@web.de>.
the exception says
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid
content was found starting with element 'setHeader'. One of
'{"http://camel.apache.org/schema/blueprint":description,
"http://camel.apache.org/schema/blueprint":body}' is expected. 

so the setHeader declaration is not valid, i have to confess i dont know how
the grammar is
, so i would look in the grammar definition. 

--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Blueprint-Issue-tp4552502p4552806.html
Sent from the Camel - Users mailing list archive at Nabble.com.