How to access deployment-descriptor.xml from outside the kjar

496 views
Skip to first unread message

swapnil irabatti

unread,
Oct 12, 2017, 10:58:51 AM10/12/17
to jBPM Setup

Maciej Swiderski

unread,
Oct 13, 2017, 3:00:27 AM10/13/17
to swapnil irabatti, jBPM Setup
there is no default descriptor - but you can create one and make it default so all your projects will have its configuration automatically applied.

so just create deployment-descriptor.xml and add your config in there. then place it wherever you like and point it via org.kie.deployment.desc.location system property.

Maciej
--
You received this message because you are subscribed to the Google Groups "jBPM Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jbpm-setup+...@googlegroups.com.
To post to this group, send email to jbpm-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jbpm-setup/7015fb83-f18d-48c4-87de-056934293b2e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

swapnil irabatti

unread,
Oct 13, 2017, 3:03:59 AM10/13/17
to jBPM Setup
Cool,
Thanks for the info Maciej.
Message has been deleted

Maciej Swiderski

unread,
Oct 17, 2017, 8:26:09 AM10/17/17
to swapnil irabatti, jBPM Setup
looks like your deployment descriptor is not valid according to xml schema:

Maciej
On 17 Oct 2017, at 13:56, swapnil irabatti <swapnilir...@gmail.com> wrote:

I tried to put the deployment-descriptor.xml file outside the jar and execute the command then I am getting the below error:
Caused by: javax.xml.bind.UnmarshalException
 - with linked exception:
[org.xml.sax.SAXParseException; lineNumber: 17; columnNumber: 25; cvc-complex-type.2.4.d: Invalid content was found starting with element 'work-item-handlers'. No child element is expected at this point.]
        at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:314)
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:578)
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:264)
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:229)
        at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:136)
        at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:183)
        at org.jbpm.runtime.manager.impl.deploy.DeploymentDescriptorIO.fromXml(DeploymentDescriptorIO.java:55)
        ... 78 more
Caused by: org.xml.sax.SAXParseException; lineNumber: 17; columnNumber: 25; cvc-complex-type.2.4.d: Invalid content was found starting with element 'work-item-handlers'. No child element is expected at this point.
        at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:201)
        at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:132)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:394)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:325)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:282)
        at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:481)
        at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3571)
        at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1999)
        at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:788)
        at org.apache.xerces.jaxp.validation.ValidatorHandlerImpl.startElement(ValidatorHandlerImpl.java:589)
        at com.sun.xml.bind.v2.runtime.unmarshaller.ValidatingUnmarshaller.startElement(ValidatingUnmarshaller.java:101)
        at com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:168)
        at org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:498)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:283)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1653)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324)
        at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:875)
        at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:798)
        at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1198)
        at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:564)
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:258)
        ... 82 more

17:20:40,148 WARN  [org.kie.server.services.jbpm.ui.JBPMUIKieServerExtension] (EJB default - 1) Unable to create image reference for container dummyContainer due to null
17:20:40,249 INFO  [org.kie.server.services.impl.KieServerImpl] (EJB default - 1) Container dummyContainer (for release id org.mastertheboss.kieserver:hello-kie-server:1.0) successfully started
17:20:40,557 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 69) WFLYUT0021: Registered web context: /kie-server
17:20:40,657 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 37) WFLYSRV0010: Deployed "kie-server.war" (runtime-name : "kie-server.war")
17:20:40,818 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://192.168.40.60:9991/management
17:20:40,818 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://192.168.40.60:9991
17:20:40,819 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) started in 16191ms - Started 588 of 823 services (423 services are lazy, passive or on-demand)
17:20:42,469 INFO  [org.drools.compiler.kie.builder.impl.KieRepositoryImpl] (EJB default - 1) KieModule was added: ZipKieModule[releaseId=org.rulesengine:redpine-signals:0.0.3-SNAPSHOT,file=C:\Users\swapnil\.m2\repository\org\rulesengine\redpine-signals\0.0.3-SNAPSHOT\redpine-signals-0.0.3-SNAPSHOT.jar]
17:20:43,653 WARN  [org.kie.server.services.drools.DroolsKieServerExtension] (EJB default - 1) Unable to create instance of type com.redpinesignals.am.domain.ShortestPathResponse due to com.redpinesignals.am.domain.ShortestPathResponse
17:20:43,654 WARN  [org.kie.server.services.drools.DroolsKieServerExtension] (EJB default - 1) Unable to create instance of type com.redpinesignals.am.domain.PathwayAsset due to com.redpinesignals.am.domain.PathwayAsset
17:20:43,654 WARN  [org.kie.server.services.drools.DroolsKieServerExtension] (EJB default - 1) Unable to create instance of type com.redpinesignals.am.domain.testclass due to com.redpinesignals.am.domain.testclass
17:20:43,655 WARN  [org.kie.server.services.drools.DroolsKieServerExtension] (EJB default - 1) Unable to create instance of type com.redpinesignals.am.domain.UserCurLocationResponse due to com.redpinesignals.am.domain.UserCurLocationResponse
17:20:43,657 ERROR [org.kie.server.services.jbpm.JbpmKieServerExtension] (EJB default - 1) Error when creating container testContainer by extension jBPM KIE Server extension: java.lang.RuntimeException: Unable to read deployment descriptor from xml
        at org.jbpm.runtime.manager.impl.deploy.DeploymentDescriptorIO.fromXml(DeploymentDescriptorIO.java:59)
        at org.jbpm.runtime.manager.impl.deploy.DeploymentDescriptorManager.getDefaultDescriptor(DeploymentDescriptorManager.java:57)
        at org.jbpm.runtime.manager.impl.deploy.DeploymentDescriptorManager.getDeploymentDescriptorHierarchy(DeploymentDescriptorManager.java:76)
        at org.kie.server.services.jbpm.JbpmKieServerExtension.getDeploymentDescriptor(JbpmKieServerExtension.java:647)
        at org.kie.server.services.jbpm.JbpmKieServerExtension.addAsyncHandler(JbpmKieServerExtension.java:602)
        at org.kie.server.services.jbpm.JbpmKieServerExtension.createContainer(JbpmKieServerExtension.java:375)
        at org.kie.server.services.impl.KieServerImpl.createContainer(KieServerImpl.java:279)
        at org.kie.server.services.impl.ContainerManager.installContainersSync(ContainerManager.java:43)
        at org.kie.server.services.impl.ContainerManager.installContainers(ContainerManager.java:33)
        at org.kie.server.jms.ContainerManagerEJB.installContainers(ContainerManagerEJB.java:38)
        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:498)
        at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
        at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)
        at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:82)
        at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:93)
        at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
        at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
        at org.jboss.as.ejb3.tx.EjbBMTInterceptor.handleInvocation(EjbBMTInterceptor.java:103)
        at org.jboss.as.ejb3.tx.BMTInterceptor.processInvocation(BMTInterceptor.java:58)
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
        at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)
        at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:73)
        at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:83)
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
        at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
        at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
        at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
        at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:52)
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
        at org.jboss.as.ejb3.component.singleton.SingletonComponentInstanceAssociationInterceptor.processInvocation(SingletonComponentInstanceAssociationInterceptor.java:53)
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
        at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
        at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:47)
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
        at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:100)
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
        at org.jboss.as.ejb3.deployment.processors.StartupAwaitInterceptor.processInvocation(StartupAwaitInterceptor.java:22)
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
        at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)
        at org.jboss.as.ejb3.concurrency.ContainerManagedConcurrencyInterceptor.processInvocation(ContainerManagedConcurrencyInterceptor.java:110)
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
        at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
        at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:67)
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
        at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
        at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54)
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
        at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:64)
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
        at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)
        at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:636)
        at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:61)
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
        at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)
        at org.jboss.invocation.PrivilegedWithCombinerInterceptor.processInvocation(PrivilegedWithCombinerInterceptor.java:80)
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
        at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
        at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:198)
        at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:185)
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
        at org.jboss.as.ejb3.component.interceptors.LogDiagnosticContextRecoveryInterceptor.processInvocation(LogDiagnosticContextRecoveryInterceptor.java:82)
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
        at org.jboss.as.ejb3.component.interceptors.AsyncFutureInterceptorFactory$1$2.runInvocation(AsyncFutureInterceptorFactory.java:104)
        at org.jboss.as.ejb3.component.interceptors.AsyncInvocationTask.run(AsyncInvocationTask.java:74)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:748)
        at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: javax.xml.bind.UnmarshalException
 - with linked exception:
[org.xml.sax.SAXParseException; lineNumber: 17; columnNumber: 25; cvc-complex-type.2.4.d: Invalid content was found starting with element 'work-item-handlers'. No child element is expected at this point.]
        at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:314)
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:578)
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:264)
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:229)
        at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:136)
        at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:183)
        at org.jbpm.runtime.manager.impl.deploy.DeploymentDescriptorIO.fromXml(DeploymentDescriptorIO.java:55)
        ... 78 more
Caused by: org.xml.sax.SAXParseException; lineNumber: 17; columnNumber: 25; cvc-complex-type.2.4.d: Invalid content was found starting with element 'work-item-handlers'. No child element is expected at this point.
        at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:201)
        at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:132)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:394)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:325)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:282)
        at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:481)
        at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3571)
        at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1999)
        at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:788)
        at org.apache.xerces.jaxp.validation.ValidatorHandlerImpl.startElement(ValidatorHandlerImpl.java:589)
        at com.sun.xml.bind.v2.runtime.unmarshaller.ValidatingUnmarshaller.startElement(ValidatingUnmarshaller.java:101)
        at com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:168)
        at org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:498)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:283)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1653)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324)
        at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:875)
        at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:798)
        at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1198)
        at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:564)
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:258)
        ... 82 more

17:20:43,661 WARN  [org.kie.server.services.jbpm.ui.JBPMUIKieServerExtension] (EJB default - 1) Unable to create image reference for container testContainer due to null
17:20:44,330 INFO  [org.kie.server.services.impl.KieServerImpl] (EJB default - 1) Container testContainer (for release id org.rulesengine:redpine-signals:0.0.3-SNAPSHOT) successfully started


I have attached deployment-descriptor.xml file
Can anyone help in figuring out where I am wrong?

For more options, visit https://groups.google.com/d/optout.
<deployment-descriptor.xml>

swapnil irabatti

unread,
Oct 17, 2017, 10:39:37 AM10/17/17
to jBPM Setup
Hi Maciej thanks for quick reply.
I looked at the xsd schema, I am not able to figure out what mistake I am doing.
If you see my deployment-descriptor.xml file I am using <work-item-handler> tag under <work-item-handlers> is this the valid one?
I am sorry I am weak at xml and xsd.
below is my deployment-descriptor.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<deployment-descriptor xsi:schemaLocation="http://www.jboss.org/jbpm deployment-descriptor.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <persistence-unit>org.jbpm.domain</persistence-unit>
    <audit-persistence-unit>org.jbpm.domain</audit-persistence-unit>
    <audit-mode>JPA</audit-mode>
    <persistence-mode>JPA</persistence-mode>
<runtime-strategy>PER_REQUEST</runtime-strategy>
<marshalling-strategies/>
    <event-listeners/>
    <task-event-listeners/>
    <globals/>
<environment-entries/>
    <configurations/>
    <required-roles/>
<remoteable-classes/>
<limit-serialization-classes>false</limit-serialization-classes>
    <work-item-handlers>
       <work-item-handler>
            <resolver>mvel</resolver>
            <identifier>new org.jbpm.process.workitem.email.EmailWorkItemHandler("xx.xx.xx.xx", "587", "admin.admin.com", "Hzsym@cd698", true)</identifier>
            <parameters/>
            <name>Email</name>
        </work-item-handler>
        
        <work-item-handler>
            <resolver>mvel</resolver>
            <identifier>new org.jbpm.process.workitem.rest.RESTWorkItemHandler()</identifier>
            <parameters/>
            <name>Rest</name>
        </work-item-handler> 
     </work-item-handlers> 
</deployment-descriptor>

Maciej Swiderski

unread,
Oct 17, 2017, 11:42:07 AM10/17/17
to swapnil irabatti, jBPM Setup
It is the order of elements, work item handlers can't be at the end. See how it is in xsd 

Maciej 
Reply all
Reply to author
Forward
0 new messages