Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PaxExam ntegration Tests for Encrypting Properties with Jasypt not Working #29

Open
ghost opened this issue Dec 1, 2015 · 1 comment

Comments

@ghost
Copy link

ghost commented Dec 1, 2015

Tests Already Created, But are not working. They are failling with the Stacktrace below. It appears that the Jasypt components are not executing and resolving the encrypted strings. When you remove them and hard code a value, the tests run.

@ghost ghost added bug karaf labels Dec 1, 2015
@ghost
Copy link
Author

ghost commented Dec 1, 2015

17:24:29,010 | ERROR | rint Extender: 3 | BlueprintContainerImpl | 21 - org.apache.aries.blueprint.core - 1.4.2 | Unable to start blueprint container for bundle com.redhat.consulting.fusequickstarts.karaf.properties-encryption
org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to initialize bean .camelBlueprint.factory.fusequickstart-enc-properties-camel
at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:714)[21:org.apache.aries.blueprint.core:1.4.2]
at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:824)[21:org.apache.aries.blueprint.core:1.4.2]
at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[21:org.apache.aries.blueprint.core:1.4.2]
at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[21:org.apache.aries.blueprint.core:1.4.2]
at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_71]
at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[21:org.apache.aries.blueprint.core:1.4.2]
at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)[21:org.apache.aries.blueprint.core:1.4.2]
at org.apache.aries.blueprint.container.BlueprintRepository.createInstance(BlueprintRepository.java:230)[21:org.apache.aries.blueprint.core:1.4.2]
at org.apache.aries.blueprint.container.BlueprintRepository.create(BlueprintRepository.java:145)[21:org.apache.aries.blueprint.core:1.4.2]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.getComponentInstance(BlueprintContainerImpl.java:754)[21:org.apache.aries.blueprint.core:1.4.2]
at org.apache.camel.blueprint.handler.CamelNamespaceHandler$CamelDependenciesFinder.process(CamelNamespaceHandler.java:961)[204:org.apache.camel.camel-blueprint:2.15.1.redhat-620133]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.processProcessors(BlueprintContainerImpl.java:529)[21:org.apache.aries.blueprint.core:1.4.2]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:361)[21:org.apache.aries.blueprint.core:1.4.2]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:269)[21:org.apache.aries.blueprint.core:1.4.2]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_71]
at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_71]
at org.apache.aries.blueprint.container.ExecutorServiceWrapper.run(ExecutorServiceWrapper.java:106)[21:org.apache.aries.blueprint.core:1.4.2]
at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[21:org.apache.aries.blueprint.core:1.4.2]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_71]
at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_71]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_71]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_71]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_71]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_71]
at java.lang.Thread.run(Thread.java:745)[:1.7.0_71]
Caused by: org.apache.camel.NoSuchBeanException: Cannot lookup: jasypt from registry: org.apache.camel.blueprint.BlueprintContainerRegistry@35a29951 with expected type: interface org.apache.camel.component.properties.PropertiesParser due: Error setting property: PropertyDescriptor <name: password, getter: null, setter: [class org.apache.camel.component.jasypt.JasyptPropertiesParser.setPassword(class java.lang.String)]
at org.apache.camel.impl.CompositeRegistry.lookupByNameAndType(CompositeRegistry.java:62)
at org.apache.camel.impl.PropertyPlaceholderDelegateRegistry.lookupByNameAndType(PropertyPlaceholderDelegateRegistry.java:63)
at org.apache.camel.util.CamelContextHelper.lookup(CamelContextHelper.java:137)
at org.apache.camel.util.CamelContextHelper.mandatoryLookup(CamelContextHelper.java:157)
at org.apache.camel.core.xml.AbstractCamelContextFactoryBean.initPropertyPlaceholder(AbstractCamelContextFactoryBean.java:531)
at org.apache.camel.blueprint.CamelContextFactoryBean.initPropertyPlaceholder(CamelContextFactoryBean.java:230)
at org.apache.camel.core.xml.AbstractCamelContextFactoryBean.afterPropertiesSet(AbstractCamelContextFactoryBean.java:172)
at org.apache.camel.blueprint.CamelContextFactoryBean.afterPropertiesSet(CamelContextFactoryBean.java:299)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_71]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_71]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_71]
at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_71]
at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:297)[21:org.apache.aries.blueprint.core:1.4.2]
at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:958)[21:org.apache.aries.blueprint.core:1.4.2]
at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:712)[21:org.apache.aries.blueprint.core:1.4.2]
... 24 more
Caused by: org.osgi.service.blueprint.container.ComponentDefinitionException: Error setting property: PropertyDescriptor <name: password, getter: null, setter: [class org.apache.camel.component.jasypt.JasyptPropertiesParser.setPassword(class java.lang.String)]
at org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:941)[21:org.apache.aries.blueprint.core:1.4.2]
at org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:907)[21:org.apache.aries.blueprint.core:1.4.2]
at org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:888)[21:org.apache.aries.blueprint.core:1.4.2]
at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:820)[21:org.apache.aries.blueprint.core:1.4.2]
at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[21:org.apache.aries.blueprint.core:1.4.2]
at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[21:org.apache.aries.blueprint.core:1.4.2]
at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_71]
at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[21:org.apache.aries.blueprint.core:1.4.2]
at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)[21:org.apache.aries.blueprint.core:1.4.2]
at org.apache.aries.blueprint.container.BlueprintRepository.createInstance(BlueprintRepository.java:230)[21:org.apache.aries.blueprint.core:1.4.2]
at org.apache.aries.blueprint.container.BlueprintRepository.create(BlueprintRepository.java:145)[21:org.apache.aries.blueprint.core:1.4.2]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.getComponentInstance(BlueprintContainerImpl.java:754)[21:org.apache.aries.blueprint.core:1.4.2]
at org.apache.camel.blueprint.BlueprintContainerRegistry.lookupByNameAndType(BlueprintContainerRegistry.java:54)
at org.apache.camel.impl.CompositeRegistry.lookupByNameAndType(CompositeRegistry.java:56)
... 38 more
Caused by: java.lang.NullPointerException
at org.apache.camel.component.jasypt.JasyptPropertiesParser.setPassword(JasyptPropertiesParser.java:95)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_71]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_71]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_71]
at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_71]
at org.apache.aries.blueprint.utils.ReflectionUtils$MethodPropertyDescriptor.internalSet(ReflectionUtils.java:628)
at org.apache.aries.blueprint.utils.ReflectionUtils$PropertyDescriptor.set(ReflectionUtils.java:378)
at org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:939)[21:org.apache.aries.blueprint.core:1.4.2]
... 51 more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

0 participants