camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roberto Coral Azambuja (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CAMEL-9730) NPE in camel-jaxb when using in OSGi running from CamelTestBlueprint
Date Mon, 21 Mar 2016 21:02:25 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-9730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15205106#comment-15205106
] 

Roberto Coral Azambuja edited comment on CAMEL-9730 at 3/21/16 9:02 PM:
------------------------------------------------------------------------

I believe that some commit related to this fix may have broken the build of class OsgiSpringCamelContext
in camel-spring at camel-2.17.x branch.
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] C:\git\camel\components\camel-spring\src\main\java\org\apache\camel\osgi\OsgiSpringCamelContext.java:[48,15]
error: constructor OsgiTypeConverter in class OsgiTypeConverter cannot be applied to given
types;
[INFO] 1 error
[INFO] -------------------------------------------------------------


I believe the patch attached can solve the problem.


was (Author: rcazambuja):
I believe that some commit related to this fixmay have broken the build of class OsgiSpringCamelContext
in camel-spring at camel-2.17.x branch.
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] C:\git\camel\components\camel-spring\src\main\java\org\apache\camel\osgi\OsgiSpringCamelContext.java:[48,15]
error: constructor OsgiTypeConverter in class OsgiTypeConverter cannot be applied to given
types;
[INFO] 1 error
[INFO] -------------------------------------------------------------


I believe the patch attached can solve the problem.

> NPE in camel-jaxb when using in OSGi running from CamelTestBlueprint
> --------------------------------------------------------------------
>
>                 Key: CAMEL-9730
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9730
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-jaxb, osgi
>    Affects Versions: 2.17.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.17.0
>
>         Attachments: CAMEL-9730.patch
>
>
> You can get this stacktrace with a camel-jaxb in testing using camel-test-blueprint.
> {code}
> Caused by: org.apache.camel.TypeConverterLoaderException: Failed to load type converters
because of: Cannot load type converters using OSGi bundle: 28
> 	at org.apache.camel.impl.osgi.Activator$BundleTypeConverterLoader.load(Activator.java:380)
> 	at org.apache.camel.core.osgi.OsgiTypeConverter.createRegistry(OsgiTypeConverter.java:219)
> 	at org.apache.camel.core.osgi.OsgiTypeConverter.getDelegate(OsgiTypeConverter.java:185)
> 	at org.apache.camel.core.osgi.OsgiTypeConverter.getStatistics(OsgiTypeConverter.java:160)
> 	at org.apache.camel.impl.DefaultCamelContext.forceLazyInitialization(DefaultCamelContext.java:3625)
> 	at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:2977)
> 	at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:175)
> 	at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2848)
> 	at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2844)
> 	at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2867)
> 	at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2844)
> 	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
> 	at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2813)
> 	at org.apache.camel.blueprint.BlueprintCamelContext.start(BlueprintCamelContext.java:180)
> 	at org.apache.camel.test.blueprint.CamelBlueprintTestSupport.setUp(CamelBlueprintTestSupport.java:240)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:483)
> 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
> 	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
> 	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
> 	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
> 	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
> 	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
> 	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> 	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
> 	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> 	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
> 	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
> 	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
> 	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
> 	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
> 	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
> 	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
> Caused by: java.lang.NullPointerException: null
> 	at org.apache.camel.converter.jaxb.FallbackTypeConverter.setCamelContext(FallbackTypeConverter.java:116)
> 	at org.apache.camel.impl.converter.BaseTypeConverterRegistry.addFallbackTypeConverter(BaseTypeConverterRegistry.java:462)
> 	at org.apache.camel.impl.osgi.Activator$BundleTypeConverterLoader$Loader.load(Activator.java:471)
> 	at org.apache.camel.impl.osgi.Activator$BundleTypeConverterLoader.load(Activator.java:378)
> 	at org.apache.camel.core.osgi.OsgiTypeConverter.createRegistry(OsgiTypeConverter.java:219)
> 	at org.apache.camel.core.osgi.OsgiTypeConverter.getDelegate(OsgiTypeConverter.java:185)
> 	at org.apache.camel.core.osgi.OsgiTypeConverter.getStatistics(OsgiTypeConverter.java:160)
> 	at org.apache.camel.impl.DefaultCamelContext.forceLazyInitialization(DefaultCamelContext.java:3625)
> 	at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:2977)
> 	at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:175)
> 	at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2848)
> 	at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2844)
> 	at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2867)
> 	at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2844)
> 	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
> 	at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2813)
> 	at org.apache.camel.blueprint.BlueprintCamelContext.start(BlueprintCamelContext.java:180)
> 	at org.apache.camel.test.blueprint.CamelBlueprintTestSupport.setUp(CamelBlueprintTestSupport.java:240)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:483)
> 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
> 	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
> 	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
> 	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
> 	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
> 	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
> 	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> 	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
> 	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> 	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
> 	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
> 	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
> 	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
> 	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
> 	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
> 	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message