Bug 920971 - [Camel] DefaultPackageScanClassResolver unable to find any TypeConverters(probably other too) inside JAR packages
Summary: [Camel] DefaultPackageScanClassResolver unable to find any TypeConverters(pro...
Keywords:
Status: MODIFIED
Alias: None
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: 3rd Party
Version: 5.3.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Julian Coleman
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 923870
TreeView+ depends on / blocked
 
Reported: 2013-03-13 08:28 UTC by Adam Kovari
Modified: 2018-12-01 16:22 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)
Reproducer (7.64 KB, application/x-zip)
2013-03-13 08:31 UTC, Adam Kovari
no flags Details
Proposed patch (1.67 KB, patch)
2013-03-13 08:31 UTC, Adam Kovari
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Apache JIRA CAMEL-6158 0 None None None Never

Description Adam Kovari 2013-03-13 08:28:13 UTC
Description of problem:



Camel is unable to locate Smooks' TypeConverters which are included in the milyn-smooks-all-1.4.2.jar. This can be observed as following:

Caused by: org.jboss.soa.esb.actions.ActionLifecycleException: org.apache.camel.RuntimeCamelException: org.apache.camel.
TypeConverterLoaderException: Failed to load type converters because of: Cannot find any type converter classes from the
 following packages: [org.milyn.smooks.camel.converters]
        at fi.logica.bis.heracles.esb.actions.AbstractAuditLoggingAction.initialise(AbstractAuditLoggingAction.java:102)

        at sun.reflect.GeneratedMethodAccessor410.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.jboss.soa.esb.configure.Configurator.invoke(Configurator.java:311)
        at org.jboss.soa.esb.configure.Configurator.initialise(Configurator.java:287)
        at org.jboss.soa.esb.listeners.message.BeanContainerAction.initialise(BeanContainerAction.java:158)
        at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.initialise(ActionProcessingPipeline.java:398)
        ... 89 more
Caused by: org.apache.camel.RuntimeCamelException: org.apache.camel.TypeConverterLoaderException: Failed to load type co
nverters because of: Cannot find any type converter classes from the following packages: [org.milyn.smooks.camel.convert
ers]
        at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1270)
        at org.apache.camel.impl.DefaultCamelContext.getTypeConverter(DefaultCamelContext.java:1057)
        at org.apache.camel.impl.DefaultCamelContext.getTypeConverterRegistry(DefaultCamelContext.java:1072)
        at fi.logica.bis.heracles.esb.actions.routing.output.HeraclesCamelOutputGateway.onInitialise(HeraclesCamelOutput
Gateway.java:37)
        at fi.logica.bis.heracles.esb.actions.AbstractAuditLoggingAction.initialise(AbstractAuditLoggingAction.java:99)
        ... 96 more
Caused by: org.apache.camel.TypeConverterLoaderException: Failed to load type converters because of: Cannot find any typ
e converter classes from the following packages: [org.milyn.smooks.camel.converters]
        at org.apache.camel.impl.converter.AnnotationTypeConverterLoader.load(AnnotationTypeConverterLoader.java:117)
        at org.apache.camel.impl.converter.BaseTypeConverterRegistry.loadTypeConverters(BaseTypeConverterRegistry.java:4
89)
        at org.apache.camel.impl.converter.DefaultTypeConverter.doStart(DefaultTypeConverter.java:42)
        at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)
        at org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:1763)
        at org.apache.camel.impl.DefaultCamelContext.doAddService(DefaultCamelContext.java:931)
        at org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:892)
        at org.apache.camel.impl.DefaultCamelContext.getTypeConverter(DefaultCamelContext.java:1055)
        ... 99 more

The lines that cause the issue are:

		CamelContext camelContext = new DefaultCamelContext();
		camelContext.start();


Version-Release number of selected component (if applicable):

    JBoss SOA-P 5.3.1
    Camel core 2.10.2
    Smooks 1.4.2


How reproducible:
Always

Steps to Reproduce:
1. Deploy attached reproducer
2. Watch the server.log
3.
  
Actual results:
Deployment fails

Expected results:
Deployment works

Additional info:

Comment 1 Adam Kovari 2013-03-13 08:31:28 UTC
Created attachment 709394 [details]
Reproducer

Comment 2 Adam Kovari 2013-03-13 08:31:57 UTC
Created attachment 709395 [details]
Proposed patch

Comment 3 Adam Kovari 2013-03-13 08:56:10 UTC
The patch is not needed in the Camel-core but in smooks.

milyn-smooks-all-1.4.2.jar/META-INF/services/org/apache/camel/TypeConverter

should contain:

org.milyn.smooks.camel.converters.EDITypeConverter
org.milyn.smooks.camel.converters.ResultConverter
org.milyn.smooks.camel.converters.SourceConverter

Comment 4 Adam Kovari 2013-03-26 10:25:16 UTC
Hi Rick, I assigned this to you, not sure if it's OK but can you please check if this can be included in the next RollUp patch? Thanks

Comment 5 Rick Wagner 2013-03-26 12:53:41 UTC
Adding this BZ to SOA_5.3.1_2_2013

Productisation, can we please make the .Jar meta-information changes specified in comment 3 above?

Thank you,

Rick


Note You need to log in before you can comment on or make changes to this bug.