Petals SE Flowable

Unable to compile classes generated from WSDL of service providers

Details

  • Type: Task Task
  • Status: Resolved Resolved
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: 1.4.0
  • Fix Version/s: 1.4.0
  • Component/s: Service engine
  • Security Level: Public
  • Description:
    Hide

    Since PETALSDISTRIB-474, the Petals SE Flowable is no more able to compile classes generated from WSDL of service providers. The following error occurs:

    sample-0 2021/04/28 18:44:18,083 GMT+0200 INFO [Petals.Container.Components.petals-se-flowable] : Deploying Service Unit 'su-flowable-vacationService-provide'
    sample-0 2021/04/28 18:44:18,686 GMT+0200 FINE [org.apache.cxf.endpoint.dynamic.DynamicClientFactory] : Creating client from WSDL file:/home/cdeneux/workspace/petals-java11/components-sls/components/petals-se-flowable/integration/launcher-lifecycle-flowable/target/launcher-lifecycle-flowable/container/data/repository/service-assemblies/sa-flowable-vacationRequest-04-28-2021-064418062/install/su-flowable-vacationService-provide/archiveService.wsdl
    sample-0 2021/04/28 18:44:19,401 GMT+0200 FINE [org.apache.cxf.endpoint.dynamic.DynamicClientFactory] : Created classes: org.ow2.petals.samples.se_flowable.vacation.archiveservice.ArchiveVacationRequest, org.ow2.petals.samples.se_flowable.vacation.archiveservice.ObjectFactory, org.ow2.petals.samples.se_flowable.vacation.archiveservice.OkResponse, org.ow2.petals.samples.se_flowable.vacation.vacationrequest.ObjectFactory, org.ow2.petals.samples.se_flowable.vacation.vacationrequest.VacationRequestType, org.w3._2001.xmlschema.Adapter1, org.w3._2001.xmlschema.Adapter2, org.w3._2001.xmlschema.Adapter3
    sample-0 2021/04/28 18:44:20,603 GMT+0200 SEVERE [org.apache.cxf.endpoint.dynamic.DynamicClientFactory] : Could not compile java files for file:/home/cdeneux/workspace/petals-java11/components-sls/components/petals-se-flowable/integration/launcher-lifecycle-flowable/target/launcher-lifecycle-flowable/container/data/repository/service-assemblies/sa-flowable-vacationRequest-04-28-2021-064418062/install/su-flowable-vacationService-provide/archiveService.wsdl.
    sample-0 2021/04/28 18:44:20,613 GMT+0200 SEVERE [org.flowable.engine.impl.bpmn.deployer.ParsedDeploymentBuilder] : Could not parse resource petals:su-flowable-vacationService-provide:vacationRequest.bpmn20.xml
    org.flowable.common.engine.api.FlowableException: Error importing 'archiveService.wsdl' as 'http://schemas.xmlsoap.org/wsdl/'
    	at org.flowable.engine.impl.bpmn.behavior.WebServiceActivityBehavior.fillImporterInfo(WebServiceActivityBehavior.java:283)
    	at org.flowable.engine.impl.bpmn.behavior.WebServiceActivityBehavior.fillDefinitionMaps(WebServiceActivityBehavior.java:189)
    	at org.flowable.engine.impl.bpmn.behavior.WebServiceActivityBehavior.<init>(WebServiceActivityBehavior.java:82)
            ...
    	at org.ow2.petals.flowable.FlowableSuManager.deployBpmnModels(FlowableSuManager.java:421)
    	at org.ow2.petals.flowable.FlowableSuManager.doDeploy(FlowableSuManager.java:169)
    	at org.ow2.petals.component.framework.su.AbstractServiceUnitManager.deploy(AbstractServiceUnitManager.java:144)
    	at org.ow2.petals.microkernel.jbi.management.task.deployment.deploy.DeploySUToComponentTask.deploySUtoComponent(DeploySUToComponentTask.java:121)
    	at org.ow2.petals.microkernel.jbi.management.task.deployment.deploy.DeploySUToComponentTask.execute(DeploySUToComponentTask.java:75)
    	at org.ow2.petals.microkernel.api.jbi.management.TaskProcessor.process(TaskProcessor.java:73)
    	at org.ow2.petals.microkernel.jbi.management.task.deployment.deploy.DeployAllSUTask.registerAndDeploySU(DeployAllSUTask.java:165)
    	at org.ow2.petals.microkernel.jbi.management.task.deployment.deploy.DeployAllSUTask.deploySUS(DeployAllSUTask.java:128)
    	at org.ow2.petals.microkernel.jbi.management.task.deployment.deploy.DeployAllSUTask.execute(DeployAllSUTask.java:89)
    	at org.ow2.petals.microkernel.api.jbi.management.TaskProcessor.process(TaskProcessor.java:73)
    	at org.ow2.petals.microkernel.jbi.management.deployment.DeploymentServiceImpl.deploy(DeploymentServiceImpl.java:166)
    	...
    Caused by: java.lang.IllegalStateException: Unable to create JAXBContext for generated packages: "org.ow2.petals.samples.se_flowable.vacation.archiveservice" doesnt contain ObjectFactory.class or jaxb.index
    	at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:419)
    	at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:241)
    	at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:196)
    	at org.flowable.engine.impl.webservice.CxfWSDLImporter.importFrom(CxfWSDLImporter.java:123)
    	at org.flowable.engine.impl.webservice.CxfWSDLImporter.importFrom(CxfWSDLImporter.java:89)
    	at org.flowable.engine.impl.bpmn.behavior.WebServiceActivityBehavior.fillImporterInfo(WebServiceActivityBehavior.java:274)
    	... 84 more
    Caused by: javax.xml.bind.JAXBException: "org.ow2.petals.samples.se_flowable.vacation.archiveservice" doesnt contain ObjectFactory.class or jaxb.index
    	at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:260)
    	at com.sun.xml.bind.v2.JAXBContextFactory.createContext(JAXBContextFactory.java:48)
    	at javax.xml.bind.ContextFinder.find(ContextFinder.java:302)
    	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:478)
    	at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:415)
    	... 89 more
    Show
    Since PETALSDISTRIB-474, the Petals SE Flowable is no more able to compile classes generated from WSDL of service providers. The following error occurs:
    sample-0 2021/04/28 18:44:18,083 GMT+0200 INFO [Petals.Container.Components.petals-se-flowable] : Deploying Service Unit 'su-flowable-vacationService-provide'
    sample-0 2021/04/28 18:44:18,686 GMT+0200 FINE [org.apache.cxf.endpoint.dynamic.DynamicClientFactory] : Creating client from WSDL file:/home/cdeneux/workspace/petals-java11/components-sls/components/petals-se-flowable/integration/launcher-lifecycle-flowable/target/launcher-lifecycle-flowable/container/data/repository/service-assemblies/sa-flowable-vacationRequest-04-28-2021-064418062/install/su-flowable-vacationService-provide/archiveService.wsdl
    sample-0 2021/04/28 18:44:19,401 GMT+0200 FINE [org.apache.cxf.endpoint.dynamic.DynamicClientFactory] : Created classes: org.ow2.petals.samples.se_flowable.vacation.archiveservice.ArchiveVacationRequest, org.ow2.petals.samples.se_flowable.vacation.archiveservice.ObjectFactory, org.ow2.petals.samples.se_flowable.vacation.archiveservice.OkResponse, org.ow2.petals.samples.se_flowable.vacation.vacationrequest.ObjectFactory, org.ow2.petals.samples.se_flowable.vacation.vacationrequest.VacationRequestType, org.w3._2001.xmlschema.Adapter1, org.w3._2001.xmlschema.Adapter2, org.w3._2001.xmlschema.Adapter3
    sample-0 2021/04/28 18:44:20,603 GMT+0200 SEVERE [org.apache.cxf.endpoint.dynamic.DynamicClientFactory] : Could not compile java files for file:/home/cdeneux/workspace/petals-java11/components-sls/components/petals-se-flowable/integration/launcher-lifecycle-flowable/target/launcher-lifecycle-flowable/container/data/repository/service-assemblies/sa-flowable-vacationRequest-04-28-2021-064418062/install/su-flowable-vacationService-provide/archiveService.wsdl.
    sample-0 2021/04/28 18:44:20,613 GMT+0200 SEVERE [org.flowable.engine.impl.bpmn.deployer.ParsedDeploymentBuilder] : Could not parse resource petals:su-flowable-vacationService-provide:vacationRequest.bpmn20.xml
    org.flowable.common.engine.api.FlowableException: Error importing 'archiveService.wsdl' as 'http://schemas.xmlsoap.org/wsdl/'
    	at org.flowable.engine.impl.bpmn.behavior.WebServiceActivityBehavior.fillImporterInfo(WebServiceActivityBehavior.java:283)
    	at org.flowable.engine.impl.bpmn.behavior.WebServiceActivityBehavior.fillDefinitionMaps(WebServiceActivityBehavior.java:189)
    	at org.flowable.engine.impl.bpmn.behavior.WebServiceActivityBehavior.<init>(WebServiceActivityBehavior.java:82)
            ...
    	at org.ow2.petals.flowable.FlowableSuManager.deployBpmnModels(FlowableSuManager.java:421)
    	at org.ow2.petals.flowable.FlowableSuManager.doDeploy(FlowableSuManager.java:169)
    	at org.ow2.petals.component.framework.su.AbstractServiceUnitManager.deploy(AbstractServiceUnitManager.java:144)
    	at org.ow2.petals.microkernel.jbi.management.task.deployment.deploy.DeploySUToComponentTask.deploySUtoComponent(DeploySUToComponentTask.java:121)
    	at org.ow2.petals.microkernel.jbi.management.task.deployment.deploy.DeploySUToComponentTask.execute(DeploySUToComponentTask.java:75)
    	at org.ow2.petals.microkernel.api.jbi.management.TaskProcessor.process(TaskProcessor.java:73)
    	at org.ow2.petals.microkernel.jbi.management.task.deployment.deploy.DeployAllSUTask.registerAndDeploySU(DeployAllSUTask.java:165)
    	at org.ow2.petals.microkernel.jbi.management.task.deployment.deploy.DeployAllSUTask.deploySUS(DeployAllSUTask.java:128)
    	at org.ow2.petals.microkernel.jbi.management.task.deployment.deploy.DeployAllSUTask.execute(DeployAllSUTask.java:89)
    	at org.ow2.petals.microkernel.api.jbi.management.TaskProcessor.process(TaskProcessor.java:73)
    	at org.ow2.petals.microkernel.jbi.management.deployment.DeploymentServiceImpl.deploy(DeploymentServiceImpl.java:166)
    	...
    Caused by: java.lang.IllegalStateException: Unable to create JAXBContext for generated packages: "org.ow2.petals.samples.se_flowable.vacation.archiveservice" doesnt contain ObjectFactory.class or jaxb.index
    	at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:419)
    	at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:241)
    	at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:196)
    	at org.flowable.engine.impl.webservice.CxfWSDLImporter.importFrom(CxfWSDLImporter.java:123)
    	at org.flowable.engine.impl.webservice.CxfWSDLImporter.importFrom(CxfWSDLImporter.java:89)
    	at org.flowable.engine.impl.bpmn.behavior.WebServiceActivityBehavior.fillImporterInfo(WebServiceActivityBehavior.java:274)
    	... 84 more
    Caused by: javax.xml.bind.JAXBException: "org.ow2.petals.samples.se_flowable.vacation.archiveservice" doesnt contain ObjectFactory.class or jaxb.index
    	at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:260)
    	at com.sun.xml.bind.v2.JAXBContextFactory.createContext(JAXBContextFactory.java:48)
    	at javax.xml.bind.ContextFinder.find(ContextFinder.java:302)
    	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:478)
    	at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:415)
    	... 89 more
  • Environment:
    -

Issue Links

Activity

Christophe DENEUX made changes - Thu, 29 Apr 2021 - 16:13:11 +0200
Field Original Value New Value
Link This issue depends on PETALSDISTRIB-474 [ PETALSDISTRIB-474 ]
Christophe DENEUX made changes - Thu, 29 Apr 2021 - 16:13:34 +0200
Link This issue blocks PETALSSEFLOWABLE-71 [ PETALSSEFLOWABLE-71 ]
Christophe DENEUX made changes - Thu, 29 Apr 2021 - 16:13:53 +0200
Link This issue depends on PETALSESBCONT-471 [ PETALSESBCONT-471 ]
Hide
Christophe DENEUX added a comment - Thu, 29 Apr 2021 - 16:20:10 +0200

The problem is due to JaxB that is available in the AppClassloader (see PETALSESBCONT-471). And as AppClassloader is no more a URLClassloader, the dynamic client of CXF is no more capable to retrieve the content of the AppClassloader to add it to the compilation step. So, when compiling classes generated from WSDL, the dynamic client of CXF is not able to add JaxB on the compilation classpath, and the compilation fails.

To fix the problem the Petals classloader hierarchy must be reviewed, see PETALSESBCONT-471.

Show
Christophe DENEUX added a comment - Thu, 29 Apr 2021 - 16:20:10 +0200 The problem is due to JaxB that is available in the AppClassloader (see PETALSESBCONT-471). And as AppClassloader is no more a URLClassloader, the dynamic client of CXF is no more capable to retrieve the content of the AppClassloader to add it to the compilation step. So, when compiling classes generated from WSDL, the dynamic client of CXF is not able to add JaxB on the compilation classpath, and the compilation fails. To fix the problem the Petals classloader hierarchy must be reviewed, see PETALSESBCONT-471.
Christophe DENEUX made changes - Thu, 29 Apr 2021 - 16:20:10 +0200
Status New [ 10000 ] Open [ 10002 ]
Priority Blocker [ 1 ]
Christophe DENEUX made changes - Thu, 29 Apr 2021 - 16:20:12 +0200
Status Open [ 10002 ] In Progress [ 10003 ]
Hide
Christophe DENEUX added a comment - Tue, 23 Nov 2021 - 11:47:44 +0100
Show
Christophe DENEUX added a comment - Tue, 23 Nov 2021 - 11:47:44 +0100 Fixed by PETALSESBCONT-471
Christophe DENEUX made changes - Tue, 23 Nov 2021 - 11:47:44 +0100
Status In Progress [ 10003 ] Resolved [ 10004 ]
Fix Version/s 1.4.0 [ 10870 ]
Resolution Fixed [ 1 ]
Transition Status Change Time Execution Times Last Executer Last Execution Date
New New Open Open
7m 12s
1
Christophe DENEUX
Thu, 29 Apr 2021 - 16:20:10 +0200
Open Open In Progress In Progress
2s
1
Christophe DENEUX
Thu, 29 Apr 2021 - 16:20:12 +0200
In Progress In Progress Resolved Resolved
207d 20h 27m
1
Christophe DENEUX
Tue, 23 Nov 2021 - 11:47:44 +0100

People

Dates

  • Created:
    Thu, 29 Apr 2021 - 16:12:58 +0200
    Updated:
    Tue, 23 Nov 2021 - 11:47:44 +0100
    Resolved:
    Tue, 23 Nov 2021 - 11:47:44 +0100