[JBoss JIRA] (DROOLS-3766) [JPMS] Calls coming from unnamed module
by Geoffrey De Smet (Jira)
[ https://issues.jboss.org/browse/DROOLS-3766?page=com.atlassian.jira.plugi... ]
Geoffrey De Smet commented on DROOLS-3766:
------------------------------------------
[~mfusco] This is probably caused by Drools generating code in the unnamed module, which is bad.
It could use the drl's package (first line in the drl file) or just "org.drools.core".
> [JPMS] Calls coming from unnamed module
> ---------------------------------------
>
> Key: DROOLS-3766
> URL: https://issues.jboss.org/browse/DROOLS-3766
> Project: Drools
> Issue Type: Enhancement
> Components: core engine
> Affects Versions: 7.19.0.Final
> Reporter: Martin Kröning
> Assignee: Mario Fusco
> Priority: Major
>
> When running Drools in the context of OptaPlanner on the modulepath ([Reference|https://github.com/kiegroup/optaplanner/pull/492]), it is required to open up the domain package to all modules.
> Only opening up to `org.drools.core` does not work, because the calls come from an unnamed module:
> {code:bash}
> Exception in thread "main" java.lang.IllegalAccessError: class org.drools.base.io.github.mwkroening.optaplannermodulepathexample.domain.CloudProcess520162288$getComputer (in unnamed module @0x4d68b571) cannot access class io.github.mwkroening.optaplannermodulepathexample.domain.CloudProcess (in module io.github.mwkroening.optaplannermodulepathexample) because module io.github.mwkroening.optaplannermodulepathexample does not export io.github.mwkroening.optaplannermodulepathexample.domain to unnamed module @0x4d68b571
> at org.drools.base.io.github.mwkroening.optaplannermodulepathexample.domain.CloudProcess520162288$getComputer.getValue(Unknown Source)
> at org.drools.core@7.18.0.Final/org.drools.core.base.extractors.BaseObjectClassFieldReader.getHashCode(BaseObjectClassFieldReader.java:180)
> at org.drools.core@7.18.0.Final/org.drools.core.base.ClassFieldReader.getHashCode(ClassFieldReader.java:224)
> at org.drools.core@7.18.0.Final/org.drools.core.util.AbstractHashTable$FieldIndex.hashCodeOf(AbstractHashTable.java:344)
> at org.drools.core@7.18.0.Final/org.drools.core.util.AbstractHashTable$SingleIndex.hashCodeOf(AbstractHashTable.java:409)
> at org.drools.core@7.18.0.Final/org.drools.core.util.index.TupleIndexHashTable.getOrCreate(TupleIndexHashTable.java:392)
> at org.drools.core@7.18.0.Final/org.drools.core.util.index.TupleIndexHashTable.add(TupleIndexHashTable.java:358)
> at org.drools.core@7.18.0.Final/org.drools.core.phreak.PhreakAccumulateNode.doRightInserts(PhreakAccumulateNode.java:217)
> at org.drools.core@7.18.0.Final/org.drools.core.phreak.PhreakAccumulateNode.doNode(PhreakAccumulateNode.java:85)
> at org.drools.core@7.18.0.Final/org.drools.core.phreak.RuleNetworkEvaluator.switchOnDoBetaNode(RuleNetworkEvaluator.java:581)
> at org.drools.core@7.18.0.Final/org.drools.core.phreak.RuleNetworkEvaluator.evalBetaNode(RuleNetworkEvaluator.java:552)
> at org.drools.core@7.18.0.Final/org.drools.core.phreak.RuleNetworkEvaluator.evalNode(RuleNetworkEvaluator.java:379)
> at org.drools.core@7.18.0.Final/org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:339)
> at org.drools.core@7.18.0.Final/org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:175)
> at org.drools.core@7.18.0.Final/org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:133)
> at org.drools.core@7.18.0.Final/org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:213)
> at org.drools.core@7.18.0.Final/org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:88)
> at org.drools.core@7.18.0.Final/org.drools.core.concurrent.AbstractRuleEvaluator.internalEvaluateAndFire(AbstractRuleEvaluator.java:34)
> at org.drools.core@7.18.0.Final/org.drools.core.concurrent.SequentialRuleEvaluator.evaluateAndFire(SequentialRuleEvaluator.java:43)
> at org.drools.core@7.18.0.Final/org.drools.core.common.DefaultAgenda.fireLoop(DefaultAgenda.java:1062)
> at org.drools.core@7.18.0.Final/org.drools.core.common.DefaultAgenda.internalFireAllRules(DefaultAgenda.java:1009)
> at org.drools.core@7.18.0.Final/org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1001)
> at org.drools.core@7.18.0.Final/org.drools.core.impl.StatefulKnowledgeSessionImpl.internalFireAllRules(StatefulKnowledgeSessionImpl.java:1330)
> at org.drools.core@7.18.0.Final/org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1321)
> at org.drools.core@7.18.0.Final/org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1305)
> at org.optaplanner.core@7.18.0.Final/org.optaplanner.core.impl.score.director.drools.DroolsScoreDirector.calculateScore(DroolsScoreDirector.java:171)
> at org.optaplanner.core@7.18.0.Final/org.optaplanner.core.impl.solver.recaller.BestSolutionRecaller.solvingStarted(BestSolutionRecaller.java:69)
> at org.optaplanner.core@7.18.0.Final/org.optaplanner.core.impl.solver.AbstractSolver.solvingStarted(AbstractSolver.java:76)
> at org.optaplanner.core@7.18.0.Final/org.optaplanner.core.impl.solver.DefaultSolver.solvingStarted(DefaultSolver.java:210)
> at org.optaplanner.core@7.18.0.Final/org.optaplanner.core.impl.solver.DefaultSolver.solve(DefaultSolver.java:190)
> at io.github.mwkroening.optaplannermodulepathexample/io.github.mwkroening.optaplannermodulepathexample.App.main(App.java:22)
> {code}
> It would be great, if it would be possible to make these kinds of calls come from a named module.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 10 months
[JBoss JIRA] (DROOLS-3766) [JPMS] Calls coming from unnamed module
by Geoffrey De Smet (Jira)
[ https://issues.jboss.org/browse/DROOLS-3766?page=com.atlassian.jira.plugi... ]
Geoffrey De Smet updated DROOLS-3766:
-------------------------------------
Priority: Critical (was: Major)
> [JPMS] Calls coming from unnamed module
> ---------------------------------------
>
> Key: DROOLS-3766
> URL: https://issues.jboss.org/browse/DROOLS-3766
> Project: Drools
> Issue Type: Enhancement
> Components: core engine
> Affects Versions: 7.19.0.Final
> Reporter: Martin Kröning
> Assignee: Mario Fusco
> Priority: Critical
>
> When running Drools in the context of OptaPlanner on the modulepath ([Reference|https://github.com/kiegroup/optaplanner/pull/492]), it is required to open up the domain package to all modules.
> Only opening up to `org.drools.core` does not work, because the calls come from an unnamed module:
> {code:bash}
> Exception in thread "main" java.lang.IllegalAccessError: class org.drools.base.io.github.mwkroening.optaplannermodulepathexample.domain.CloudProcess520162288$getComputer (in unnamed module @0x4d68b571) cannot access class io.github.mwkroening.optaplannermodulepathexample.domain.CloudProcess (in module io.github.mwkroening.optaplannermodulepathexample) because module io.github.mwkroening.optaplannermodulepathexample does not export io.github.mwkroening.optaplannermodulepathexample.domain to unnamed module @0x4d68b571
> at org.drools.base.io.github.mwkroening.optaplannermodulepathexample.domain.CloudProcess520162288$getComputer.getValue(Unknown Source)
> at org.drools.core@7.18.0.Final/org.drools.core.base.extractors.BaseObjectClassFieldReader.getHashCode(BaseObjectClassFieldReader.java:180)
> at org.drools.core@7.18.0.Final/org.drools.core.base.ClassFieldReader.getHashCode(ClassFieldReader.java:224)
> at org.drools.core@7.18.0.Final/org.drools.core.util.AbstractHashTable$FieldIndex.hashCodeOf(AbstractHashTable.java:344)
> at org.drools.core@7.18.0.Final/org.drools.core.util.AbstractHashTable$SingleIndex.hashCodeOf(AbstractHashTable.java:409)
> at org.drools.core@7.18.0.Final/org.drools.core.util.index.TupleIndexHashTable.getOrCreate(TupleIndexHashTable.java:392)
> at org.drools.core@7.18.0.Final/org.drools.core.util.index.TupleIndexHashTable.add(TupleIndexHashTable.java:358)
> at org.drools.core@7.18.0.Final/org.drools.core.phreak.PhreakAccumulateNode.doRightInserts(PhreakAccumulateNode.java:217)
> at org.drools.core@7.18.0.Final/org.drools.core.phreak.PhreakAccumulateNode.doNode(PhreakAccumulateNode.java:85)
> at org.drools.core@7.18.0.Final/org.drools.core.phreak.RuleNetworkEvaluator.switchOnDoBetaNode(RuleNetworkEvaluator.java:581)
> at org.drools.core@7.18.0.Final/org.drools.core.phreak.RuleNetworkEvaluator.evalBetaNode(RuleNetworkEvaluator.java:552)
> at org.drools.core@7.18.0.Final/org.drools.core.phreak.RuleNetworkEvaluator.evalNode(RuleNetworkEvaluator.java:379)
> at org.drools.core@7.18.0.Final/org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:339)
> at org.drools.core@7.18.0.Final/org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:175)
> at org.drools.core@7.18.0.Final/org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:133)
> at org.drools.core@7.18.0.Final/org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:213)
> at org.drools.core@7.18.0.Final/org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:88)
> at org.drools.core@7.18.0.Final/org.drools.core.concurrent.AbstractRuleEvaluator.internalEvaluateAndFire(AbstractRuleEvaluator.java:34)
> at org.drools.core@7.18.0.Final/org.drools.core.concurrent.SequentialRuleEvaluator.evaluateAndFire(SequentialRuleEvaluator.java:43)
> at org.drools.core@7.18.0.Final/org.drools.core.common.DefaultAgenda.fireLoop(DefaultAgenda.java:1062)
> at org.drools.core@7.18.0.Final/org.drools.core.common.DefaultAgenda.internalFireAllRules(DefaultAgenda.java:1009)
> at org.drools.core@7.18.0.Final/org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1001)
> at org.drools.core@7.18.0.Final/org.drools.core.impl.StatefulKnowledgeSessionImpl.internalFireAllRules(StatefulKnowledgeSessionImpl.java:1330)
> at org.drools.core@7.18.0.Final/org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1321)
> at org.drools.core@7.18.0.Final/org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1305)
> at org.optaplanner.core@7.18.0.Final/org.optaplanner.core.impl.score.director.drools.DroolsScoreDirector.calculateScore(DroolsScoreDirector.java:171)
> at org.optaplanner.core@7.18.0.Final/org.optaplanner.core.impl.solver.recaller.BestSolutionRecaller.solvingStarted(BestSolutionRecaller.java:69)
> at org.optaplanner.core@7.18.0.Final/org.optaplanner.core.impl.solver.AbstractSolver.solvingStarted(AbstractSolver.java:76)
> at org.optaplanner.core@7.18.0.Final/org.optaplanner.core.impl.solver.DefaultSolver.solvingStarted(DefaultSolver.java:210)
> at org.optaplanner.core@7.18.0.Final/org.optaplanner.core.impl.solver.DefaultSolver.solve(DefaultSolver.java:190)
> at io.github.mwkroening.optaplannermodulepathexample/io.github.mwkroening.optaplannermodulepathexample.App.main(App.java:22)
> {code}
> It would be great, if it would be possible to make these kinds of calls come from a named module.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 10 months
[JBoss JIRA] (WFLY-11508) Add "org.eclipse.microprofile.restclient" dependency to "resteasy-client-microprofile" module
by Ivo Studensky (Jira)
[ https://issues.jboss.org/browse/WFLY-11508?page=com.atlassian.jira.plugin... ]
Ivo Studensky reassigned WFLY-11508:
------------------------------------
Assignee: Ivo Studensky (was: Alessio Soldano)
> Add "org.eclipse.microprofile.restclient" dependency to "resteasy-client-microprofile" module
> ---------------------------------------------------------------------------------------------
>
> Key: WFLY-11508
> URL: https://issues.jboss.org/browse/WFLY-11508
> Project: WildFly
> Issue Type: Bug
> Components: REST
> Reporter: Marek Kopecký
> Assignee: Ivo Studensky
> Priority: Major
>
> Add "org.eclipse.microprofile.restclient" dependency to "resteasy-client-microprofile" module
> MP Rest client doesn't work on server side, but it works outside of the server just with "resteasy-client-microprofile" dependency. This behaviour is not consistent. If user want to use MP Rest client, user needs to allow "org.eclipse.microprofile.restclient" manually on server (manifest file or jboss-deployment-structure.xml file)
> Steps to reproduce:
> {code:java}
> public class Resource implements Proxy {
> public String get() {
> return "a";
> }
> public String call() throws Exception {
> RestClientBuilder builder = RestClientBuilder.newBuilder();
> Proxy restClient = builder.baseUrl(new URL("http://localhost:8080/jaxrs-wf/")).build(Proxy.class);
> String response = restClient.get();
> System.out.println(response);
> return response;
> }
> }
> @Path("/")
> public interface Proxy {
> @GET
> @Path("get")
> String get();
> @GET
> @Path("call")
> String call() throws Exception;
> }
> {code}
> * curl -v -X GET "http://localhost:8080/jaxrs-wf/call"
> {noformat}
> 09:16:18,485 ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to /jaxrs-wf/call: org.jboss.resteasy.spi.UnhandledException: java.util.ServiceConfigurationError: org.eclipse.microprofile.rest.client.spi.RestClientBuilderResolver: Provider org.jboss.resteasy.client.microprofile.MicroprofileClientBuilderResolver not a subtype
> at org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:78)
> at org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:222)
> at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:193)
> at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:455)
> at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:229)
> at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:135)
> at org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:355)
> at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:138)
> at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:215)
> at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:227)
> at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
> at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:791)
> at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
> at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
> at io.opentracing.contrib.jaxrs2.server.SpanFinishingFilter.doFilter(SpanFinishingFilter.java:55)
> at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
> at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
> at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
> at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
> at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
> at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
> at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132)
> at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
> at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
> at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
> at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
> at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
> at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
> at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
> at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
> at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
> at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
> at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
> at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
> at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
> at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
> at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
> at io.undertow.server.Connectors.executeRootHandler(Connectors.java:360)
> at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
> at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
> at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: java.util.ServiceConfigurationError: org.eclipse.microprofile.rest.client.spi.RestClientBuilderResolver: Provider org.jboss.resteasy.client.microprofile.MicroprofileClientBuilderResolver not a subtype
> at java.util.ServiceLoader.fail(ServiceLoader.java:239)
> at java.util.ServiceLoader.access$300(ServiceLoader.java:185)
> at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:376)
> at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
> at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
> at org.eclipse.microprofile.rest.client.spi.RestClientBuilderResolver.loadSpi(RestClientBuilderResolver.java:108)
> at org.eclipse.microprofile.rest.client.spi.RestClientBuilderResolver.instance(RestClientBuilderResolver.java:81)
> at org.eclipse.microprofile.rest.client.RestClientBuilder.newBuilder(RestClientBuilder.java:41)
> at org.resteasy.simple.deployment.Resource.call(Resource.java:25)
> 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.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:139)
> at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:509)
> at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:399)
> at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$0(ResourceMethodInvoker.java:363)
> at org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:355)
> at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:365)
> at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:337)
> at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:310)
> at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:439)
> ... 55 more
> {noformat}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 10 months
[JBoss JIRA] (DROOLS-3766) [JPMS] Calls coming from unnamed module
by Martin Kröning (Jira)
Martin Kröning created DROOLS-3766:
--------------------------------------
Summary: [JPMS] Calls coming from unnamed module
Key: DROOLS-3766
URL: https://issues.jboss.org/browse/DROOLS-3766
Project: Drools
Issue Type: Enhancement
Components: core engine
Affects Versions: 7.19.0.Final
Reporter: Martin Kröning
Assignee: Mario Fusco
When running Drools in the context of OptaPlanner on the modulepath ([Reference|https://github.com/kiegroup/optaplanner/pull/492]), it is required to open up the domain package to all modules.
Only opening up to `org.drools.core` does not work, because the calls come from an unnamed module:
{code:bash}
Exception in thread "main" java.lang.IllegalAccessError: class org.drools.base.io.github.mwkroening.optaplannermodulepathexample.domain.CloudProcess520162288$getComputer (in unnamed module @0x4d68b571) cannot access class io.github.mwkroening.optaplannermodulepathexample.domain.CloudProcess (in module io.github.mwkroening.optaplannermodulepathexample) because module io.github.mwkroening.optaplannermodulepathexample does not export io.github.mwkroening.optaplannermodulepathexample.domain to unnamed module @0x4d68b571
at org.drools.base.io.github.mwkroening.optaplannermodulepathexample.domain.CloudProcess520162288$getComputer.getValue(Unknown Source)
at org.drools.core@7.18.0.Final/org.drools.core.base.extractors.BaseObjectClassFieldReader.getHashCode(BaseObjectClassFieldReader.java:180)
at org.drools.core@7.18.0.Final/org.drools.core.base.ClassFieldReader.getHashCode(ClassFieldReader.java:224)
at org.drools.core@7.18.0.Final/org.drools.core.util.AbstractHashTable$FieldIndex.hashCodeOf(AbstractHashTable.java:344)
at org.drools.core@7.18.0.Final/org.drools.core.util.AbstractHashTable$SingleIndex.hashCodeOf(AbstractHashTable.java:409)
at org.drools.core@7.18.0.Final/org.drools.core.util.index.TupleIndexHashTable.getOrCreate(TupleIndexHashTable.java:392)
at org.drools.core@7.18.0.Final/org.drools.core.util.index.TupleIndexHashTable.add(TupleIndexHashTable.java:358)
at org.drools.core@7.18.0.Final/org.drools.core.phreak.PhreakAccumulateNode.doRightInserts(PhreakAccumulateNode.java:217)
at org.drools.core@7.18.0.Final/org.drools.core.phreak.PhreakAccumulateNode.doNode(PhreakAccumulateNode.java:85)
at org.drools.core@7.18.0.Final/org.drools.core.phreak.RuleNetworkEvaluator.switchOnDoBetaNode(RuleNetworkEvaluator.java:581)
at org.drools.core@7.18.0.Final/org.drools.core.phreak.RuleNetworkEvaluator.evalBetaNode(RuleNetworkEvaluator.java:552)
at org.drools.core@7.18.0.Final/org.drools.core.phreak.RuleNetworkEvaluator.evalNode(RuleNetworkEvaluator.java:379)
at org.drools.core@7.18.0.Final/org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:339)
at org.drools.core@7.18.0.Final/org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:175)
at org.drools.core@7.18.0.Final/org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:133)
at org.drools.core@7.18.0.Final/org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:213)
at org.drools.core@7.18.0.Final/org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:88)
at org.drools.core@7.18.0.Final/org.drools.core.concurrent.AbstractRuleEvaluator.internalEvaluateAndFire(AbstractRuleEvaluator.java:34)
at org.drools.core@7.18.0.Final/org.drools.core.concurrent.SequentialRuleEvaluator.evaluateAndFire(SequentialRuleEvaluator.java:43)
at org.drools.core@7.18.0.Final/org.drools.core.common.DefaultAgenda.fireLoop(DefaultAgenda.java:1062)
at org.drools.core@7.18.0.Final/org.drools.core.common.DefaultAgenda.internalFireAllRules(DefaultAgenda.java:1009)
at org.drools.core@7.18.0.Final/org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1001)
at org.drools.core@7.18.0.Final/org.drools.core.impl.StatefulKnowledgeSessionImpl.internalFireAllRules(StatefulKnowledgeSessionImpl.java:1330)
at org.drools.core@7.18.0.Final/org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1321)
at org.drools.core@7.18.0.Final/org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1305)
at org.optaplanner.core@7.18.0.Final/org.optaplanner.core.impl.score.director.drools.DroolsScoreDirector.calculateScore(DroolsScoreDirector.java:171)
at org.optaplanner.core@7.18.0.Final/org.optaplanner.core.impl.solver.recaller.BestSolutionRecaller.solvingStarted(BestSolutionRecaller.java:69)
at org.optaplanner.core@7.18.0.Final/org.optaplanner.core.impl.solver.AbstractSolver.solvingStarted(AbstractSolver.java:76)
at org.optaplanner.core@7.18.0.Final/org.optaplanner.core.impl.solver.DefaultSolver.solvingStarted(DefaultSolver.java:210)
at org.optaplanner.core@7.18.0.Final/org.optaplanner.core.impl.solver.DefaultSolver.solve(DefaultSolver.java:190)
at io.github.mwkroening.optaplannermodulepathexample/io.github.mwkroening.optaplannermodulepathexample.App.main(App.java:22)
{code}
It would be great, if it would be possible to make these kinds of calls come from a named module.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 10 months