[JBoss JIRA] (DROOLS-3448) Maven plugin loads spurious resources, classes from the classpath in full downstream build
by Edoardo Vacchi (Jira)
Edoardo Vacchi created DROOLS-3448:
--------------------------------------
Summary: Maven plugin loads spurious resources, classes from the classpath in full downstream build
Key: DROOLS-3448
URL: https://issues.jboss.org/browse/DROOLS-3448
Project: Drools
Issue Type: Bug
Reporter: Edoardo Vacchi
Assignee: Mario Fusco
Found out about this bug today, while trying to fix a full downstream build. {{KieServerPolicyDroolsIntegrationTest}} broke with a ClassCastException.
tl;dr: there is a problem with ClassLoader delegates AND the way Service Discovery look for {{kie.conf}} on the classpath.
As part of DROOLS-3355, DROOLS-3307 I have moved CMMN package-building phase to the Assembler API. This highlighted an issue in the way the Maven plugin is tested (and/or the Service discovery mechanism, depending on how you want to see it)
This is what I have understood:
- CMMNAssemblerService is in its own package, which depends on jBPM.
- the Maven plugin injects its own ClassLoader,
- then it calls {{KieServices.Factory.get()}},
- this causes the Service discovery to start, and all the services found in the {{kie.conf}}s that are on the current classpath
Please notice that the classpath in the Full Downstream Build includes all the packages, so every kie.conf found in every project jar
In the test that broke {{KieServerPolicyDroolsIntegrationTest}}:
- Maven instance is created; It is created a new class loader (@ BuildMojo#buildDrl() ) with the jars on which Maven plugin depends.
Before my fix, this *DID not* include the dependency on CMMN
- *however* kie.conf for CMMNAssemblerService is in the class path of full downstream build!
- because it is not a direct Maven dependency, it is *not* in the class loader of the Maven build
- CMMNAssemblerService is therefore loaded from the *root classloader*
- when KieAssemblerServices are processed, all assembler services *except CMMN* are found in the maven classpath, so they are loaded from that class loader
- ClassCastException is raised when CMMNAssemblerService is used because it is not an instance of KieAssemblerService (really, it is: but the class KieAssemblerService has now been loaded from the maven class loader, while CMMNAssemblerService has been loaded from the root classloader)
The problem is that the chain of classloaders AND the service discovery mechanism:
- The classloader delegates to the root classloader, which loads from the full downstream classpath, which includes everything and loads a service that should not be found; this in turn causes the ClassCastException
- the service discovery mechanism loads {{kie.conf}} from the full downstream classpath, which includes jars that should not be processed (as they would not be in the maven plugin classpath)
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 7 months
[JBoss JIRA] (WFLY-4336) Cannot run testsuite if an application holds port 8080 open
by Fedor Gavrilov (Jira)
[ https://issues.jboss.org/browse/WFLY-4336?page=com.atlassian.jira.plugin.... ]
Fedor Gavrilov updated WFLY-4336:
---------------------------------
Attachment: 11861.patch
> Cannot run testsuite if an application holds port 8080 open
> -----------------------------------------------------------
>
> Key: WFLY-4336
> URL: https://issues.jboss.org/browse/WFLY-4336
> Project: WildFly
> Issue Type: Enhancement
> Components: Test Suite
> Affects Versions: 9.0.0.Alpha1
> Reporter: Michael Musgrove
> Assignee: Fedor Gavrilov
> Priority: Optional
> Fix For: Awaiting Volunteers
>
> Attachments: 11861.patch
>
>
> We run jobs on a Jenkins cluster where the master is also a slave. The master runs the web front end gui on port 8080. The default wildfly web profile uses the same port. I tried starting undertow on a different port but the testsuite has some hardcoded references to port 8080, for example:
> testsuite/integration/src/test/xslt/changeIPAddresses.xsl
> testsuite/integration/xts/src/test/java/org/jboss/as/test/xts/wsat/client/ATClient.java
> testsuite/integration/xts/src/test/java/org/jboss/as/test/xts/wsba/coordinatorcompletion/client/BACoordinatorCompletionClient.java
> testsuite/integration/xts/src/test/java/org/jboss/as/test/xts/wsba/participantcompletion/client/BAParticipantCompletionClient.java
> The particular command I tried was:
> {code}
> ./tools/maven/bin/mvn -s tools/maven/conf/settings.xml test '-f' './testsuite/integration/xts/pom.xml' '-Pxts.integration.tests.profile' -Djboss.http.port=xxx
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 7 months
[JBoss JIRA] (DROOLS-3447) Remove "DMN Asset" dependency from TitledAttachmentFileWidget
by Gabriele Cardosi (Jira)
Gabriele Cardosi created DROOLS-3447:
----------------------------------------
Summary: Remove "DMN Asset" dependency from TitledAttachmentFileWidget
Key: DROOLS-3447
URL: https://issues.jboss.org/browse/DROOLS-3447
Project: Drools
Issue Type: Bug
Components: Scenario Simulation and Testing
Reporter: Gabriele Cardosi
Assignee: Gabriele Cardosi
Currently, TitledAttachmentFileWidget use ProjectAssetsQuery to retrieve the "dmn" files.
Implicitly, this means that *if* (for whatever reason) dmn editor is disabled, the dmn file are not retrieved. Wording differently, this creates an implicit dependency between scenariosimulation and dmn editor.
Fix it so that TitledAttachmentFileWidget could find dmn files regardless of dmn editor.
Look at left dock that shows all the files of the project.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 7 months
[JBoss JIRA] (WFLY-3313) Websocket Auth - Container is not aware of the Principal
by Darran Lofthouse (Jira)
[ https://issues.jboss.org/browse/WFLY-3313?page=com.atlassian.jira.plugin.... ]
Darran Lofthouse reassigned WFLY-3313:
--------------------------------------
Assignee: Darran Lofthouse (was: Stuart Douglas)
> Websocket Auth - Container is not aware of the Principal
> --------------------------------------------------------
>
> Key: WFLY-3313
> URL: https://issues.jboss.org/browse/WFLY-3313
> Project: WildFly
> Issue Type: Bug
> Components: EJB, Security, Web (Undertow), Web Sockets
> Affects Versions: 8.1.0.CR1, 10.0.0.Final, 15.0.0.Final
> Reporter: Markus D
> Assignee: Darran Lofthouse
> Priority: Major
> Attachments: websocket-different-principals-ejb-vs-socket.png, websocket-endpoint-security.war
>
>
> The Websocket is protected by the web.xml. The session object of the callback object correctly returns the principal.
> When an EJB is called the callerPrincipal is always anonymous.
> @Resource
> private SessionContext ctx;
> Principal callerPrincipal = ctx.getCallerPrincipal();
> Running thread here:
> https://community.jboss.org/thread/240617
> Shouldn't the principal be propagated to the EJB container when a websocket callback method triggered?
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 7 months