[weld-issues] [JBoss JIRA] (WELD-2435) Java 9 jigsaw - weld-servlet-core WeldProvider not in module

2018-06-07 Thread Matej Novotny (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Matej Novotny edited a comment on  WELD-2435  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Java 9 jigsaw - weld-servlet-core WeldProvider not in module
 

  
 
 
 
 

 
 Hi [~pangalz]  bq. Shaded artifact won't work in a modular JPMS application.Could you please explain why?bq. ...make it finally work in a JPMS application...So you used {{weld-servlet-core}} as an automatic module then?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.5.0#75005-sha1:fd8c849)  
 
 

 
   
 

  
 

  
 

   

___
weld-issues mailing list
weld-issues@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-issues

[weld-issues] [JBoss JIRA] (WELD-2435) Java 9 jigsaw - weld-servlet-core WeldProvider not in module

2018-06-07 Thread Matej Novotny (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Matej Novotny commented on  WELD-2435  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Java 9 jigsaw - weld-servlet-core WeldProvider not in module
 

  
 
 
 
 

 
 

Shaded artifact won't work in a modular JPMS application.
 Could you please explain why? 

...make it finally work in a JPMS application...
 So you used weld-servlet-core as an automatic module then?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.5.0#75005-sha1:fd8c849)  
 
 

 
   
 

  
 

  
 

   

___
weld-issues mailing list
weld-issues@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-issues

[weld-issues] [JBoss JIRA] (WELD-2500) ProbeObserver.isContainerEvent() does not recognize BeforeDestroyed qualifier

2018-06-07 Thread Martin Kouba (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Martin Kouba updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Weld /  WELD-2500  
 
 
  ProbeObserver.isContainerEvent() does not recognize BeforeDestroyed qualifier   
 

  
 
 
 
 

 
Change By: 
 Martin Kouba  
 

  
 
 
 
 

 
 Consequently, {{BeforeDestroyed}}  (CDI 2.0)  events are not marked as container events and cannot be easily filtered out.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.5.0#75005-sha1:fd8c849)  
 
 

 
   
 

  
 

  
 

   

___
weld-issues mailing list
weld-issues@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-issues

[weld-issues] [JBoss JIRA] (WELD-2435) Java 9 jigsaw - weld-servlet-core WeldProvider not in module

2018-06-07 Thread Leonardo Zanivan (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Leonardo Zanivan commented on  WELD-2435  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Java 9 jigsaw - weld-servlet-core WeldProvider not in module
 

  
 
 
 
 

 
 Hi Matej Novotny, >>> Could you please explain why? 1. JPMS doesn't allow the same package belong to two different modules, in the shaded JAR it contains "javax" and other jboss dependencies. 2. It's against the modular system concept to add a shaded jar. >>> So you used weld-servlet-core as an automatic module then? Yes, every JAR dependency that doesn't contain a module-info class becomes an automatic module regardless of having a manifest entry or not. With this fix, I was able to run my first microservice using microprofile using JDK 9+ JPMS.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.5.0#75005-sha1:fd8c849)  
 
 

 
   
 

  
 

  
 

   

___
weld-issues mailing list
weld-issues@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-issues

[weld-issues] [JBoss JIRA] (WELD-2435) Java 9 jigsaw - weld-servlet-core WeldProvider not in module

2018-06-07 Thread Leonardo Zanivan (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Leonardo Zanivan edited a comment on  WELD-2435  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Java 9 jigsaw - weld-servlet-core WeldProvider not in module
 

  
 
 
 
 

 
 Hi [~manovotn],>>> Could you please explain why?1. JPMS doesn't allow the same package belong to two different modules, in the shaded JAR it contains "javax" and other jboss dependencies.2. It's against the modular system concept to add a shaded jar.>>> So you used weld-servlet-core as an automatic module then?Yes, every JAR dependency that doesn't contain a module-info class becomes an automatic module regardless of having a manifest entry or not.With this fix, I was able to run my first microservice using microprofile using JDK 9+ JPMS. https://github.com/panga/hammock-jpms  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.5.0#75005-sha1:fd8c849)  
 
 

 
   
 

  
 

  
 

   

___
weld-issues mailing list
weld-issues@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-issues

[weld-issues] [JBoss JIRA] (WELD-2505) Weld fails under Java 11

2018-06-07 Thread David Lloyd (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 David Lloyd created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Weld /  WELD-2505  
 
 
  Weld fails under Java 11   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Unassigned  
 
 
Created: 
 07/Jun/18 9:03 AM  
 
 
Priority: 
  Blocker  
 
 
Reporter: 
 David Lloyd  
 

  
 
 
 
 

 
 This is a follow-up to an email discussion between Marek Novotny and myself (and a few others). The WildFly test suite fails under Java 11 because of Weld's usage of Unsafe.defineClass, which was removed in Java 11. Previously MODULES-360 was created to provide an alternative approach. Additionally, it is possible to use reflection to directly invoke ClassLoader.defineClass if Unsafe is used to make the Method be accessible. This problem blocks testing of WildFly on Java 11.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was se

[weld-issues] [JBoss JIRA] (WELD-2505) Weld fails under Java 11

2018-06-07 Thread David Lloyd (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 David Lloyd updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Weld /  WELD-2505  
 
 
  Weld fails under Java 11   
 

  
 
 
 
 

 
Change By: 
 David Lloyd  
 
 
Labels: 
 jdk11  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.5.0#75005-sha1:fd8c849)  
 
 

 
   
 

  
 

  
 

   

___
weld-issues mailing list
weld-issues@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-issues

[weld-issues] [JBoss JIRA] (WELD-2435) Java 9 jigsaw - weld-servlet-core WeldProvider not in module

2018-06-07 Thread Matej Novotny (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Matej Novotny commented on  WELD-2435  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Java 9 jigsaw - weld-servlet-core WeldProvider not in module
 

  
 
 
 
 

 
 

1. JPMS doesn't allow the same package belong to two different modules, in the shaded JAR it contains "javax" and other jboss dependencies.
 Well, in shaded JAR, you can actually shade those dependencies, e.g. rename/relocate packages. Though it's optional and I we don't do it at the moment - Martin Kouba now that I think of it, we probably should, WDYT? If we do that, then such shaded JAR could be used even in JDK 9+. The behaviour for JDK 8 users shouldn't change unless they are breaking into our code somehow. 

2. It's against the modular system concept to add a shaded jar.
 I see what you mean, yet I still disagree as modular system fails address jar versioning in any way and shaded jars are one way to make it work.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.5.0#75005-sha1:fd8c849)  
 
 

 
   
 

  
 

  
 

   

___
weld-issues mailing list
weld-issues@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-issues

[weld-issues] [JBoss JIRA] (WELD-2505) Weld fails under Java 11

2018-06-07 Thread David Lloyd (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 David Lloyd updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Weld /  WELD-2505  
 
 
  Weld fails under Java 11   
 

  
 
 
 
 

 
Change By: 
 David Lloyd  
 

  
 
 
 
 

 
 This is a follow-up to an email discussion between [~manaRH] and myself (and a few others).  The WildFly test suite fails under Java 11 because of Weld's usage of {{Unsafe.defineClass}}, which was removed in Java 11.  Previously MODULES-360 was created to provide an alternative approach.  Additionally, it is possible to use reflection to directly invoke {{ClassLoader.defineClass( \ *)}} if {{Unsafe}} is used to make the {{Method}} be accessible.This problem blocks testing of WildFly on Java 11.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.5.0#75005-sha1:fd8c849)  
 
 

 
   
 

  
 

  
 

   

___
weld-issues mailing list
weld-issues@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-issues

[weld-issues] [JBoss JIRA] (WELD-2505) Weld fails under Java 11

2018-06-07 Thread Marek Novotny (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Marek Novotny commented on  WELD-2505  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Weld fails under Java 11   
 

  
 
 
 
 

 
 David Lloyd I guess you mistyped my referenced name, are you in discussion with Matej Novotny ?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.5.0#75005-sha1:fd8c849)  
 
 

 
   
 

  
 

  
 

   

___
weld-issues mailing list
weld-issues@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-issues

[weld-issues] [JBoss JIRA] (WELD-2505) Weld fails under Java 11

2018-06-07 Thread Matej Novotny (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Matej Novotny updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Weld /  WELD-2505  
 
 
  Weld fails under Java 11   
 

  
 
 
 
 

 
Change By: 
 Matej Novotny  
 

  
 
 
 
 

 
 This is a follow-up to an email discussion between [~ manaRH manovotn ] and myself (and a few others).  The WildFly test suite fails under Java 11 because of Weld's usage of {{Unsafe.defineClass}}, which was removed in Java 11.  Previously MODULES-360 was created to provide an alternative approach.  Additionally, it is possible to use reflection to directly invoke {{ClassLoader.defineClass(\*)}} if {{Unsafe}} is used to make the {{Method}} be accessible.This problem blocks testing of WildFly on Java 11.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.5.0#75005-sha1:fd8c849)  
 
 

 
   
 

  
 

  
 

   

___
weld-issues mailing list
weld-issues@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-issues

[weld-issues] [JBoss JIRA] (WELD-2505) Weld fails under Java 11

2018-06-07 Thread Matej Novotny (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Matej Novotny commented on  WELD-2505  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Weld fails under Java 11   
 

  
 
 
 
 

 
 David Lloyd WFLY should now use Weld 3.0.4.Final and for that version we already switched to using Unsafe to crack open Cl.defineClass() (from previously setting the method accessible directly). The related issue was WELD-2460. What is the exception you are getting and where is it coming from? Do you have a pointer to some job logs?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.5.0#75005-sha1:fd8c849)  
 
 

 
   
 

  
 

  
 

   

___
weld-issues mailing list
weld-issues@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-issues

[weld-issues] [JBoss JIRA] (WELD-2505) Weld fails under Java 11

2018-06-07 Thread Matej Novotny (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Matej Novotny commented on  WELD-2505  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Weld fails under Java 11   
 

  
 
 
 
 

 
 The only thing I can think of is classfilewriter which was using Unsafe.defineClass(), else I am not aware of us using that method anywhere.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.5.0#75005-sha1:fd8c849)  
 
 

 
   
 

  
 

  
 

   

___
weld-issues mailing list
weld-issues@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-issues

[weld-issues] [JBoss JIRA] (WELD-2505) Weld fails under Java 11

2018-06-07 Thread Matej Novotny (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Matej Novotny edited a comment on  WELD-2505  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Weld fails under Java 11   
 

  
 
 
 
 

 
 The only thing I can think of is classfilewriter which was using {{Unsafe.defineClass()}}  (but we are not using that from cfw anyway) , else I am not aware of us using that method anywhere.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.5.0#75005-sha1:fd8c849)  
 
 

 
   
 

  
 

  
 

   

___
weld-issues mailing list
weld-issues@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-issues

[weld-issues] [JBoss JIRA] (WELD-2435) Java 9 jigsaw - weld-servlet-core WeldProvider not in module

2018-06-07 Thread Leonardo Zanivan (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Leonardo Zanivan commented on  WELD-2435  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Java 9 jigsaw - weld-servlet-core WeldProvider not in module
 

  
 
 
 
 

 
 Indeed, JPMS doesn't handle versioning and that may require shading some dependencies, but that's can be done per project basis. In my particular case, I'm using Hammock (https://github.com/hammock-project/hammock) for creating a MicroProfile microservice. Unfortunately, it uses both Weld SE and Weld Servlet Core dependencies at the same time, so the shaded approach, even after packages relocation won't work for me either because of some weld core stuff clash.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.5.0#75005-sha1:fd8c849)  
 
 

 
   
 

  
 

  
 

   

___
weld-issues mailing list
weld-issues@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-issues

[weld-issues] [JBoss JIRA] (WELD-2435) Java 9 jigsaw - weld-servlet-core WeldProvider not in module

2018-06-07 Thread Leonardo Zanivan (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Leonardo Zanivan edited a comment on  WELD-2435  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Java 9 jigsaw - weld-servlet-core WeldProvider not in module
 

  
 
 
 
 

 
 Indeed, JPMS doesn't handle versioning and that may require shading some dependencies, but that's can be done per project basis.In my particular case, I'm using Hammock (https://github.com/hammock-project/hammock) for creating a MicroProfile microservice.Unfortunately, it uses both Weld SE and Weld Servlet Core dependencies at the same time, so the shaded approach, even after packages relocation won't work for me either because of some weld core stuff clash  (it may work, but I don't want to hack too much :)) .  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.5.0#75005-sha1:fd8c849)  
 
 

 
   
 

  
 

  
 

   

___
weld-issues mailing list
weld-issues@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-issues

[weld-issues] [JBoss JIRA] (WELD-2443) Weld fails to invoke an observer method with a private access

2018-06-07 Thread Joe Ezar (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Joe Ezar commented on  WELD-2443  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Weld fails to invoke an observer method with a private access   
 

  
 
 
 
 

 
 OK, finally I could nail it down. It happens when the CDI Event is thrown in the class defining the observer:  
 
 
 
 
 @ApplicationScoped  
 
 
 @PerformanceLogged  
 
 
 public class Foo{  
 
 
    
 
 
 @Inject  
 
 
 Event o;  
 
 
    
 
 
 private void bar(@Observes(notifyObserver = Reception.IF_EXISTS) Object x) {  
 
 
 // do something  
 
 
 }  
 
 
    
 
 
 public void fireEvent() {  
 
 
 o.fire(new Xxx());  
 
 
 }  
 
   

[weld-issues] [JBoss JIRA] (WELD-2505) Weld fails under Java 11

2018-06-07 Thread David Lloyd (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 David Lloyd commented on  WELD-2505  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Weld fails under Java 11   
 

  
 
 
 
 

 
 Yes, sorry about that Marek Novotny I did intend to ping Matej Novotny. I imagine this happens to you a lot   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.5.0#75005-sha1:fd8c849)  
 
 

 
   
 

  
 

  
 

   

___
weld-issues mailing list
weld-issues@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-issues

[weld-issues] [JBoss JIRA] (WELD-2505) Weld fails under Java 11

2018-06-07 Thread David Lloyd (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 David Lloyd commented on  WELD-2505  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Weld fails under Java 11   
 

  
 
 
 
 

 
 You are right Matej Novotny it does appear to be CFW at fault. I had forgotten our discussion on the PR from 3 weeks ago and had mixed up the outstanding issues; I should have double-checked that. I'll see if I can get a clean run using the updated CFW and we'll go from there.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.5.0#75005-sha1:fd8c849)  
 
 

 
   
 

  
 

  
 

   

___
weld-issues mailing list
weld-issues@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-issues

[weld-issues] [JBoss JIRA] (WELD-2505) Weld fails under Java 11

2018-06-07 Thread David Lloyd (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 David Lloyd commented on  WELD-2505  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Weld fails under Java 11   
 

  
 
 
 
 

 
 The most recent CI run is: https://ci.wildfly.org/viewLog.html?buildId=108077&tab=buildResultsDiv&buildTypeId=WF_MasterLinuxJdk11  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.5.0#75005-sha1:fd8c849)  
 
 

 
   
 

  
 

  
 

   

___
weld-issues mailing list
weld-issues@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-issues

[weld-issues] [JBoss JIRA] (WELD-2505) Weld fails under Java 11

2018-06-07 Thread Matej Novotny (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Matej Novotny commented on  WELD-2505  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Weld fails under Java 11   
 

  
 
 
 
 

 
 

I had forgotten our discussion on the PR from 3 weeks ago and had mixed up the outstanding issues; I should have double-checked that. I'll see if I can get a clean run using the updated CFW and we'll go from there.
 No problem, I also tend to mix it up when engaging in too many issues/conversations. Let me know if it solved the issue. For the record, the referenced PR is - https://github.com/jbossas/jboss-classfilewriter/pull/17 

I imagine this happens to you a lot 
 You wouldn't believe it...   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.5.0#75005-sha1:fd8c849)  
 
 

 
   
 

  
 

  
 

   

___
weld-issues mailing list
weld-issues@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-issues