java.lang.RuntimeException: Gave up waiting for service

2012-07-23 Thread arep...@hotmail.com
I am trying to test a simple blueprint route, but I am getting
java.lang.RuntimeException: Gave up waiting for service
(objectClass=org.apache.camel.CamelContext) .

Below are my blueprint and Unit test case, I am not sure what I am doing
wrong. Need help with this issue.

*Blueprint *

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";>

http://camel.apache.org/schema/blueprint";>








*Unit Test Case using camel-test-blueprint*


public class BluePrintRouteTest extends CamelBlueprintTestSupport {

// override this method, and return the location of our Blueprint XML 
file
to be used for testing
@Override
protected String getBlueprintDescriptor() {
return "OSGI-INF/blueprint/camel-context.xml";
}

@Test
public void testRoute() throws Exception { 
 // set mock expectations
getMockEndpoint("file://target/outbox").expectedMessageCount(1);

// send a message
template.sendBodyAndHeader("file://target/inbox",
"John|lastName|city|Zip|", Exchange.FILE_NAME, "myTestFile.txt");

// assert mocks
assertMockEndpointsSatisfied();
}

}

*Exception*

java.lang.RuntimeException: Gave up waiting for service
(objectClass=org.apache.camel.CamelContext)
at
org.apache.camel.test.blueprint.CamelBlueprintHelper.getOsgiService(CamelBlueprintHelper.java:177)
at
org.apache.camel.test.blueprint.CamelBlueprintHelper.getOsgiService(CamelBlueprintHelper.java:139)
at
org.apache.camel.test.blueprint.CamelBlueprintTestSupport.createCamelContext(CamelBlueprintTestSupport.java:100)
at
org.apache.camel.test.junit4.CamelTestSupport.doSetUp(CamelTestSupport.java:247)
at
org.apache.camel.test.junit4.CamelTestSupport.setUp(CamelTestSupport.java:217)
at
org.apache.camel.test.blueprint.CamelBlueprintTestSupport.setUp(CamelBlueprintTestSupport.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:47)
at org.junit.rules.RunRules.evaluate(RunRules.java:18)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)







--
View this message in context: 
http://camel.465427.n5.nabble.com/java-lang-RuntimeException-Gave-up-waiting-for-service-tp5716371.html
Sent from the Camel Development mailing list archive at Nabble.com.


Is camel-beanio working ?

2012-09-20 Thread arep...@hotmail.com
I am using the camel-beanio 2.10.0 with blueprint, the blueprint route is
working fine when I am testing with junit, but when I try to deploy the
route to Apache Karaf I am getting the below exception. If I am not wrong, I
think there is a issue with beanio Manifest file. Can someone help me to
validate this issue.

camel-beanio 2.10.0 by default will pull the beanio 2.0.0 as dependency,
since I need the latest version of beanio, I am adding the beanio 2.0.1 as
an additional bundle to Karaf.

org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to
intialize bean myAppBlueprintContext
at
org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:640)[9:org.apache.aries.blueprint:0.3.2]
at
org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:726)[9:org.apache.aries.blueprint:0.3.2]
at
org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)[9:org.apache.aries.blueprint:0.3.2]
at
org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:219)[9:org.apache.aries.blueprint:0.3.2]
at
org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:147)[9:org.apache.aries.blueprint:0.3.2]
at
org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:631)[9:org.apache.aries.blueprint:0.3.2]
at
org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:337)[9:org.apache.aries.blueprint:0.3.2]
at
org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:230)[9:org.apache.aries.blueprint:0.3.2]
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_04]
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_04]
at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_04]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_04]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_04]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_04]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_04]
at java.lang.Thread.run(Thread.java:722)[:1.7.0_04]
Caused by: java.lang.NullPointerException
at org.beanio.internal.util.Settings.loadProperties(Settings.java:233)
at org.beanio.internal.util.Settings.getInstance(Settings.java:162)
at org.beanio.StreamFactory.newInstance(StreamFactory.java:323)
at org.beanio.StreamFactory.newInstance(StreamFactory.java:295)
at
org.apache.camel.dataformat.beanio.BeanIODataFormat.doStart(BeanIODataFormat.java:79)
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)
at 
org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:62)
at 
org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:52)
at
org.apache.camel.processor.UnmarshalProcessor.doStart(UnmarshalProcessor.java:100)
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)
at 
org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:62)
at 
org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:52)
at 
org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:73)
at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.start(AsyncProcessorConverterHelper.java:92)
at 
org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:62)
at 
org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:52)
at 
org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:73)
at
org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:78)
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)
at 
org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:62)
at 
org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:52)
at 
org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:73)
at
org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:78)
at
org.apache.camel.processor.interceptor.TraceInterceptor.doStart(TraceInterceptor.java:358)
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)
at 
org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:62)
at 
org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:52)
at 
org.apache.camel.util.ServiceHelper.startSer

Re: Is camel-beanio working ?

2012-09-21 Thread arep...@hotmail.com
Yes Charles, you are right, the issue is from that part of code, even I saw
that, but I am not sure how to fix it.

regarding your Question : How have you defined the location of your xml
config file ? 

I haven't defined the location of the config file anywhere.  since the
config file is part of the jar, i am not sure if I need to define it again.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Is-camel-beanio-working-tp5719695p5719731.html
Sent from the Camel Development mailing list archive at Nabble.com.


Re: Is camel-beanio working ?

2012-09-24 Thread arep...@hotmail.com
*jar* beanio-2.0.1.jar

*config file*  beanio-2.0.1.jar\org\beanio\internal\config\beanio.properties
(I think the error is while loading this config file)

*blueprint*


http://www.osgi.org/xmlns/blueprint/v1.0.0";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xmlns:camel="http://camel.apache.org/schema/blueprint";
   xsi:schemaLocation="
   http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
   http://camel.apache.org/schema/blueprint
http://camel.apache.org/schema/blueprint/camel-blueprint-2.10.0.xsd";>
   




 



http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"; >




 

http://camel.apache.org/schema/blueprint";>









body











--
View this message in context: 
http://camel.465427.n5.nabble.com/Is-camel-beanio-working-tp5719695p5719866.html
Sent from the Camel Development mailing list archive at Nabble.com.


Re: Is camel-beanio working ?

2012-09-24 Thread arep...@hotmail.com
Yes Claus, it works fine when I run it as a unit test.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Is-camel-beanio-working-tp5719695p5719867.html
Sent from the Camel Development mailing list archive at Nabble.com.


install feature: how to change version of Imported Packages

2012-10-05 Thread arep...@hotmail.com
When I install camel-beanio 2.10.1 in karaf, it imports beanio 2.0.1, but I
need beanio 2.0.2. So, is there a way I could instruct karaf to import
beanio 2.0.2 instead of beanio 2.0.1





--
View this message in context: 
http://camel.465427.n5.nabble.com/install-feature-how-to-change-version-of-Imported-Packages-tp5720636.html
Sent from the Camel Development mailing list archive at Nabble.com.


Re: Is camel-beanio working ?

2012-10-05 Thread arep...@hotmail.com
This issue got resolved, the issue is with the beanio bundle, the beanio
community has fixed the issue in the latest version (2.0.2) and it all works
fine now.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Is-camel-beanio-working-tp5719695p5720637.html
Sent from the Camel Development mailing list archive at Nabble.com.