Bug 1247217 - Business Central is unable to build a project if a DRL contains declared types
Business Central is unable to build a project if a DRL contains declared types
Status: VERIFIED
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: Business Central (Show other bugs)
6.1.0
All All
high Severity high
: ER4
: 6.2.0
Assigned To: Maciej Swiderski
Tomas David
:
Depends On:
Blocks: 1247226
  Show dependency treegraph
 
Reported: 2015-07-27 10:52 EDT by Musharraf Hussain
Modified: 2016-07-31 21:11 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1247226 (view as bug list)
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker JBPM-4573 Major Resolved Deployment of kjar with rule with declared type fails 2016-03-08 23:49 EST

  None (edit)
Description Musharraf Hussain 2015-07-27 10:52:16 EDT
Description of problem:
- While building a project in Business Central application, if the project contains a DRL that defines a declared type similar to the following, then the UI does not allow you to build the project. 
e.g. This is a sample rule
~~~
package org.test.declare;

declare Address
   number : int
   streetName : String
   city : String
end

rule "Testrule"
when    
    $a : Address()
then
    System.out.println("Hello Testing...");
end
~~~

While building a project which contains a DRL similar to above the UI complains that as if it could not find a class with the type "org.test.declare.Address" inside the project classpath. It is a valid use case as per the documentation and looks to be a serious issue blocking this kind of use case from being used by users.
~~~
18:46:36,523 ERROR [org.jbpm.console.ng.bd.backend.server.DeploymentManagerEntryPointImpl] (http-localhost.localdomain/127.0.0.1:8080-3) Deployment of unit com.example:DeclarativeFactTest:1.0 failed: java.lang.IllegalArgumentException: Class org.test.declare.Address not found in the project: org.jbpm.console.ng.bd.exception.DeploymentException: java.lang.IllegalArgumentException: Class org.test.declare.Address not found in the project
	at org.jbpm.console.ng.bd.backend.server.DeploymentManagerEntryPointImpl.deploy(DeploymentManagerEntryPointImpl.java:187) [jbpm-console-ng-business-domain-backend-6.2.0.Final-redhat-6.jar:6.2.0.Final-redhat-6]
	at org.jbpm.console.ng.bd.backend.server.DeploymentManagerEntryPointImpl.deploy(DeploymentManagerEntryPointImpl.java:143) [jbpm-console-ng-business-domain-backend-6.2.0.Final-redhat-6.jar:6.2.0.Final-redhat-6]
	at org.jbpm.console.ng.bd.backend.server.DeploymentManagerEntryPointImpl.process(DeploymentManagerEntryPointImpl.java:497) [jbpm-console-ng-business-domain-backend-6.2.0.Final-redhat-6.jar:6.2.0.Final-redhat-6]
	at org.jbpm.console.ng.bd.backend.server.DeploymentManagerEntryPointImpl$Proxy$_$$_WeldClientProxy.process(DeploymentManagerEntryPointImpl$Proxy$_$$_WeldClientProxy.java) [jbpm-console-ng-business-domain-backend-6.2.0.Final-redhat-6.jar:6.2.0.Final-redhat-6]
	at org.kie.workbench.common.services.backend.builder.BuildServiceImpl.buildAndDeploy(BuildServiceImpl.java:115) [kie-wb-common-services-backend-6.2.0.Final-redhat-6.jar:6.2.0.Final-redhat-6]
	at org.kie.workbench.common.services.backend.builder.BuildServiceImpl.buildAndDeploy(BuildServiceImpl.java:94) [kie-wb-common-services-backend-6.2.0.Final-redhat-6.jar:6.2.0.Final-redhat-6]
	at org.kie.workbench.common.services.backend.builder.BuildServiceImpl$Proxy$_$$_WeldClientProxy.buildAndDeploy(BuildServiceImpl$Proxy$_$$_WeldClientProxy.java) [kie-wb-common-services-backend-6.2.0.Final-redhat-6.jar:6.2.0.Final-redhat-6]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_75]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_75]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_75]
	at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_75]
	at org.jboss.errai.bus.server.io.AbstractRPCMethodCallback.invokeMethodFromMessage(AbstractRPCMethodCallback.java:48) [errai-bus-3.0.4.Final-redhat-4.jar:3.0.4.Final-redhat-4]
	at org.jboss.errai.bus.server.io.ValueReplyRPCEndpointCallback.callback(ValueReplyRPCEndpointCallback.java:22) [errai-bus-3.0.4.Final-redhat-4.jar:3.0.4.Final-redhat-4]
	at org.jboss.errai.bus.server.io.RemoteServiceCallback.callback(RemoteServiceCallback.java:54) [errai-bus-3.0.4.Final-redhat-4.jar:3.0.4.Final-redhat-4]
	at org.jboss.errai.cdi.server.CDIExtensionPoints$2.callback(CDIExtensionPoints.java:396) [errai-weld-integration-3.0.4.Final-redhat-4.jar:3.0.4.Final-redhat-4]
	at org.jboss.errai.bus.server.DeliveryPlan.deliver(DeliveryPlan.java:47) [errai-bus-3.0.4.Final-redhat-4.jar:3.0.4.Final-redhat-4]
	at org.jboss.errai.bus.server.ServerMessageBusImpl.sendGlobal(ServerMessageBusImpl.java:293) [errai-bus-3.0.4.Final-redhat-4.jar:3.0.4.Final-redhat-4]
	at org.jboss.errai.bus.server.SimpleDispatcher.dispatchGlobal(SimpleDispatcher.java:46) [errai-bus-3.0.4.Final-redhat-4.jar:3.0.4.Final-redhat-4]
	at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:97) [errai-bus-3.0.4.Final-redhat-4.jar:3.0.4.Final-redhat-4]
	at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:114) [errai-bus-3.0.4.Final-redhat-4.jar:3.0.4.Final-redhat-4]
	at org.jboss.errai.bus.server.servlet.DefaultBlockingServlet.doPost(DefaultBlockingServlet.java:142) [errai-bus-3.0.4.Final-redhat-4.jar:3.0.4.Final-redhat-4]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-2.jar:1.0.2.Final-redhat-2]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-2.jar:1.0.2.Final-redhat-2]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
	at org.uberfire.ext.security.server.SecureHeadersFilter.doFilter(SecureHeadersFilter.java:53) [uberfire-servlet-security-0.5.4.Final-redhat-2.jar:0.5.4.Final-redhat-2]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
	at org.uberfire.ext.security.server.SecurityIntegrationFilter.doFilter(SecurityIntegrationFilter.java:64) [uberfire-servlet-security-0.5.4.Final-redhat-2.jar:0.5.4.Final-redhat-2]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:512) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
	at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
	at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
	at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
	at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:419) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:854) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_75]
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: Class org.test.declare.Address not found in the project
	at org.jbpm.kie.services.impl.KModuleDeploymentService.deploy(KModuleDeploymentService.java:157) [jbpm-kie-services-6.2.0.Final-redhat-6.jar:6.2.0.Final-redhat-6]
	at org.jbpm.services.cdi.impl.DeploymentServiceCDIImpl$Proxy$_$$_WeldClientProxy.deploy(DeploymentServiceCDIImpl$Proxy$_$$_WeldClientProxy.java) [jbpm-services-cdi-6.2.0.Final-redhat-6.jar:6.2.0.Final-redhat-6]
	at org.jbpm.console.ng.bd.backend.server.DeploymentManagerEntryPointImpl.deploy(DeploymentManagerEntryPointImpl.java:179) [jbpm-console-ng-business-domain-backend-6.2.0.Final-redhat-6.jar:6.2.0.Final-redhat-6]
	... 45 more
Caused by: java.lang.IllegalArgumentException: Class org.test.declare.Address not found in the project
	at org.jbpm.kie.services.impl.KModuleDeploymentService.processResources(KModuleDeploymentService.java:329) [jbpm-kie-services-6.2.0.Final-redhat-6.jar:6.2.0.Final-redhat-6]
	at org.jbpm.kie.services.impl.KModuleDeploymentService.deploy(KModuleDeploymentService.java:125) [jbpm-kie-services-6.2.0.Final-redhat-6.jar:6.2.0.Final-redhat-6]
	... 47 more
~~~

This issue has already been fixed in the upstream via this JIRA [https://issues.jboss.org/browse/JBPM-4573] . Kindly fix the same issue for our future versions of BRMS/BPMS 6 releases too.


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

How reproducible:
- Always

Steps to Reproduce:
1. Follow the steps shown above to build the project in Business Central which contains a DRL with declared fact type.
2.
3.

Actual results:
- It throws the exception "java.lang.IllegalArgumentException: Class org.test.declare.Address not found in the project" while building the project from Business Central application.

Expected results:
- It should have built the project with success.

Additional info:
- Nothing
Comment 2 Kris Verlaenen 2015-09-07 10:49:25 EDT
Setting to modified as https://bugzilla.redhat.com/show_bug.cgi?id=1247226 is already verified.
Comment 3 Tomas David 2015-10-26 05:15:41 EDT
Verified with the above example on BPMS 6.2.0.ER4.

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