You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "metatech (JIRA)" <ji...@apache.org> on 2011/07/12 15:40:59 UTC

[jira] [Commented] (SMX4-879) jbi-maven-plugin generates jbi.xml with incorrect "component-name", resulting in failed deployment

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

metatech commented on SMX4-879:
-------------------------------

Debugging through the GenerateServiceAssemblyDescriptorMojo.getComponentName() method, n.getChildren() is a map on which an iterator tries to find the first artifact whose packaging is of type "jbi-component", and considers that as the component to package.  Unfortunately, the "servicemix-http" artifact also matches the criteria, before the real artifact ("servicemix-cxf-se").
It explains why the order (sometimes) matters in the pom.xml, but is this a normal behaviour ?


> jbi-maven-plugin generates jbi.xml with incorrect "component-name", resulting in failed deployment
> --------------------------------------------------------------------------------------------------
>
>                 Key: SMX4-879
>                 URL: https://issues.apache.org/jira/browse/SMX4-879
>             Project: ServiceMix 4
>          Issue Type: Bug
>          Components: Examples
>    Affects Versions: 4.3.0
>         Environment: - Linux Ubuntu on Core2Duo CPU
> - ServiceMix v4.3.0
> - jbi-maven-plugin : v4.4
> - Maven v2.2.1
>            Reporter: metatech
>         Attachments: error.log, jbi_bad.xml, jbi_good.xml, mvn_jbi_bad.txt, mvn_jbi_good.txt
>
>
> After adding a dependency in the "cxf-wsdl-first" sample, it fails to deploy.
> Steps to reproduce : 
> rm -r ~/.m2/repository/org/apache/servicemix/examples/cxf-wsdl-first
> cd apache-servicemix-4.3.0/examples/cxf-wsdl-first/
> mvn jbi:generate-jbi-service-assembly-descriptor # output in mvn_jbi_good.txt
> cat wsdl-first-cxf-sa/target/classes/META-INF/jbi.xml | grep component-name #(see jbi_good.xml)
> vi wsdl-first-cxfse-su/pom.xml
> #add dependency "servicemix-http" after "servicemix-cxf-se" (in second position)
> mvn jbi:generate-jbi-service-assembly-descriptor # output in mvn_jbi_bad.txt, after several runs
> cat wsdl-first-cxf-sa/target/classes/META-INF/jbi.xml | grep component-name #(see jbi_bad.xml)
> The bug may not occur consistently on every run, several runs may be needed.
> After a few retries, the "component-name" tag in jbi.xml becomes "servicemix-http" instead of "servicemix-cxf-se"
> Workaround : add the dependency "servicemix-http" in last position.
> At deployment, the following error is displayed (see error.log for full error): 
> Configuration problem: Bean class [org.apache.servicemix.cxfse.CxfSeEndpoint] not found
> Offending resource: file [/data/software/apache-servicemix-4.3.0/data/jbi/wsdl-first-cxf-sa/sus/wsdl-first-cxfse-su/xbean.xml]
> Bean 'CXFSE-Endpoint'; nested exception is java.lang.ClassNotFoundException: org.apache.servicemix.cxfse.CxfSeEndpoint in classloader org.apache.xbean.spring.context.FileSystemXmlApplicationContext@13077ec
> P.S. : With no experience in ServiceMix yet, it took me 3 days to figure out why the slightly modified sample was not working properly.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira