Bug 920971

Summary: [Camel] DefaultPackageScanClassResolver unable to find any TypeConverters(probably other too) inside JAR packages
Product: [JBoss] JBoss Enterprise SOA Platform 5 Reporter: Adam Kovari <akovari>
Component: 3rd PartyAssignee: Julian Coleman <jcoleman>
Status: MODIFIED --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.3.1CC: nobody, rwagner, soa-p-jira
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 923870    
Attachments:
Description Flags
Reproducer
none
Proposed patch none

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